Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

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

Pavel Feldman5c9e7f48e0e3
diff --git a/.gitignore b/.gitignore
index 48326773f7..d072246c44 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,3 +28,4 @@ test-results
.env
/tests/installation/output/
/tests/installation/.registry.json
+/playwright/out/
\ No newline at end of file
diff --git a/docs/src/test-components-js.md b/docs/src/test-components-js.md
index 8a81598f34..338c9a7d4f 100644
--- a/docs/src/test-components-js.md
+++ b/docs/src/test-components-js.md
@@ -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
diff --git a/packages/playwright-core/src/server/debugger.ts b/packages/playwright-core/src/server/debugger.ts
index 1a01769e3a..72f73713df 100644
--- a/packages/playwright-core/src/server/debugger.ts
+++ b/packages/playwright-core/src/server/debugger.ts
@@ -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;
diff --git a/packages/playwright-test/src/plugins/vitePlugin.ts b/packages/playwright-test/src/plugins/vitePlugin.ts
index b62169657c..74afafd2cf 100644
--- a/packages/playwright-test/src/plugins/vitePlugin.ts
+++ b/packages/playwright-test/src/plugins/vitePlugin.ts
@@ -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);
diff --git a/packages/recorder/.gitignore b/packages/recorder/.gitignore
index 038d4a927d..a547bf36d8 100644
--- a/packages/recorder/.gitignore
+++ b/packages/recorder/.gitignore
@@ -10,7 +10,6 @@ lerna-debug.log*
node_modules
dist
dist-ssr
-dist-pw
*.local
# Editor directories and files
diff --git a/packages/trace-viewer/.gitignore b/packages/trace-viewer/.gitignore
index 038d4a927d..a547bf36d8 100644
--- a/packages/trace-viewer/.gitignore
+++ b/packages/trace-viewer/.gitignore
@@ -10,7 +10,6 @@ lerna-debug.log*
node_modules
dist
dist-ssr
-dist-pw
*.local
# Editor directories and files
diff --git a/packages/web/.gitignore b/packages/web/.gitignore
index ddd79ef669..1521c8b765 100644
--- a/packages/web/.gitignore
+++ b/packages/web/.gitignore
@@ -1,2 +1 @@
dist
-dist-pw
\ No newline at end of file
diff --git a/tests/components/ct-react-vite/.gitignore b/tests/components/ct-react-vite/.gitignore
index 038d4a927d..a547bf36d8 100644
--- a/tests/components/ct-react-vite/.gitignore
+++ b/tests/components/ct-react-vite/.gitignore
@@ -10,7 +10,6 @@ lerna-debug.log*
node_modules
dist
dist-ssr
-dist-pw
*.local
# Editor directories and files
diff --git a/tests/components/ct-react/.gitignore b/tests/components/ct-react/.gitignore
index 87c000fe75..4d29575de8 100644
--- a/tests/components/ct-react/.gitignore
+++ b/tests/components/ct-react/.gitignore
@@ -11,8 +11,6 @@
# production
/build
-/dist-pw
-
# misc
.DS_Store
.env.local
diff --git a/tests/components/ct-svelte-vite/.gitignore b/tests/components/ct-svelte-vite/.gitignore
index 038d4a927d..a547bf36d8 100644
--- a/tests/components/ct-svelte-vite/.gitignore
+++ b/tests/components/ct-svelte-vite/.gitignore
@@ -10,7 +10,6 @@ lerna-debug.log*
node_modules
dist
dist-ssr
-dist-pw
*.local
# Editor directories and files
diff --git a/tests/components/ct-vue-cli/.gitignore b/tests/components/ct-vue-cli/.gitignore
index a43b8f735d..11f5d71423 100644
--- a/tests/components/ct-vue-cli/.gitignore
+++ b/tests/components/ct-vue-cli/.gitignore
@@ -1,7 +1,6 @@
.DS_Store
node_modules
/dist
-/dist-pw
# local env files
.env.local
diff --git a/tests/components/ct-vue-vite/.gitignore b/tests/components/ct-vue-vite/.gitignore
index 388034dba5..7cc64f4ee4 100644
--- a/tests/components/ct-vue-vite/.gitignore
+++ b/tests/components/ct-vue-vite/.gitignore
@@ -11,7 +11,6 @@ node_modules
.DS_Store
dist
dist-ssr
-dist-pw
coverage
*.local