Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(guidepup): badge #3006

Merged
merged 6 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}
});
});
Loading