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 Jan 8, 2021
1 parent 5e1e734 commit a383720
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 @@ -198,7 +198,7 @@ <h2 id="kbd_label">Keyboard Support</h2>
<td>
<ul>
<li>Increases the value 5 steps.</li>
<li>When focus is on the <q>Day</q> spin button and the value is the last day of the month, changes value to the first day of the month.</li>
<li>When focus is on the <q>Day</q> spin button and the value is the last day of the month or any of the last four days, changes value to the first day of the month.</li>
<li>When focus is on the <q>Month</q> spin button and the value is <q>December</q>, <q>November</q>, <q>October</q>, <q>September</q>, or <q>August</q>, changes value to <q>January</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 @@ -594,6 +594,23 @@ ariaTest('page up on day', exampleFile, 'spinbutton-page-up', async (t) => {
'After sending page up to the day spinner on the last day of the month, the day should be: ' +
control
);

// Set to end of month
await daySpinner.sendKeys(Key.END);

// Set to four days before
for (let i = 1; i <= 4; i++) {
await daySpinner.sendKeys(Key.DOWN);
}

await daySpinner.sendKeys(Key.PAGE_UP);

t.is(
parseInt(await daySpinner.getText()),
control,
'After sending page up to the day spinner on 4 days before the end of the month, the day should be: ' +
control
);
});

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

0 comments on commit a383720

Please sign in to comment.