| Tests that key bindings work as expected. |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| Check that page popup doesn't exist at first. |
| PASS document.getElementById("mock-page-popup") is null |
| Check that page popup exists. |
| PASS popupWindow.pagePopupController.toString() is "[object PagePopupController]" |
| Check that up/down arrow keys work. |
| PASS highlightedEntry() is null |
| PASS highlightedEntry() is "2012-W01" |
| PASS highlightedEntry() is "2012-W02" |
| PASS highlightedEntry() is "2012-W01" |
| Check that up arrow key at top of list does nothing. |
| PASS highlightedEntry() is "2012-W01" |
| PASS highlightedEntry() is "2012-W02" |
| Check that page up/down arrow keys work. |
| PASS highlightedEntry() is "2012-W40" |
| PASS highlightedEntry() is "2013-W08" |
| PASS highlightedEntry() is "2012-W21" |
| PASS highlightedEntry() is "2013-W08" |
| PASS highlightedEntry() is "@openCalendarPicker" |
| Check that down arrow key at bottom of list does nothing. |
| PASS highlightedEntry() is "@openCalendarPicker" |
| Check that enter key sets the highlighted value. |
| PASS highlightedEntry() is "2013-W18" |
| PASS document.getElementById("mock-page-popup") is null |
| PASS document.getElementById("week").value is "2013-W18" |
| Reopen popup. |
| PASS highlightedEntry() is "@openCalendarPicker" |
| Open calendar picker. |
| PASS expectingDidHideEvent is true |
| PASS expectingDidHideEvent is false |
| Confirm calendar picker did open. |
| PASS popupWindow.document.getElementById("main").firstChild.classList.contains("calendar-picker") is true |
| Check that escape key closes the popup. |
| PASS document.getElementById("mock-page-popup") is null |
| PASS document.getElementById("week").value is "2013-W18" |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |