Skip to content

Commit

Permalink
Merge pull request #3006 from db-ui/test-guidepup-badge
Browse files Browse the repository at this point in the history
Test guidepup badge
  • Loading branch information
bruno-sch authored Aug 9, 2024
2 parents 3066331 + 55a7df3 commit 1182111
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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"]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["(Default) Inline Label","button, LABEL SHOULD BE SET","button, Corner Top Left","Corner Top Left","button, LABEL SHOULD BE SET"]
24 changes: 24 additions & 0 deletions showcases/screen-reader/tests/badge.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { getTest, testDefault } from '../default';

const test = getTest();

test.describe('DBBadge', () => {
testDefault({
test,
title: 'should have texts inline or as data-label attributes (next())',
url: './#/06/badge?page=placement',
async testFn(voiceOver, nvda) {
if (nvda) {
await nvda?.next();
}

const screenReader = voiceOver ?? nvda;
await screenReader?.clearSpokenPhraseLog();
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
}
});
});

0 comments on commit 1182111

Please sign in to comment.