Skip to content

Commit

Permalink
possible fix for flakey ci9 test (#4450)
Browse files Browse the repository at this point in the history
* possible fix for flakey ci9 test

Signed-off-by: Ashwin P Chandran <[email protected]>

* fix syntax

Signed-off-by: Ashwin P Chandran <[email protected]>

---------

Signed-off-by: Ashwin P Chandran <[email protected]>
  • Loading branch information
ashwin-pc authored Jun 30, 2023
1 parent 63b66f9 commit 1f1b333
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/functional/apps/visualize/_area_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -521,13 +521,15 @@ export default function ({ getService, getPageObjects }) {

it('should show error when calendar interval invalid', async () => {
await PageObjects.visEditor.setInterval('14d', { type: 'custom' });
const intervalErrorMessage = await find.byCssSelector(
'[data-test-subj="visEditorInterval"] + .euiFormErrorText'
);
const intervalErrorMessageSelector =
'[data-test-subj="visEditorInterval"] + .euiFormErrorText';

let intervalErrorMessage = await find.byCssSelector(intervalErrorMessageSelector);
let errorMessage = await intervalErrorMessage.getVisibleText();
expect(errorMessage).to.be('Invalid calendar interval: 2w, value must be 1');

await PageObjects.visEditor.setInterval('3w', { type: 'custom' });
intervalErrorMessage = await find.byCssSelector(intervalErrorMessageSelector);
errorMessage = await intervalErrorMessage.getVisibleText();
expect(errorMessage).to.be('Invalid calendar interval: 3w, value must be 1');
});
Expand Down

0 comments on commit 1f1b333

Please sign in to comment.