Skip to content

Commit

Permalink
Use retry instead of sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
nickpeihl committed Nov 29, 2022
1 parent 17e51c6 commit 7373d63
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions x-pack/test/functional/apps/canvas/expression.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ export default function canvasExpressionTest({ getService, getPageObjects }: Ftr
// type the new text
const newMd = `${oldMd} and this is a test`;
await monacoEditor.setCodeEditorValue(newMd, 0);
await PageObjects.common.sleep(300);

// make sure the open expression editor also has the changes
const editorText = await monacoEditor.getCodeEditorValue(1);
expect(editorText).to.contain('Orange: Timelion, Server function and this is a test');

await retry.try(async () => {
const editorText = await monacoEditor.getCodeEditorValue(1);
expect(editorText).to.contain('Orange: Timelion, Server function and this is a test');
});
// reset the markdown
await monacoEditor.setCodeEditorValue(oldMd, 0);
});
Expand Down

0 comments on commit 7373d63

Please sign in to comment.