From 9c60ae7a625f831d0d855ab26972210d15ec5054 Mon Sep 17 00:00:00 2001 From: brunoschadeck Date: Wed, 7 Aug 2024 15:23:44 +0200 Subject: [PATCH 1/3] test: adds guidepup test for badge, raw --- showcases/screen-reader/tests/badge.spec.ts | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 showcases/screen-reader/tests/badge.spec.ts diff --git a/showcases/screen-reader/tests/badge.spec.ts b/showcases/screen-reader/tests/badge.spec.ts new file mode 100644 index 00000000000..3f14a69513a --- /dev/null +++ b/showcases/screen-reader/tests/badge.spec.ts @@ -0,0 +1,23 @@ +import { getTest, testDefault } from '../default'; + +const test = getTest(); + +test.describe('DBBadge', () => { + testDefault({ + test, + title: 'should ...', + url: './#/06/badge?page=placement', + async testFn(voiceOver, nvda) { + if (nvda) { + await nvda?.next(); + } + + const screenReader = voiceOver ?? nvda; + await screenReader?.clearSpokenPhraseLog(); + // Todo: add test + // await screenReader?.previous(); + // await screenReader?.next(); + // await screenReader?.next(); + } + }); +}); From 807ad23a5b1e6ff029100434d985a39997a93e02 Mon Sep 17 00:00:00 2001 From: brunoschadeck Date: Wed, 7 Aug 2024 18:28:11 +0200 Subject: [PATCH 2/3] test: adds guidepup test for badge --- ...texts-inline-or-as-data-label-attributes-next-.txt | 1 + showcases/screen-reader/tests/badge.spec.ts | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 showcases/screen-reader/__snapshots__/macos/webkit/DBBadge-should-have-texts-inline-or-as-data-label-attributes-next-.txt diff --git a/showcases/screen-reader/__snapshots__/macos/webkit/DBBadge-should-have-texts-inline-or-as-data-label-attributes-next-.txt b/showcases/screen-reader/__snapshots__/macos/webkit/DBBadge-should-have-texts-inline-or-as-data-label-attributes-next-.txt new file mode 100644 index 00000000000..5df1d6c1cb3 --- /dev/null +++ b/showcases/screen-reader/__snapshots__/macos/webkit/DBBadge-should-have-texts-inline-or-as-data-label-attributes-next-.txt @@ -0,0 +1 @@ +["(Default) Inline","Label","LABEL SHOULD BE SET Corner - Top - Left button","Corner - Top - Left","LABEL SHOULD BE SET Corner - Center - Left button"] \ No newline at end of file diff --git a/showcases/screen-reader/tests/badge.spec.ts b/showcases/screen-reader/tests/badge.spec.ts index 3f14a69513a..38d2f4fe047 100644 --- a/showcases/screen-reader/tests/badge.spec.ts +++ b/showcases/screen-reader/tests/badge.spec.ts @@ -5,7 +5,7 @@ const test = getTest(); test.describe('DBBadge', () => { testDefault({ test, - title: 'should ...', + title: 'should have texts inline or as data-label attributes (next())', url: './#/06/badge?page=placement', async testFn(voiceOver, nvda) { if (nvda) { @@ -14,10 +14,11 @@ test.describe('DBBadge', () => { const screenReader = voiceOver ?? nvda; await screenReader?.clearSpokenPhraseLog(); - // Todo: add test - // await screenReader?.previous(); - // await screenReader?.next(); - // await screenReader?.next(); + await screenReader?.previous(); // Badge inline + await screenReader?.next(); // Badge red + await screenReader?.next(); // Button with badge with data-label 1 + await screenReader?.next(); // Info-text + await screenReader?.next(); // Button with badge with data-label 2 } }); }); From 43b29ec6d1660a506ac2bac2489efd14511cb8b1 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke Date: Fri, 9 Aug 2024 12:44:56 +0200 Subject: [PATCH 3/3] feat: added pipeline generated snapshot --- ...hould-have-texts-inline-or-as-data-label-attributes-next-.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 showcases/screen-reader/__snapshots__/windows/chromium/DBBadge-should-have-texts-inline-or-as-data-label-attributes-next-.txt diff --git a/showcases/screen-reader/__snapshots__/windows/chromium/DBBadge-should-have-texts-inline-or-as-data-label-attributes-next-.txt b/showcases/screen-reader/__snapshots__/windows/chromium/DBBadge-should-have-texts-inline-or-as-data-label-attributes-next-.txt new file mode 100644 index 00000000000..179e367ed51 --- /dev/null +++ b/showcases/screen-reader/__snapshots__/windows/chromium/DBBadge-should-have-texts-inline-or-as-data-label-attributes-next-.txt @@ -0,0 +1 @@ +["(Default) Inline Label","button, LABEL SHOULD BE SET","button, Corner Top Left","Corner Top Left","button, LABEL SHOULD BE SET"] \ No newline at end of file