Skip to content

Commit

Permalink
simplify the facet reodering and add timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
RFSH committed Aug 29, 2024
1 parent c937a4f commit a875cbc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 6 additions & 8 deletions test/e2e/specs/delete-prohibited/recordset/reorder-facet.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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);
});
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/utils/page-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit a875cbc

Please sign in to comment.