fix(debug): do not pause on internal calls, update ct docs (#14018)
This commit is contained in:
parent
bc9ef1c76e
commit
5c9e7f48e0
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -28,3 +28,4 @@ test-results
|
||||||
.env
|
.env
|
||||||
/tests/installation/output/
|
/tests/installation/output/
|
||||||
/tests/installation/.registry.json
|
/tests/installation/.registry.json
|
||||||
|
/playwright/out/
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
id: test-components
|
id: test-components
|
||||||
title: "Experimental: Components"
|
title: "Experimental: components"
|
||||||
---
|
---
|
||||||
|
|
||||||
Playwright Test can now test your components.
|
Playwright Test can now test your components.
|
||||||
|
|
@ -67,10 +67,6 @@ component is mounted using this script. It can be either `.js` or `.ts` file.
|
||||||
// Apply theme here, add anything your component needs at runtime here.
|
// Apply theme here, add anything your component needs at runtime here.
|
||||||
```
|
```
|
||||||
|
|
||||||
#### `playwright/types.d.ts`
|
|
||||||
|
|
||||||
This file makes sure `mount` fixture is typed in your tests.
|
|
||||||
|
|
||||||
### Step 2. Create a test file `src/App.spec.tsx`
|
### Step 2. Create a test file `src/App.spec.tsx`
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|
@ -88,7 +84,7 @@ test('should work', async ({ mount }) => {
|
||||||
### Step 3. Run the tests
|
### Step 3. Run the tests
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npx playwright test
|
npm run test-ct
|
||||||
```
|
```
|
||||||
|
|
||||||
### Further reading: configure reporting, browsers, tracing
|
### Further reading: configure reporting, browsers, tracing
|
||||||
|
|
|
||||||
|
|
@ -114,6 +114,9 @@ function shouldPauseOnCall(sdkObject: SdkObject, metadata: CallMetadata): boolea
|
||||||
}
|
}
|
||||||
|
|
||||||
function shouldPauseBeforeStep(metadata: CallMetadata): boolean {
|
function shouldPauseBeforeStep(metadata: CallMetadata): boolean {
|
||||||
|
// Don't stop on internal.
|
||||||
|
if (!metadata.apiName)
|
||||||
|
return false;
|
||||||
// Always stop on 'close'
|
// Always stop on 'close'
|
||||||
if (metadata.method === 'close')
|
if (metadata.method === 'close')
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ export function createPlugin(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
outDir: viteConfig?.build?.outDir || path.join(viteConfig.root, './dist-pw/')
|
outDir: viteConfig?.build?.outDir || path.join(viteConfig.root, 'playwright', 'out')
|
||||||
};
|
};
|
||||||
const { build, preview } = require('vite');
|
const { build, preview } = require('vite');
|
||||||
await build(viteConfig);
|
await build(viteConfig);
|
||||||
|
|
|
||||||
1
packages/recorder/.gitignore
vendored
1
packages/recorder/.gitignore
vendored
|
|
@ -10,7 +10,6 @@ lerna-debug.log*
|
||||||
node_modules
|
node_modules
|
||||||
dist
|
dist
|
||||||
dist-ssr
|
dist-ssr
|
||||||
dist-pw
|
|
||||||
*.local
|
*.local
|
||||||
|
|
||||||
# Editor directories and files
|
# Editor directories and files
|
||||||
|
|
|
||||||
1
packages/trace-viewer/.gitignore
vendored
1
packages/trace-viewer/.gitignore
vendored
|
|
@ -10,7 +10,6 @@ lerna-debug.log*
|
||||||
node_modules
|
node_modules
|
||||||
dist
|
dist
|
||||||
dist-ssr
|
dist-ssr
|
||||||
dist-pw
|
|
||||||
*.local
|
*.local
|
||||||
|
|
||||||
# Editor directories and files
|
# Editor directories and files
|
||||||
|
|
|
||||||
1
packages/web/.gitignore
vendored
1
packages/web/.gitignore
vendored
|
|
@ -1,2 +1 @@
|
||||||
dist
|
dist
|
||||||
dist-pw
|
|
||||||
1
tests/components/ct-react-vite/.gitignore
vendored
1
tests/components/ct-react-vite/.gitignore
vendored
|
|
@ -10,7 +10,6 @@ lerna-debug.log*
|
||||||
node_modules
|
node_modules
|
||||||
dist
|
dist
|
||||||
dist-ssr
|
dist-ssr
|
||||||
dist-pw
|
|
||||||
*.local
|
*.local
|
||||||
|
|
||||||
# Editor directories and files
|
# Editor directories and files
|
||||||
|
|
|
||||||
2
tests/components/ct-react/.gitignore
vendored
2
tests/components/ct-react/.gitignore
vendored
|
|
@ -11,8 +11,6 @@
|
||||||
# production
|
# production
|
||||||
/build
|
/build
|
||||||
|
|
||||||
/dist-pw
|
|
||||||
|
|
||||||
# misc
|
# misc
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.env.local
|
.env.local
|
||||||
|
|
|
||||||
1
tests/components/ct-svelte-vite/.gitignore
vendored
1
tests/components/ct-svelte-vite/.gitignore
vendored
|
|
@ -10,7 +10,6 @@ lerna-debug.log*
|
||||||
node_modules
|
node_modules
|
||||||
dist
|
dist
|
||||||
dist-ssr
|
dist-ssr
|
||||||
dist-pw
|
|
||||||
*.local
|
*.local
|
||||||
|
|
||||||
# Editor directories and files
|
# Editor directories and files
|
||||||
|
|
|
||||||
1
tests/components/ct-vue-cli/.gitignore
vendored
1
tests/components/ct-vue-cli/.gitignore
vendored
|
|
@ -1,7 +1,6 @@
|
||||||
.DS_Store
|
.DS_Store
|
||||||
node_modules
|
node_modules
|
||||||
/dist
|
/dist
|
||||||
/dist-pw
|
|
||||||
|
|
||||||
# local env files
|
# local env files
|
||||||
.env.local
|
.env.local
|
||||||
|
|
|
||||||
1
tests/components/ct-vue-vite/.gitignore
vendored
1
tests/components/ct-vue-vite/.gitignore
vendored
|
|
@ -11,7 +11,6 @@ node_modules
|
||||||
.DS_Store
|
.DS_Store
|
||||||
dist
|
dist
|
||||||
dist-ssr
|
dist-ssr
|
||||||
dist-pw
|
|
||||||
coverage
|
coverage
|
||||||
*.local
|
*.local
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue