Skip to content

Commit

Permalink
fix: issue with input typing sr test
Browse files Browse the repository at this point in the history
  • Loading branch information
nmerget committed Aug 14, 2024
1 parent 1042df3 commit 6e91961
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion showcases/screen-reader/tests/input.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NVDAKeyCodeCommands } from '@guidepup/guidepup';
import { getTest, testDefault } from '../default';
import { generateSnapshot, getTest, testDefault } from '../default';

const test = getTest();
test.describe('DBInput', () => {
Expand Down Expand Up @@ -62,6 +62,18 @@ test.describe('DBInput', () => {
await nvda?.press('Delete');
await nvda?.type('Test');
}
},
async postTestFn(voiceOver, nvda, retry) {
if (nvda) {
await generateSnapshot(nvda, retry);
} else if (voiceOver) {
/*
* There is a timing issue for macOS for typing in input we clean the result
*/
await generateSnapshot(nvda, retry, (phraseLog) =>
phraseLog.map((log) => log.replace('t. ', ''))
);
}
}
});
});

0 comments on commit 6e91961

Please sign in to comment.