Skip to content

Commit

Permalink
make tabs exact
Browse files Browse the repository at this point in the history
  • Loading branch information
scottbell committed Jan 11, 2024
1 parent 1f34ab5 commit e64bafe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions e2e/tests/functional/plugins/tabs/tabs.e2e.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ test.describe('Tabs View', () => {
page.goto(tabsView.url);

// select first tab
await page.getByLabel(`${table.name} tab`).click();
await page.getByLabel(`${table.name} tab`, { exact: true }).click();
// ensure table header visible
await expect(page.getByRole('searchbox', { name: 'message filter input' })).toBeVisible();

// no canvas (i.e., sine wave generator) in the document should be visible
await expect(page.locator('canvas')).toBeHidden();

// select second tab
await page.getByLabel(`${notebook.name} tab`).click();
await page.getByLabel(`${notebook.name} tab`, { exact: true }).click();

// ensure notebook visible
await expect(page.locator('.c-notebook__drag-area')).toBeVisible();
Expand All @@ -67,7 +67,7 @@ test.describe('Tabs View', () => {
await expect(page.locator('canvas')).toBeHidden();

// select third tab
await page.getByLabel(`${sineWaveGenerator.name} tab`).click();
await page.getByLabel(`${sineWaveGenerator.name} tab`, { exact: true }).click();

// expect sine wave generator visible
await expect(page.locator('.c-plot')).toBeVisible();
Expand All @@ -78,7 +78,7 @@ test.describe('Tabs View', () => {
await expect(page.locator('canvas').nth(1)).toBeVisible();

// now try to select the first tab again
await page.getByLabel(`${table.name} tab`).click();
await page.getByLabel(`${table.name} tab`, { exact: true }).click();
// ensure table header visible
await expect(page.getByRole('searchbox', { name: 'message filter input' })).toBeVisible();

Expand Down

0 comments on commit e64bafe

Please sign in to comment.