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
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { defineConfig } from 'checkly'

const config = defineConfig({
projectName: 'Check Fixture',
logicalId: 'check-fixture',
checks: {
checkMatch: '**/*.check.ts',
ignoreDirectoriesMatch: [],
playwrightConfigPath: './playwright.config.ts',
playwrightChecks: [
{
logicalId: 'playwright-check-suite',
name: 'Playwright Check Suite',
}
],
},
})

export default config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "playwright-bundle-test",
"version": "1.0.0",
"dependencies": {
"@playwright/test": "^1.55.1"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineConfig } from '@playwright/test'

export default defineConfig({
// linked-tests is created as a symlink to ./shared/tests at test time. Both
// references run through the link, so the extracted bundle must contain the
// link for these spellings to resolve.
testDir: './linked-tests',
globalSetup: './linked-tests/setup.ts',
timeout: 30000,
})

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { test, expect } from '@playwright/test'

test('basic test', async ({ page }) => {
await page.goto('https://playwright.dev/')
expect(await page.title()).toContain('Playwright')
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default async function globalSetup () {
// Intentionally trivial; the test asserts where this file lands in the
// archive, not what it does.
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { defineConfig } from 'checkly'

const config = defineConfig({
projectName: 'Check Fixture',
logicalId: 'check-fixture',
checks: {
checkMatch: '**/*.check.ts',
ignoreDirectoriesMatch: [],
include: ['node_modules/**', 'helpers/**'],
playwrightConfigPath: './packages/e2e/playwright.config.ts',
playwrightChecks: [
{
logicalId: 'playwright-check-suite',
name: 'Playwright Check Suite',
}
],
},
})

export default config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "playwright-symlink-bundle-test",
"version": "1.0.0",
"dependencies": {
"@playwright/test": "^1.55.1"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { defineConfig } from '@playwright/test'

export default defineConfig({
testDir: './tests',
timeout: 30000,
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { test, expect } from '@playwright/test'

import { login } from '../helpers/login.js'

test('basic test', async ({ page }) => {
expect(login()).toBe('logged-in')
await page.goto('https://playwright.dev/')
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function login (): string {
return 'logged-in'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "@scope/shared-lib",
"version": "1.0.0",
"main": "src/index.js"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports.greeting = 'hello'

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "workspace-symlink-bundle-test",
"version": "1.0.0",
"private": true,
"dependencies": {
"@playwright/test": "^1.55.1"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { defineConfig } from 'checkly'

const config = defineConfig({
projectName: 'Check Fixture',
logicalId: 'check-fixture',
checks: {
checkMatch: '**/*.check.ts',
ignoreDirectoriesMatch: [],
// The second pattern reaches *through* the member link to an asset file the
// parser cannot see (nothing imports it) — it must land at the member's
// real path.
include: ['node_modules/**', 'node_modules/@scope/x/src/assets/**'],
playwrightConfigPath: './playwright.config.ts',
playwrightChecks: [
{
logicalId: 'playwright-check-suite',
name: 'Playwright Check Suite',
}
],
},
})

export default config
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "@scope/c",
"version": "1.0.0",
"private": true,
"dependencies": {
"@playwright/test": "^1.55.1",
"@scope/x": "workspace:*"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineConfig } from '@playwright/test'

export default defineConfig({
// A deep path through the @scope/x workspace link, which the test creates at
// run time as node_modules/@scope/x -> ../../../x. The tests themselves live
// in the linked workspace package, not in this package.
testDir: './node_modules/@scope/x/src/tests/flows',
timeout: 30000,
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "@scope/w",
"version": "1.0.0",
"private": true,
"main": "src/index.js"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function entry () {
return 'w'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "@scope/x",
"version": "1.0.0",
"private": true,
"dependencies": {
"@scope/w": "workspace:*"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"fixture":true}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function helper (): string {
return 'ok'
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Deliberately unreferenced: the member branch must not sweep this file into
// the bundle, since nothing imports it and no include pattern matches it.
export const unused = true
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { test, expect } from '@playwright/test'

import { helper } from '../../helper.js'
import { entry } from '@scope/w'

test('checkout flow', async () => {
expect(helper()).toBe('ok')
expect(entry()).toBe('w')
})

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
packages:
- "packages/*"
Loading
Loading