-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(sbb-screen-reader-only): add visual tests (#2868)
- Loading branch information
1 parent
848bd83
commit 128ce53
Showing
3 changed files
with
27 additions
and
6 deletions.
There are no files selected for viewing
8 changes: 4 additions & 4 deletions
8
src/elements/screen-reader-only/__snapshots__/screen-reader-only.snapshot.spec.snap.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/elements/screen-reader-only/screen-reader-only.visual.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { html } from 'lit'; | ||
|
||
import { describeViewports, visualDiffDefault } from '../core/testing/private.js'; | ||
|
||
import './screen-reader-only.js'; | ||
|
||
describe(`sbb-screen-reader-only`, () => { | ||
describeViewports({ viewports: ['medium'] }, () => { | ||
it( | ||
visualDiffDefault.name, | ||
visualDiffDefault.with(async (setup) => { | ||
await setup.withFixture(html` | ||
There is a visually hidden text here: | ||
<sbb-screen-reader-only> | ||
I'm visually hidden, but read to screen reader. | ||
</sbb-screen-reader-only> | ||
`); | ||
}), | ||
); | ||
}); | ||
}); |