From c3d1231191a6d93798684592f99e9fb6e21b3ba6 Mon Sep 17 00:00:00 2001 From: Roar Larsen Date: Fri, 29 Sep 2023 09:21:00 +0200 Subject: [PATCH] fix: update view-selector test --- e2e/tests/plugin-view_selector-car_garage.spec.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/e2e/tests/plugin-view_selector-car_garage.spec.ts b/e2e/tests/plugin-view_selector-car_garage.spec.ts index ec7ec4281..9443e6bc7 100644 --- a/e2e/tests/plugin-view_selector-car_garage.spec.ts +++ b/e2e/tests/plugin-view_selector-car_garage.spec.ts @@ -15,11 +15,7 @@ test('View selector - car garage', async ({ page }) => { // Collapse and expand sidebar: await page.getByRole('tab', { name: 'Self' }).click() - await page - .locator( - '.SideBarToggle__ToggleContainer-sc-1w5e44y-0 > .Button__ButtonBase-sc-1hs0myn-1' - ) - .click() //Needs improvement, PR made to EDS #3066 + await page.getByRole('button', { name: 'Collapse' }).click() await expect(page.getByRole('tab', { name: 'Self' })).not.toBeVisible() await expect(page.getByRole('tab', { name: 'Audi' })).not.toBeVisible() await expect(page.getByRole('tab', { name: 'Volvo' })).not.toBeVisible() @@ -27,11 +23,7 @@ test('View selector - car garage', async ({ page }) => { await expect(page.getByRole('tabpanel').locator('#name')).toHaveValue('Audi') await page.getByRole('tab').first().click() await expect(page.getByLabel('Name')).toHaveValue('CarGarage') - await page - .locator( - '.SideBarToggle__ToggleContainer-sc-1w5e44y-0 > .Button__ButtonBase-sc-1hs0myn-1' - ) - .click() //Needs improvement, PR made to EDS #3066 + await page.getByRole('button', { name: 'Expand' }).click() await expect(page.getByRole('tab', { name: 'Self' })).toBeVisible() await expect(page.getByRole('tab', { name: 'Audi' })).toBeVisible() await expect(page.getByRole('tab', { name: 'Volvo' })).toBeVisible()