From 1d4d4bab92761f4ed55518351cef99783e01d135 Mon Sep 17 00:00:00 2001 From: Ashwin P Chandran Date: Fri, 30 Jun 2023 01:27:03 +0000 Subject: [PATCH] possible fix for flakey ci9 test Signed-off-by: Ashwin P Chandran --- test/functional/apps/visualize/_area_chart.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/functional/apps/visualize/_area_chart.js b/test/functional/apps/visualize/_area_chart.js index 86fdb1879b7e..e292e6c82d78 100644 --- a/test/functional/apps/visualize/_area_chart.js +++ b/test/functional/apps/visualize/_area_chart.js @@ -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'); }); });