Fixes flaky ViewLayoutCollapse test (#1027)

This fixes the flaky test in "ViewLayoutCollapse.ts": "fix: should not dispose the instance when drag is cancelled".

The 'mouseenter' event wasn't consistently triggering properly on the drop target (LayoutEditor.ts - line 342) when the mouse was moved onto it.

The change simulates a "drag" over the drop target, moving the mouse into multiple positions over it, seemingly fixing the problem.
This commit is contained in:
Spoffy 2024-06-10 21:39:57 +01:00 committed by GitHub
parent caa1acdd0d
commit e00c7f7d2b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -311,7 +311,9 @@ describe("ViewLayoutCollapse", function() {
// Move back and drop. // Move back and drop.
await gu.getSection(COMPANIES_CHART).getRect(); await gu.getSection(COMPANIES_CHART).getRect();
await move(getDragElement(COMPANIES_CHART)); await move(getDragElement(COMPANIES_CHART), {x : 50});
await driver.sleep(100);
await move(getDragElement(COMPANIES_CHART), {x : 100});
await driver.sleep(100); await driver.sleep(100);
await move(getDragElement(COMPANIES_CHART), {x : 200}); await move(getDragElement(COMPANIES_CHART), {x : 200});
await gu.waitToPass(async () => { await gu.waitToPass(async () => {