Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion x-pack/test/functional/apps/lens/drag_and_drop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
'Unique count of @message.raw [2]',
]);
});
it('should duplicate the column when dragging to empty dimension in the same group', async () => {
it('should move duplicated column to non-compatible dimension group', async () => {
await PageObjects.lens.dragDimensionToDimension(
'lnsXY_yDimensionPanel > lns-dimensionTrigger',
'lnsXY_xDimensionPanel > lns-empty-dimension'
Expand Down
17 changes: 17 additions & 0 deletions x-pack/test/functional/page_objects/lens_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont
testSubjects.getCssSelector(`lnsFieldListPanelField-${field}`),
testSubjects.getCssSelector('lnsWorkspace')
);
await this.waitForLensDragDropToFinish();
await PageObjects.header.waitUntilLoadingHasFinished();
},

Expand All @@ -183,6 +184,7 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont
testSubjects.getCssSelector(`lnsFieldListPanelField-${field}`),
testSubjects.getCssSelector('lnsGeoFieldWorkspace')
);
await this.waitForLensDragDropToFinish();
await PageObjects.header.waitUntilLoadingHasFinished();
},

Expand Down Expand Up @@ -246,6 +248,7 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont
await browser.pressKeys(reverse ? browser.keys.LEFT : browser.keys.RIGHT);
}
await browser.pressKeys(browser.keys.ENTER);
await this.waitForLensDragDropToFinish();

await PageObjects.header.waitUntilLoadingHasFinished();
},
Expand All @@ -270,6 +273,7 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont
}
await browser.pressKeys(browser.keys.ENTER);

await this.waitForLensDragDropToFinish();
await PageObjects.header.waitUntilLoadingHasFinished();
},
/**
Expand All @@ -292,9 +296,19 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont
}
await browser.pressKeys(browser.keys.ENTER);

await this.waitForLensDragDropToFinish();
await PageObjects.header.waitUntilLoadingHasFinished();
},

async waitForLensDragDropToFinish() {
await retry.try(async () => {
const exists = await find.existsByCssSelector('.lnsDragDrop-isActiveGroup');
if (exists) {
throw new Error('UI still in drag/drop mode');
}
});
},

/**
* Drags field to dimension trigger
*
Expand All @@ -306,6 +320,7 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont
testSubjects.getCssSelector(`lnsFieldListPanelField-${field}`),
testSubjects.getCssSelector(dimension)
);
await this.waitForLensDragDropToFinish();
await PageObjects.header.waitUntilLoadingHasFinished();
},

Expand All @@ -320,6 +335,7 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont
testSubjects.getCssSelector(from),
testSubjects.getCssSelector(to)
);
await this.waitForLensDragDropToFinish();
await PageObjects.header.waitUntilLoadingHasFinished();
},

Expand All @@ -333,6 +349,7 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont
const dragging = `[data-test-subj='${dimension}']:nth-of-type(${startIndex}) .lnsDragDrop`;
const dropping = `[data-test-subj='${dimension}']:nth-of-type(${endIndex}) [data-test-subj='lnsDragDrop-reorderableDropLayer'`;
await browser.html5DragAndDrop(dragging, dropping);
await this.waitForLensDragDropToFinish();
await PageObjects.header.waitUntilLoadingHasFinished();
},

Expand Down