Skip to content

Commit

Permalink
possible fix for flakey ci9 test
Browse files Browse the repository at this point in the history
Signed-off-by: Ashwin P Chandran <[email protected]>
  • Loading branch information
ashwin-pc committed Jun 30, 2023
1 parent 63b66f9 commit 1d4d4ba
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions test/functional/apps/visualize/_area_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -521,14 +521,16 @@ 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'
);
let errorMessage = await intervalErrorMessage.getVisibleText();
const intervalErrorMessageSelector =
'[data-test-subj="visEditorInterval"] + .euiFormErrorText';

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

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

0 comments on commit 1d4d4ba

Please sign in to comment.