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

feat: add toggle for always recreating global setup #524

Merged
merged 5 commits into from
Sep 2, 2024

Conversation

Skn0tt
Copy link
Member

@Skn0tt Skn0tt commented Aug 29, 2024

Closes microsoft/playwright#32121.

Adds an opt-in checkbox called "Don't reuse global setup". When enabled, we'll re-run global setup before every test run.

@Skn0tt Skn0tt self-assigned this Aug 29, 2024
@@ -279,6 +280,12 @@ function htmlForWebview(vscode: vscodeTypes.VSCode, extensionUri: vscodeTypes.Ur
${vscode.l10n.t('Show trace viewer')}
</label>
</div>
<div>
Copy link
Member

Choose a reason for hiding this comment

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

We should move below to the rareActions as it is unlikely that the user needs it.

src/testModel.ts Outdated Show resolved Hide resolved

if (type === 'setup') {
if (this._embedder.settingsModel.dontReuseGlobalSetup.get())
return true;
Copy link
Member

Choose a reason for hiding this comment

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

But even with the rename, I'm not sure what the sematic is. I'd say that the runGlobalSetup/runGlobalTeardown actions should be disabled when I opt into the runGlobalSetupOnEachRun engages.

Copy link
Member Author

Choose a reason for hiding this comment

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

I made them hidden instead of disabling, so we remove some more unneeded visual clutter.

Copy link
Member Author

@Skn0tt Skn0tt left a comment

Choose a reason for hiding this comment

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

addressed feedback!

@Skn0tt Skn0tt merged commit 6835805 into microsoft:main Sep 2, 2024
6 checks passed
@Skn0tt Skn0tt mentioned this pull request Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Playwright Test for VSCode not always running global setup
2 participants