From 944b9d58c6ac51c0b3ba65655c92e1d6b7be42c8 Mon Sep 17 00:00:00 2001 From: brunoschadeck Date: Wed, 7 Aug 2024 18:51:08 +0200 Subject: [PATCH] test: adds guidepup test for brand --- ...ons-but-the-custom-logo-as-image-next-.txt | 1 + showcases/screen-reader/default.ts | 3 ++- showcases/screen-reader/tests/brand.spec.ts | 23 +++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 showcases/screen-reader/__snapshots__/macos/webkit/DBBrand-should-have-inline-texts-no-icons-but-the-custom-logo-as-image-next-.txt create mode 100644 showcases/screen-reader/tests/brand.spec.ts diff --git a/showcases/screen-reader/__snapshots__/macos/webkit/DBBrand-should-have-inline-texts-no-icons-but-the-custom-logo-as-image-next-.txt b/showcases/screen-reader/__snapshots__/macos/webkit/DBBrand-should-have-inline-texts-no-icons-but-the-custom-logo-as-image-next-.txt new file mode 100644 index 00000000000..6ca0c70c27d --- /dev/null +++ b/showcases/screen-reader/__snapshots__/macos/webkit/DBBrand-should-have-inline-texts-no-icons-but-the-custom-logo-as-image-next-.txt @@ -0,0 +1 @@ +["(Default) With Logo","No Logo","logo image","Custom Logo"] \ No newline at end of file diff --git a/showcases/screen-reader/default.ts b/showcases/screen-reader/default.ts index 5e4627cc193..cfbbe625bf2 100644 --- a/showcases/screen-reader/default.ts +++ b/showcases/screen-reader/default.ts @@ -41,7 +41,8 @@ const cleanSpeakInstructions = (phraseLog: string[]): string[] => sPhrase.includes('To click') || sPhrase.includes('To select') || sPhrase.includes('To interact') || - sPhrase.includes('Press Control') + sPhrase.includes('Press Control') || + sPhrase.includes('To begin interacting') ) ) .join('. ') diff --git a/showcases/screen-reader/tests/brand.spec.ts b/showcases/screen-reader/tests/brand.spec.ts new file mode 100644 index 00000000000..670b9a394ec --- /dev/null +++ b/showcases/screen-reader/tests/brand.spec.ts @@ -0,0 +1,23 @@ +import { getTest, testDefault } from '../default'; + +const test = getTest(); + +test.describe('DBBrand', () => { + testDefault({ + test, + title: 'should have inline texts, no icons, but the custom logo as image (next())', + url: './#/04/brand?page=variants', + async testFn(voiceOver, nvda) { + if (nvda) { + await nvda?.next(); + } + + const screenReader = voiceOver ?? nvda; + await screenReader?.clearSpokenPhraseLog(); + await screenReader?.previous(); // Label 1 + await screenReader?.next(); // Label 2 + await screenReader?.next(); // Logo image + await screenReader?.next(); // Label 3 + } + }); +});