-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathdocs-popover.e2e.ts
28 lines (23 loc) · 1017 Bytes
/
docs-popover.e2e.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
*
* Copyright Oxide Computer Company
*/
import { expect, test } from './utils'
test('Show / hide contextual help docs links', async ({ page }) => {
const learnAbout = page.getByText('Learn about disks')
const managingDisksLink = page.getByRole('link', { name: 'Disks and Snapshots' })
await page.goto('/projects/mock-project/disks')
await expect(learnAbout).toBeHidden()
await expect(managingDisksLink).toBeHidden()
// open the contextual help docs links
await page.getByLabel('Links to docs').click()
await expect(learnAbout).toBeVisible()
await expect(managingDisksLink).toBeVisible()
// close the contextual help docs links and verify they're hidden
await page.getByRole('table').click()
await expect(learnAbout).toBeHidden()
await expect(managingDisksLink).toBeHidden()
})