From d3203546069725ff7377153de0a9170815023d9b Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Wed, 5 Jul 2023 12:54:04 -0700 Subject: [PATCH] possible fix for flakey ci9 test (#4450) (#4460) * possible fix for flakey ci9 test * fix syntax --------- (cherry picked from commit 1f1b333acaeb7ace1a66ee7cf7ee2bc0ebcd3591) Signed-off-by: Ashwin P Chandran Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- test/functional/apps/visualize/_area_chart.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/functional/apps/visualize/_area_chart.js b/test/functional/apps/visualize/_area_chart.js index 62fcf503a2fd..61b879b3f88c 100644 --- a/test/functional/apps/visualize/_area_chart.js +++ b/test/functional/apps/visualize/_area_chart.js @@ -523,13 +523,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'); });