-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3100 from db-ui/test-guidepup-select
Test guidepup select
- Loading branch information
Showing
4 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
showcases/screen-reader/__snapshots__/macos/webkit/DBSelect-default-1.txt
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 @@ | ||
["Label Functional pop up button","","Option 1","Option 2","Closing menu Option 2 Label Functional pop up button"] |
1 change: 1 addition & 0 deletions
1
showcases/screen-reader/__snapshots__/windows/chromium/DBSelect-default-1.txt
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 @@ | ||
["Label, combo box, collapsed, (Default) Regular","expanded. list. list item, 1 of 3","Option 1, not selected, 2 of 3","Option 2, not selected, 3 of 3"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { generateSnapshot, getTest, testDefault } from '../default'; | ||
|
||
const test = getTest(); | ||
|
||
test.describe('DBSelect', () => { | ||
testDefault({ | ||
test, | ||
title: 'default', | ||
description: 'should open and close select (next())', | ||
url: './#/03/select?page=density', | ||
async testFn(voiceOver, nvda) { | ||
if (nvda) { | ||
await nvda?.press('Tab'); // Focus select | ||
await nvda?.act(); // Open select | ||
await nvda?.next(); // Option 1 | ||
await nvda?.next(); // Option 2 | ||
} else if (voiceOver) { | ||
await voiceOver?.clearSpokenPhraseLog(); | ||
await voiceOver?.next(); // Focus select | ||
await voiceOver?.act(); // Open select | ||
await voiceOver?.press('ArrowDown'); // Move to "Option 1" | ||
await voiceOver?.press('ArrowDown'); // Move to "Option 2" | ||
await voiceOver?.act(); // Select "Option 2" | ||
} | ||
}, | ||
async postTestFn(voiceOver, nvda, retry) { | ||
if (nvda) { | ||
await generateSnapshot(nvda, retry); | ||
} else if (voiceOver) { | ||
/* | ||
* There is a timing issue for macOS for reading menu items length | ||
*/ | ||
await generateSnapshot(voiceOver, retry, (phraseLog) => | ||
phraseLog.map((log) => log.replace('menu 3 items ✓', '')) | ||
); | ||
} | ||
} | ||
}); | ||
}); |