tldraw/apps/examples/e2e/tests/test-actions-menu.spec.ts
Taha 5db4e9a491
Adding a single E2E test per menu (#2954)
A basic test for each of the menu areas

fixes TLD-2251

- [x] `tests` — Changes to any test code only[^2]

### Release Notes

- Add a brief release note for your PR here.

---------

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2024-02-29 13:21:10 +00:00

20 lines
582 B
TypeScript

import { expect } from '@playwright/test'
import { setup } from '../shared-e2e'
import test from './fixtures/fixtures'
test.describe('actions menu', () => {
test.beforeEach(setup)
test('you can open and close the actions menu', async ({ actionsMenu }) => {
const { actionsMenuButton, actionsMenuContent } = actionsMenu
await expect(actionsMenuContent).toBeHidden()
await actionsMenuButton.click()
await expect(actionsMenuContent).toBeVisible()
await actionsMenuButton.click()
await expect(actionsMenuContent).toBeHidden()
})
// ...
// More tests here
// ...
})