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: write test for required inputs to read messages #2906

Merged
merged 32 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
bc9d33b
test: write test for required inputs to read messages
nmerget Jul 24, 2024
6510a60
chore: add windows snapshot
nmerget Jul 25, 2024
db44d3b
Merge branch 'main' of github.com:db-ui/mono into test-input-required…
nmerget Jul 25, 2024
07904d4
chore: update from main
nmerget Jul 25, 2024
6ecbba2
fix: add span only for voiceover to inform users about valid/invalid …
nmerget Jul 25, 2024
f3eec77
chore: update snapshots
nmerget Jul 25, 2024
f611d1c
chore: update snapshots
nmerget Jul 25, 2024
710c9e2
Merge branch 'main' into test-input-required-messages
nmerget Jul 26, 2024
16fa741
Merge branch 'main' into test-input-required-messages
nmerget Jul 26, 2024
46a9978
refactor: using an attribute instead of a class
mfranzke Jul 26, 2024
24977cc
Revert "refactor: using an attribute instead of a class"
mfranzke Jul 26, 2024
2d93464
refactor: using an attribute instead of a class
mfranzke Jul 26, 2024
cfe23ee
Update textarea.lite.tsx
mfranzke Jul 26, 2024
c4f4e10
Update select.lite.tsx
mfranzke Jul 26, 2024
78d36ff
Update checkbox.lite.tsx
mfranzke Jul 26, 2024
13d8369
Update input.lite.tsx
mfranzke Jul 26, 2024
58b18eb
Update textarea.lite.tsx
mfranzke Jul 26, 2024
b669db9
Update select.lite.tsx
mfranzke Jul 26, 2024
a6f6b37
Update input.lite.tsx
mfranzke Jul 26, 2024
e024f31
Update checkbox.lite.tsx
mfranzke Jul 26, 2024
6854aad
refactor: cool dude comment
mfranzke Jul 26, 2024
8f83ed7
fix: issues with _voiceOverFallback not clearing
nmerget Jul 26, 2024
2ab0e43
fix: someone broke typescript
nmerget Jul 26, 2024
a5fbcc1
fix: issue with double valid message by adding delay fn
nmerget Jul 29, 2024
4079fc6
Merge branch 'main' into test-input-required-messages
nmerget Jul 29, 2024
ba3b88a
Merge branch 'main' into test-input-required-messages
nmerget Jul 29, 2024
d09cc10
Merge branch 'main' into test-input-required-messages
mfranzke Aug 14, 2024
705f537
chore: update sr tests
nmerget Aug 14, 2024
98b59f1
Merge branch 'main' into test-input-required-messages
nmerget Aug 14, 2024
1042df3
Merge branch 'main' into test-input-required-messages
nmerget Aug 14, 2024
6e91961
fix: issue with input typing sr test
nmerget Aug 14, 2024
888f6fa
Merge branch 'main' into test-input-required-messages
nmerget Aug 14, 2024
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 @@
["Label star, edit, required, Required, blank","T. e. s. t. TODO: Add a valid Message","Test selected","blank. Please fill out this field.. unselected","T. e. s. t. TODO: Add a valid Message"]
12 changes: 1 addition & 11 deletions showcases/screen-reader/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,7 @@ import {
type RunTestType,
type ScreenReaderTestType
} from './data';

const translations: Record<string, string[]> = {
button: ['Schalter'],
edit: ['Eingabefeld'],
'radio button': ['Auswahlschalter'],
blank: ['Leer'],
checked: ['aktiviert'],
' of ': [' von '],
clickable: ['anklickbar'],
'has auto complete': ['mit Auto Vervollständigung']
};
import { translations } from './translations';

const cleanSpeakInstructions = (phraseLog: string[]): string[] =>
phraseLog.map((phrase) =>
Expand Down
25 changes: 24 additions & 1 deletion showcases/screen-reader/tests/input.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ test.describe('DBInput', () => {
await voiceOver?.next();
}
});
// We don't test default "next" here because we will be locked inside the textarea
testDefault({
test,
title: 'should have message and label (tab)',
Expand All @@ -38,4 +37,28 @@ test.describe('DBInput', () => {
await nvda?.press('Tab');
}
});
testDefault({
test,
title: 'should inform user for changes',
url: './#/03/input?page=requirement',
async testFn(voiceOver, nvda) {
if (voiceOver) {
/* Goto desired input */
await voiceOver?.next();
await voiceOver?.next();
await voiceOver?.next();

await voiceOver?.type('Test');
await voiceOver?.press('Command+A');
await voiceOver?.press('Delete');
await voiceOver?.type('Test');
} else {
await nvda?.press('Tab');
await nvda?.type('Test');
await nvda?.press('Control+A');
await nvda?.press('Delete');
await nvda?.type('Test');
}
}
});
});
16 changes: 16 additions & 0 deletions showcases/screen-reader/translations.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export const translations: Record<string, string[]> = {
star: ['Stern'],
button: ['Schalter'],
edit: ['Eingabefeld'],
'radio button': ['Auswahlschalter'],
blank: ['Leer'],
checked: ['aktiviert'],
' of ': [' von '],
clickable: ['anklickbar'],
'has auto complete': ['mit Auto Vervollständigung'],
required: ['erforderlich'],
'Please fill out this field..': ['Fülle dieses Feld aus..'],
unselected: ['nicht ausgewählt'],
selected: ['ausgewählt'],
'': ['. Nummernblock eingeschaltet']
nmerget marked this conversation as resolved.
Show resolved Hide resolved
};