Skip to content

Commit

Permalink
fix: update view-selector test
Browse files Browse the repository at this point in the history
  • Loading branch information
roar-larsen committed Sep 29, 2023
1 parent bf084fd commit c3d1231
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions e2e/tests/plugin-view_selector-car_garage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,15 @@ 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()
await page.getByRole('tab').nth(1).click()
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()
Expand Down

0 comments on commit c3d1231

Please sign in to comment.