Skip to content

Commit

Permalink
Improve SegmentSelectorEditor UI test dropdown interactions (#22290)
Browse files Browse the repository at this point in the history
  • Loading branch information
mneudert authored Jun 6, 2024
1 parent c2eac03 commit 9be64a5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit 9be64a5

Please sign in to comment.