From bc9d33b5cc4e818bc5cf8960d6a6e8248f82cc7b Mon Sep 17 00:00:00 2001 From: Nicolas Merget Date: Wed, 24 Jul 2024 15:37:15 +0200 Subject: [PATCH] test: write test for required inputs to read messages --- showcases/screen-reader/tests/input.spec.ts | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/showcases/screen-reader/tests/input.spec.ts b/showcases/screen-reader/tests/input.spec.ts index 67ac4e5779d..c6d70cfce01 100644 --- a/showcases/screen-reader/tests/input.spec.ts +++ b/showcases/screen-reader/tests/input.spec.ts @@ -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)', @@ -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'); + } + } + }); });