Skip to content

Commit

Permalink
fix: Spinbutton page up day spec/test
Browse files Browse the repository at this point in the history
  • Loading branch information
nschonni committed Dec 3, 2020
1 parent 56bc58b commit bbd2ee7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/spinbutton/datepicker-spinbuttons.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ <h2 id="kbd_label">Keyboard Support</h2>
<td>
<ul>
<li>Decreases the value 5 steps.</li>
<li>When focus is on the <q>Day</q> spin button and the value is the first day of the month, changes value to the last day of the month.</li>
<li>When focus is on the <q>Day</q> spin button and the value is the first day of the month or up to the fifth, changes value to the last day of the month.</li>
<li>When focus is on the <q>Month</q> spin button and the value is <q>January</q>, <q>February</q>, <q>March</q>, <q>April</q>, or <q>May</q>, changes value to <q>December</q>.</li>
</ul>
</td>
Expand Down
17 changes: 17 additions & 0 deletions test/tests/spinbutton_datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,23 @@ ariaTest('page down on day', exampleFile, 'spinbutton-page-down', async (t) => {
'After sending page downs to the day spinner when set to 1, the day should be: ' +
control
);

// Set to first of month
await daySpinner.sendKeys(Key.HOME);

// Set to five
for (let i = 1; i <= 4; i++) {
await daySpinner.sendKeys(Key.UP);
}

await daySpinner.sendKeys(Key.PAGE_DOWN);

t.is(
parseInt(await daySpinner.getText()),
control,
'After sending page down to the day spinner when set to 5, the day should be: ' +
control
);
});

ariaTest('page up on month', exampleFile, 'spinbutton-page-up', async (t) => {
Expand Down

0 comments on commit bbd2ee7

Please sign in to comment.