test: unflake 'should fill japanese text' (#16431)
This commit is contained in:
parent
ae7d767e58
commit
e911eead9b
|
|
@ -268,18 +268,13 @@ test.describe('cli codegen', () => {
|
|||
const selector = await recorder.focusElement('input');
|
||||
expect(selector).toBe('input[name="name"]');
|
||||
|
||||
async function inputText(text: string) {
|
||||
await recorder.page.dispatchEvent(selector, 'keydown', { key: 'Process' });
|
||||
await recorder.page.keyboard.insertText(text);
|
||||
await recorder.page.dispatchEvent(selector, 'keyup', { key: 'Process' });
|
||||
}
|
||||
const [message, sources] = await Promise.all([
|
||||
page.waitForEvent('console', msg => msg.type() !== 'error'),
|
||||
recorder.waitForOutput('JavaScript', 'fill'),
|
||||
(async () => {
|
||||
await inputText('て');
|
||||
await inputText('す');
|
||||
await inputText('と');
|
||||
await recorder.page.dispatchEvent(selector, 'keydown', { key: 'Process' });
|
||||
await recorder.page.keyboard.insertText('てすと');
|
||||
await recorder.page.dispatchEvent(selector, 'keyup', { key: 'Process' });
|
||||
})()
|
||||
]);
|
||||
expect(sources.get('JavaScript').text).toContain(`
|
||||
|
|
|
|||
Loading…
Reference in a new issue