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');
|
const selector = await recorder.focusElement('input');
|
||||||
expect(selector).toBe('input[name="name"]');
|
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([
|
const [message, sources] = await Promise.all([
|
||||||
page.waitForEvent('console', msg => msg.type() !== 'error'),
|
page.waitForEvent('console', msg => msg.type() !== 'error'),
|
||||||
recorder.waitForOutput('JavaScript', 'fill'),
|
recorder.waitForOutput('JavaScript', 'fill'),
|
||||||
(async () => {
|
(async () => {
|
||||||
await inputText('て');
|
await recorder.page.dispatchEvent(selector, 'keydown', { key: 'Process' });
|
||||||
await inputText('す');
|
await recorder.page.keyboard.insertText('てすと');
|
||||||
await inputText('と');
|
await recorder.page.dispatchEvent(selector, 'keyup', { key: 'Process' });
|
||||||
})()
|
})()
|
||||||
]);
|
]);
|
||||||
expect(sources.get('JavaScript').text).toContain(`
|
expect(sources.get('JavaScript').text).toContain(`
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue