From 5d0f56fedb9ff63994352b60a0be2eb97598645a Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed, 5 Mar 2025 08:24:47 -0800 Subject: [PATCH] Fix e2e tests --- src-ui/e2e/document-list/document-list.spec.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src-ui/e2e/document-list/document-list.spec.ts b/src-ui/e2e/document-list/document-list.spec.ts index cd1a4c54e..52fabd597 100644 --- a/src-ui/e2e/document-list/document-list.spec.ts +++ b/src-ui/e2e/document-list/document-list.spec.ts @@ -83,10 +83,17 @@ test('date filtering', async ({ page }) => { await page.routeFromHAR(REQUESTS_HAR3, { notFound: 'fallback' }) await page.goto('/documents') await page.getByRole('button', { name: 'Dates' }).click() - await page.getByRole('menuitem', { name: 'Within 3 months' }).first().click() + await page.locator('.ng-arrow-wrapper').first().click() + await page.getByRole('option', { name: 'Within 3 months' }).click() await expect(page.locator('pngx-document-list')).toHaveText(/one document/i) - await page.getByRole('menuitem', { name: 'Within 3 months' }).first().click() - await page.getByLabel('Datesselected').getByRole('button').first().click() + await page + .locator( + 'div:nth-child(2) > .list-group .input-group .ng-select-container > .ng-arrow-wrapper' + ) + .click() + await page.getByRole('option', { name: 'Within 3 months' }).click() + await page.getByLabel('Dates selected').locator('button').first().click() + await page.getByLabel('Dates selected').locator('button').first().click() await page.getByRole('combobox', { name: 'Select month' }).selectOption('12') await page.getByRole('combobox', { name: 'Select year' }).selectOption('2022') await page.getByText('11', { exact: true }).click()