豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Commit d59bca4

Browse files
authored
test: add tests for more a11y attributes (#934)
I think this covers all a11y attributes from CDP + we have now verbose vs non-verbose mode. Closes #363
1 parent 482a288 commit d59bca4

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

tests/formatters/snapshotFormatter.test.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ describe('snapshotFormatter', () => {
1919
role: 'textbox',
2020
name: 'textbox',
2121
value: 'value',
22+
live: 'polite',
23+
relevant: 'additions',
24+
errormessage: 'error-id',
25+
details: 'details-id',
2226
children: [
2327
{
2428
id: '1_2',
@@ -39,7 +43,7 @@ describe('snapshotFormatter', () => {
3943
const formatted = formatter.toString();
4044
assert.strictEqual(
4145
formatted,
42-
`uid=1_1 textbox "textbox" value="value"
46+
`uid=1_1 textbox "textbox" details="details-id" errormessage="error-id" live="polite" relevant="additions" value="value"
4347
uid=1_2 statictext "text"
4448
`,
4549
);
@@ -51,6 +55,8 @@ describe('snapshotFormatter', () => {
5155
role: 'button',
5256
name: 'button',
5357
disabled: true,
58+
busy: true,
59+
atomic: true,
5460
children: [
5561
{
5662
id: '1_2',
@@ -71,7 +77,7 @@ describe('snapshotFormatter', () => {
7177
const formatted = formatter.toString();
7278
assert.strictEqual(
7379
formatted,
74-
`uid=1_1 button "button" disableable disabled
80+
`uid=1_1 button "button" atomic busy disableable disabled
7581
uid=1_2 statictext "text"
7682
`,
7783
);
@@ -261,6 +267,8 @@ describe('snapshotFormatter', () => {
261267
id: '1_1',
262268
role: 'root',
263269
name: 'root',
270+
busy: true,
271+
live: 'polite',
264272
children: [
265273
{
266274
id: '1_2',
@@ -281,6 +289,8 @@ describe('snapshotFormatter', () => {
281289
id: '1_1',
282290
role: 'root',
283291
name: 'root',
292+
busy: true,
293+
live: 'polite',
284294
children: [
285295
{
286296
id: '1_2',

0 commit comments

Comments
 (0)