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

Revert "feat(ui): split the sidebar into tools and projects (#465)" #472

Merged
merged 1 commit into from
May 6, 2024
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
5 changes: 0 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,6 @@
"type": "webview",
"id": "pw.extension.settingsView",
"name": "%views.test.pw.extension.settingsView%"
},
{
"type": "webview",
"id": "pw.extension.projectsView",
"name": "%views.test.pw.extension.projectsView%"
}
]
}
Expand Down
3 changes: 1 addition & 2 deletions package.nls.fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@
"configuration.playwright.env": "Variables d'environnement à transmettre à Playwright Test.",
"configuration.playwright.reuseBrowser": "Afficher et réutiliser le navigateur entre les tests.",
"configuration.playwright.showTrace": "Afficher les traces avec Trace Viewer.",
"views.test.pw.extension.settingsView": "Playwright",
"views.test.pw.extension.projectsView": "Projets Playwright"
"views.test.pw.extension.settingsView": "Playwright"
}
3 changes: 1 addition & 2 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@
"configuration.playwright.env": "Environment variables to pass to Playwright Test.",
"configuration.playwright.reuseBrowser": "Show & reuse browser between tests.",
"configuration.playwright.showTrace": "Show Trace Viewer.",
"views.test.pw.extension.settingsView": "Playwright",
"views.test.pw.extension.projectsView": "Playwright Projects"
"views.test.pw.extension.settingsView": "Playwright"
}
3 changes: 1 addition & 2 deletions package.nls.zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@
"configuration.playwright.env": "Playwright Test 运行环境变量",
"configuration.playwright.reuseBrowser": "在测试用例间显示并复用 Playwright 浏览器",
"configuration.playwright.showTrace": "显示 Playwright 浏览器的跟踪",
"views.test.pw.extension.settingsView": "Playwright",
"views.test.pw.extension.projectsView": "Playwright 项目"
"views.test.pw.extension.settingsView": "Playwright"
}
14 changes: 5 additions & 9 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import { WorkspaceChange, WorkspaceObserver } from './workspaceObserver';
import { TraceViewer } from './traceViewer';
import { registerTerminalLinkProvider } from './terminalLinkProvider';
import { RunHooks, TestConfig } from './playwrightTestTypes';
import { ProjectsView } from './projectsView';

const stackUtils = new StackUtils({
cwd: '/ensure_absolute_paths'
Expand Down Expand Up @@ -70,7 +69,6 @@ export class Extension implements RunHooks {
private _traceViewer: TraceViewer;
private _settingsModel: SettingsModel;
private _settingsView!: SettingsView;
private _projectsView!: ProjectsView;
private _diagnostics: vscodeTypes.DiagnosticCollection;
private _treeItemObserver: TreeItemObserver;
private _runProfile: vscodeTypes.TestRunProfile;
Expand Down Expand Up @@ -140,7 +138,6 @@ export class Extension implements RunHooks {
async activate(context: vscodeTypes.ExtensionContext) {
const vscode = this._vscode;
this._settingsView = new SettingsView(vscode, this._settingsModel, this._models, this._reusedBrowser, context.extensionUri);
this._projectsView = new ProjectsView(vscode, this._models, context.extensionUri);
const messageNoPlaywrightTestsFound = this._vscode.l10n.t('No Playwright tests found.');
this._disposables = [
this._debugHighlight,
Expand Down Expand Up @@ -188,23 +185,23 @@ export class Extension implements RunHooks {
await this._reusedBrowser.record(this._models, false);
}),
vscode.commands.registerCommand('pw.extension.command.toggleModels', async () => {
this._projectsView.toggleModels();
this._settingsView.toggleModels();
}),
vscode.commands.registerCommand('pw.extension.command.runGlobalSetup', async () => {
await this._queueGlobalHooks('setup');
this._projectsView.updateActions();
this._settingsView.updateActions();
}),
vscode.commands.registerCommand('pw.extension.command.runGlobalTeardown', async () => {
await this._queueGlobalHooks('teardown');
this._projectsView.updateActions();
this._settingsView.updateActions();
}),
vscode.commands.registerCommand('pw.extension.command.startDevServer', async () => {
await this._models.selectedModel()?.startDevServer();
this._projectsView.updateActions();
this._settingsView.updateActions();
}),
vscode.commands.registerCommand('pw.extension.command.stopDevServer', async () => {
await this._models.selectedModel()?.stopDevServer();
this._projectsView.updateActions();
this._settingsView.updateActions();
}),
vscode.commands.registerCommand('pw.extension.command.clearCache', async () => {
await this._models.selectedModel()?.clearCache();
Expand All @@ -222,7 +219,6 @@ export class Extension implements RunHooks {
this._models.onUpdated(() => this._modelsUpdated()),
this._treeItemObserver.onTreeItemSelected(item => this._treeItemSelected(item)),
this._settingsView,
this._projectsView,
this._testController,
this._runProfile,
this._debugProfile,
Expand Down
Loading
Loading