Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/demo-todo-app.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-check
const { test, expect } = require('@playwright/test');
import { test, expect } from '@playwright/test';

test.beforeEach(async ({ page }) => {
await page.goto('https://demo.playwright.dev/todomvc');
Expand Down
2 changes: 1 addition & 1 deletion assets/example.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-check
const { test, expect } = require('@playwright/test');
import { test, expect } from '@playwright/test';

test('has title', async ({ page }) => {
await page.goto('https://playwright.dev/');
Expand Down
2 changes: 1 addition & 1 deletion assets/playwright-ct.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-check
const { defineConfig, devices } = require('{{ctPackageName}}');
import { defineConfig, devices } from '{{ctPackageName}}';

/**
* @see https://playwright.dev/docs/test-configuration
Expand Down
8 changes: 5 additions & 3 deletions assets/playwright.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
// @ts-check
const { defineConfig, devices } = require('@playwright/test');
import { defineConfig, devices } from '@playwright/test';

/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
// require('dotenv').config({ path: path.resolve(__dirname, '.env') });
// import dotenv from 'dotenv';
// import path from 'path';
// dotenv.config({ path: path.resolve(__dirname, '.env') });

/**
* @see https://playwright.dev/docs/test-configuration
*/
module.exports = defineConfig({
export default defineConfig({
testDir: './{{testDir}}',
/* Run tests in files in parallel */
fullyParallel: true,
Expand Down