Skip to main content

@pw-codeceptjs/test

Adding dependency.

npm add -D "@pw-codeceptjs/test"

Configuration

playwright.config.ts
import { PlaywrightTestConfig, devices } from '@playwright/test'
import { CodeceptFixtureConfig } from '@pw-codeceptjs/test'

const config: PlaywrightTestConfig<CodeceptFixtureConfig> = {
testMatch: './**/*.spec.ts',
reporter: [['html']],
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
},
},
],
}

export default config

Using

*.spec.ts
import { test } from '@pw-codeceptjs/test'

test('Test name', async ({ I }) => {
await I.amOnPage('https://playwright.dev')
})