Skip to content

Commit

Permalink
test: write test for required inputs to read messages
Browse files Browse the repository at this point in the history
  • Loading branch information
nmerget committed Jul 24, 2024
1 parent 6933036 commit bc9d33b
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion showcases/screen-reader/tests/input.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ test.describe('DBInput', () => {
await voiceOver?.next();
}
});
// We don't test default "next" here because we will be locked inside the textarea
testDefault({
test,
title: 'should have message and label (tab)',
Expand All @@ -38,4 +37,24 @@ test.describe('DBInput', () => {
await nvda?.press('Tab');
}
});
testDefault({
test,
title: 'should inform user for changes',
url: './#/03/input?page=requirement',
async testFn(voiceOver, nvda) {
if (voiceOver) {
await voiceOver?.next();
await voiceOver?.type('Test');
await voiceOver?.press('Command+A');
await voiceOver?.press('Delete');
await voiceOver?.type('Test');
} else {
await nvda?.press('Tab');
await nvda?.type('Test');
await nvda?.press('Control+A');
await nvda?.press('Delete');
await nvda?.type('Test');
}
}
});
});

0 comments on commit bc9d33b

Please sign in to comment.