diff --git a/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js b/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js index 3e7ff270250..6cff1d92e43 100644 --- a/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js +++ b/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js @@ -18,7 +18,14 @@ describe("SegmentSelectorEditorTest", function () { async function selectFieldValue(fieldName, textToSelect) { await (await page.jQuery(fieldName + ' input.select-dropdown', { waitFor: true })).click(); + + // wait for animation + await page.waitForTimeout(200); + await (await page.jQuery(fieldName + ' .dropdown-content li:contains("' + textToSelect + '"):first', { waitFor: true })).click(); + + // wait for animation + await page.waitForTimeout(300); await page.mouse.move(-10, -10); } @@ -150,7 +157,7 @@ describe("SegmentSelectorEditorTest", function () { expect(await page.screenshotSelector(selectorsToCapture)).to.matchImage('saved_details'); }); - it("should correctly should show a confirmation when changing segment definition", async function() { + it("should correctly show a confirmation when changing segment definition", async function() { await page.click('.segmentEditorPanel .editSegmentName'); await page.$eval('.segmentEditorPanel .segmentRow0 .ui-autocomplete-input', e => e.blur());