From e365f6605b5a98e11fb549f9e9c61222b4428e3f Mon Sep 17 00:00:00 2001 From: Jake Wagoner Date: Fri, 3 May 2024 11:25:20 -0600 Subject: [PATCH] Update sort test for webkit compatibility --- e2e-tests/sort.spec.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/e2e-tests/sort.spec.ts b/e2e-tests/sort.spec.ts index 2bb5621e..23a30939 100644 --- a/e2e-tests/sort.spec.ts +++ b/e2e-tests/sort.spec.ts @@ -126,11 +126,11 @@ test('Sort by Size', async ({ page }) => { await page.goto('http://localhost:3000/?workspace=Upset+Examples&table=simpsons&sessionId=193'); /// Ascending - await page.getByText('Size', { exact: true }).click(); + await page.getByText('Size', { exact: true }).dispatchEvent('click'); await compareSortedElements(page, SIZE_ORDER.Ascending); /// Descending - await page.getByText('Size', { exact: true }).click(); + await page.getByText('Size', { exact: true }).dispatchEvent('click'); await compareSortedElements(page, SIZE_ORDER.Descending); }); @@ -162,19 +162,19 @@ test('Sort by Set Male', async ({ page }) => { await page.goto('http://localhost:3000/?workspace=Upset+Examples&table=simpsons&sessionId=193'); /// Only one option for sortOrder for sets - await page.locator('p').filter({ hasText: /^Male$/ }).click(); + await page.locator('p').filter({ hasText: /^Male$/ }).dispatchEvent('click'); await compareSortedElements(page, SET_MALE_ORDER.Alphabetical); // Sort visible sets by size, ascending // male is largest, so this should put it at the end. // This will alter the order of the sets await page.locator('p').filter({ hasText: /^Male$/ }).dispatchEvent('contextmenu'); - await page.getByRole('menuitem', { name: 'Sort Sets by Size - Ascending' }).click(); + await page.getByRole('menuitem', { name: 'Sort Sets by Size - Ascending' }).dispatchEvent('click'); await compareSortedElements(page, SET_MALE_ORDER.Ascending); await page.locator('p').filter({ hasText: /^Male$/ }).dispatchEvent('contextmenu'); - await page.getByRole('menuitem', { name: 'Sort Sets by Size - Descending' }).click(); + await page.getByRole('menuitem', { name: 'Sort Sets by Size - Descending' }).dispatchEvent('click'); await compareSortedElements(page, SET_MALE_ORDER.Descending); });