backport stabilization fix (#118311)

This commit is contained in:
Joe Reuter 2021-11-11 20:46:18 +01:00 committed by GitHub
parent 3e90fbc36d
commit 570556b65a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,7 +37,12 @@ export class FieldEditorService extends FtrService {
const textarea = await editor.findByClassName('monaco-mouse-cursor-text');
await textarea.click();
await this.browser.pressKeys(script);
// To avoid issue with the timing needed for Selenium to write the script and the monaco editor
// syntax validation kicking in, we loop through all the chars of the script and enter
// them one by one (instead of calling "await this.browser.pressKeys(script);").
for (const letter of script.split('')) {
await this.browser.pressKeys(letter);
}
}
public async save() {
await this.testSubjects.click('fieldSaveButton');