fix(debug): do not pause on internal calls, update ct docs (#14018)

This commit is contained in:
Pavel Feldman 2022-05-07 18:56:25 -08:00 committed by GitHub
parent bc9ef1c76e
commit 5c9e7f48e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 7 additions and 16 deletions

1
.gitignore vendored
View File

@ -28,3 +28,4 @@ test-results
.env
/tests/installation/output/
/tests/installation/.registry.json
/playwright/out/

View File

@ -1,6 +1,6 @@
---
id: test-components
title: "Experimental: Components"
title: "Experimental: 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.
```
#### `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`
```js
@ -88,7 +84,7 @@ test('should work', async ({ mount }) => {
### Step 3. Run the tests
```sh
npx playwright test
npm run test-ct
```
### Further reading: configure reporting, browsers, tracing

View File

@ -114,6 +114,9 @@ function shouldPauseOnCall(sdkObject: SdkObject, metadata: CallMetadata): boolea
}
function shouldPauseBeforeStep(metadata: CallMetadata): boolean {
// Don't stop on internal.
if (!metadata.apiName)
return false;
// Always stop on 'close'
if (metadata.method === 'close')
return true;

View File

@ -69,7 +69,7 @@ export function createPlugin(
},
},
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');
await build(viteConfig);

View File

@ -10,7 +10,6 @@ lerna-debug.log*
node_modules
dist
dist-ssr
dist-pw
*.local
# Editor directories and files

View File

@ -10,7 +10,6 @@ lerna-debug.log*
node_modules
dist
dist-ssr
dist-pw
*.local
# Editor directories and files

View File

@ -1,2 +1 @@
dist
dist-pw

View File

@ -10,7 +10,6 @@ lerna-debug.log*
node_modules
dist
dist-ssr
dist-pw
*.local
# Editor directories and files

View File

@ -11,8 +11,6 @@
# production
/build
/dist-pw
# misc
.DS_Store
.env.local

View File

@ -10,7 +10,6 @@ lerna-debug.log*
node_modules
dist
dist-ssr
dist-pw
*.local
# Editor directories and files

View File

@ -1,7 +1,6 @@
.DS_Store
node_modules
/dist
/dist-pw
# local env files
.env.local

View File

@ -11,7 +11,6 @@ node_modules
.DS_Store
dist
dist-ssr
dist-pw
coverage
*.local