Playwright test snippets for VS Code.
The following snippets are provided by this package. If you have ideas of other snippets that would be helpful, please open an issue.
test.describe('$1', () => {
$0
})
test('$1', async ({ page }) => {
$0
})
test.beforeEach(async ({ page }) => {
$0
})
test.afterEach(async ({ page }) => {
$0
})
test.beforeAll(async ({ browser }) => {
$0
})
test.afterAll(async ({ browser }) => {
$0
})
await test.step('$1', async () => {
$0
})
test.use({ $0 })
Lariat is a Playwright page object framework that simplifies page object construction. We've included some useful Lariat snippets as part of this extension.
import Collection from 'lariat'
export class MyPage extends Collection {
$0
}
import { Page } from '@playwright/test'
import Collection from 'lariat'
export class MyPage extends Collection {
constructor(page: Page) {
super(page.locator('$1'))
}
$0
}