Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature(trace-viewer): embedded mode support PoC #483

Closed
Closed
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
9 changes: 9 additions & 0 deletions images/playwright-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion l10n/bundle.l10n.de.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"No Playwright tests found.": "Keine Playwright-Tests gefunden.",
"Pick locator": "Locator auswählen",
"Playwright Test v{0} or newer is required": "Playwright Test v{0} oder neuer ist erforderlich",
"Playwright v1.25+ is required for {0} to work, v{1} found": "Playwright v1.25+ ist erforderlich, damit {0} funktioniert, v{1} gefunden",
"Playwright v{0}+ is required for {1} to work, v{2} found": "Playwright v{0}+ ist erforderlich, damit {1} funktioniert, v{2} gefunden",
"Please install Playwright Test via running `npm i --save-dev @playwright/test`": "Bitte installieren Sie Playwright Test, indem Sie `npm i --save-dev @playwright/test` ausführen",
"Record at cursor": "An Cursor aufzeichnen",
"Record new": "Neu aufzeichnen",
Expand Down
2 changes: 1 addition & 1 deletion l10n/bundle.l10n.fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"No Playwright tests found.": "Aucun test Playwright trouvé.",
"Pick locator": "Trouver locator",
"Playwright Test v{0} or newer is required": "Playwright Test v{0} ou plus est nécessaire",
"Playwright v1.25+ is required for {0} to work, v{1} found": "Playwright v1.25+ est requis pour que {0} fonctionne, v{1} trouvée",
"Playwright v{0}+ is required for {1} to work, v{2} found": "Playwright v{0}+ est requis pour que {1} fonctionne, v{2} trouvée",
"Please install Playwright Test via running `npm i --save-dev @playwright/test`": "Veuillez installer Playwright Test en exécutant `npm i --save-dev @playwright/test`",
"Record at cursor": "Enregistrer au niveau du curseur",
"Record new": "Enregistrer nouveau",
Expand Down
8 changes: 6 additions & 2 deletions l10n/bundle.l10n.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
"Can't record while running tests": "Can't record while running tests",
"Clear cache": "Clear cache",
"Close all browsers": "Close all browsers",
"Select a trace file": "Select a trace file",
"No Playwright tests found.": "No Playwright tests found.",
"Pick locator": "Pick locator",
"Playwright Test v{0} or newer is required": "Playwright Test v{0} or newer is required",
"Playwright v1.25+ is required for {0} to work, v{1} found": "Playwright v1.25+ is required for {0} to work, v{1} found",
"Playwright v{0}+ is required for {1} to work, v{2} found": "Playwright v{0}+ is required for {1} to work, v{2} found",
"Please install Playwright Test via running `npm i --save-dev @playwright/test`": "Please install Playwright Test via running `npm i --save-dev @playwright/test`",
"Record at cursor": "Record at cursor",
"Record new": "Record new",
Expand All @@ -18,9 +19,12 @@
"Show browser mode does not work in remote vscode": "Show browser mode does not work in remote vscode",
"Show browser": "Show browser",
"Show trace viewer": "Show trace viewer",
"trace viewer": "trace viewer",
"embedded trace viewer": "embedded trace viewer",
"Embedded": "Embedded",
"Start dev server": "Start dev server",
"Stop dev server": "Stop dev server",
"this feature": "this feature",
"Toggle Playwright Configs": "Toggle Playwright Configs",
"When enabled, Playwright will reuse the browser instance between tests. This will disable parallel execution.": "When enabled, Playwright will reuse the browser instance between tests. This will disable parallel execution."
}
}
2 changes: 1 addition & 1 deletion l10n/bundle.l10n.zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"No Playwright tests found.": "没有找到 Playwright Test",
"Pick locator": "拾取选择器",
"Playwright Test v{0} or newer is required": "需要 v{0} 或以上版本的 Playwright Test",
"Playwright v1.25+ is required for {0} to work, v{1} found": "{0} 需要 Playwright v1.25 或以上的版本,当前版本 v{1}",
"Playwright v{0}+ is required for {1} to work, v{2} found": "{1} 需要 Playwright v{0} 或以上的版本,当前版本 v{2}",
"Please install Playwright Test via running `npm i --save-dev @playwright/test`": "请通过运行 `npm i --save-dev @playwright/test` 安装 Playwright Test",
"Record at cursor": "在当前光标处开始录制",
"Record new": "录制新用例",
Expand Down
29 changes: 29 additions & 0 deletions media/traceViewer.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

html, body {
height: 100%;
min-height: 100%;
padding: 0;
margin: 0;
overflow-y: hidden;
}

iframe {
width: 100%;
height: 100%;
border: none;
}
46 changes: 23 additions & 23 deletions package-lock.json

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

18 changes: 17 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@
"command": "pw.extension.toggle.showTrace",
"title": "%contributes.command.pw.extension.toggle.showTrace%"
},
{
"category": "Test",
"command": "pw.extension.toggle.embedTraceViewer",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"command": "pw.extension.toggle.embedTraceViewer",
"command": "pw.extension.toggle.embeddedTraceViewer",

"title": "%contributes.command.pw.extension.toggle.embedTraceViewer%"
},
{
"category": "Test",
"command": "pw.extension.command.runGlobalSetup",
Expand All @@ -94,6 +99,12 @@
"category": "Test",
"command": "pw.extension.command.clearCache",
"title": "%contributes.command.pw.extension.command.clearCache%"
},
{
"category": "Test",
"command": "pw.extension.command.openTrace",
"title": "%contributes.command.pw.extension.command.openTrace%",
"enablement": "config.playwright.showTrace"
}
],
"configuration": {
Expand All @@ -113,6 +124,11 @@
"type": "boolean",
"default": false,
"description": "%configuration.playwright.showTrace%"
},
"playwright.embedTraceViewer": {
"type": "boolean",
"default": false,
"description": "%configuration.playwright.embedTraceViewer%"
}
}
},
Expand Down Expand Up @@ -142,7 +158,7 @@
},
"devDependencies": {
"@babel/preset-typescript": "^7.23.2",
"@playwright/test": "^1.45.3-beta-1721669341000",
"@playwright/test": "^1.46.0-alpha-2024-07-23",
"@types/babel__core": "^7.20.3",
"@types/babel__helper-plugin-utils": "^7.10.2",
"@types/babel__traverse": "^7.20.3",
Expand Down
2 changes: 2 additions & 0 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
"contributes.command.pw.extension.command.startDevServer": "Start dev server",
"contributes.command.pw.extension.command.stopDevServer": "Stop dev server",
"contributes.command.pw.extension.command.toggleModels": "Toggle Playwright configs",
"contributes.command.pw.extension.command.openTrace": "Open Playwright trace",
"contributes.command.pw.extension.toggle.reuseBrowser": "Toggle Playwright browser reuse",
"contributes.command.pw.extension.toggle.showTrace": "Toggle Playwright Trace Viewer",
"contributes.command.pw.extension.toggle.embedTraceViewer": "Embed Playwright Trace Viewer",
"configuration.playwright.env": "Environment variables to pass to Playwright Test.",
"configuration.playwright.reuseBrowser": "Show & reuse browser between tests.",
"configuration.playwright.showTrace": "Show Trace Viewer.",
Expand Down
Loading