tldraw/apps/examples/e2e/tests/fixtures/fixtures.ts
Taha 7e673b5e37
E2e tests for the toolbar (#2709)
This PR adds some e2e tests for the toolbar.

Fixtures have been set up for the toolbar and style panel, and are
fairly barebones at the moment. Eventually each menu should have a
fixture associated with it, and all tests will use the class defined in
the fixtures file.

### Change Type

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

### Release Notes

- Add e2e tests for the toolbar
2024-02-16 14:15:00 +00:00

21 lines
471 B
TypeScript

import { test as base } from '@playwright/test'
import { StylePanel } from './menus/StylePanel'
import { Toolbar } from './menus/Toolbar'
type Fixtures = {
toolbar: Toolbar
stylePanel: StylePanel
}
const test = base.extend<Fixtures>({
toolbar: async ({ page }, use) => {
const toolbar = new Toolbar(page)
await use(toolbar)
},
stylePanel: async ({ page }, use) => {
const stylePanel = new StylePanel(page)
await use(stylePanel)
},
})
export default test