From a875cbcf700e0dd11076e0380303055fd4a0f062 Mon Sep 17 00:00:00 2001 From: Aref Shafaei Date: Wed, 28 Aug 2024 17:22:03 -0700 Subject: [PATCH] simplify the facet reodering and add timeout --- .../recordset/reorder-facet.spec.ts | 14 ++++++-------- test/e2e/utils/page-utils.ts | 2 ++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/e2e/specs/delete-prohibited/recordset/reorder-facet.spec.ts b/test/e2e/specs/delete-prohibited/recordset/reorder-facet.spec.ts index 3360d69a0..88c99c1d3 100644 --- a/test/e2e/specs/delete-prohibited/recordset/reorder-facet.spec.ts +++ b/test/e2e/specs/delete-prohibited/recordset/reorder-facet.spec.ts @@ -30,11 +30,11 @@ const testParams = { * this order is generated by pausing the page after the moveFacet function calls and looking at the UI. */ facetNamesAfterReorder: [ - 'int_col', 'id', 'jsonb_col', 'timestamp_col', 'float_col', 'text_col', - 'longtext_col', 'markdown_col', 'boolean_col', 'F1', 'date_col', - 'f3 (term)', 'from_name', 'F1 with Term', 'Check Presence Text', - 'F3 Entity', 'to_name', 'F5 with filter', 'Outbound1 (using F1)', - 'col_w_column_order_false', 'col_w_column_order', 'col_w_long_values', 'F5' + 'int_col', 'id', 'timestamp_col', 'float_col', 'date_col', 'text_col', + 'longtext_col', 'markdown_col', 'boolean_col', 'jsonb_col', 'F1', + 'f3 (term)', 'from_name', 'to_name', 'F1 with Term', 'F5', 'Check Presence Text', + 'F3 Entity', 'F5 with filter', 'Outbound1 (using F1)', + 'col_w_column_order_false', 'col_w_column_order', 'col_w_long_values', ] }, savedStateWInvalids: { @@ -165,10 +165,8 @@ test.describe('Facet reorder feature', () => { // move facets around await moveFacet(page, 0, 2); await moveFacet(page, 4, 2); - await moveFacet(page, 9, 1); - await moveFacet(page, 3, 7); await moveFacet(page, 11, 14); - await moveFacet(page, 17, 22); + await moveFacet(page, 17, 15); await testDisplayedFacets(page, testParams.initialState.facetNamesAfterReorder); }); diff --git a/test/e2e/utils/page-utils.ts b/test/e2e/utils/page-utils.ts index 25d3d9b39..d127115c8 100644 --- a/test/e2e/utils/page-utils.ts +++ b/test/e2e/utils/page-utils.ts @@ -246,8 +246,10 @@ export async function dragAndDropWithScroll(page: Page, draggable: Locator, drop await page.mouse.down(); await droppable.scrollIntoViewIfNeeded(); + await page.waitForTimeout(100); await page.mouse.move(box.x + box.width / 2, box.y + box.height / 2, { steps: 5, }); await page.mouse.up(); + await page.waitForTimeout(100); }