-
Notifications
You must be signed in to change notification settings - Fork 38
test(web-e2e): close the last failures — 36/36 against a local Neon stack #2511
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
Changes from all commits
9eb14aa
b732454
ddf005f
a490672
e6fe8b0
19808f1
2b684d0
a2079f8
acd5cb4
194b1da
b3696b2
44ec618
96c3783
eb4a368
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,7 +15,12 @@ export default async function setup() { | |
|
|
||
| fs.mkdirSync(path.dirname(AUTH_STATE_PATH), { recursive: true }); | ||
|
|
||
| const browser = await chromium.launch(); | ||
| // Headless by default; opt into a visible browser with PWHEADED=1. | ||
| const browser = await chromium.launch({ | ||
| channel: 'chrome', | ||
| headless: process.env.PWHEADED !== '1', | ||
| args: ['--incognito', '--no-default-browser-check', '--no-first-run', '--password-store=basic'], | ||
| }); | ||
|
Comment on lines
+19
to
+23
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure browser cleanup on setup failures. If any step throws after Proposed fix- const browser = await chromium.launch({
+ const browser = await chromium.launch({
channel: 'chrome',
headless: process.env.PWHEADED !== '1',
args: ['--incognito', '--no-default-browser-check', '--no-first-run', '--password-store=basic'],
});
- const context = await browser.newContext();
- const page = await context.newPage();
+ try {
+ const context = await browser.newContext();
+ const page = await context.newPage();
- // Start from the auth entry screen, then click through to login
- await page.goto(`${BASE_URL}/auth`, { waitUntil: 'load' });
+ // Start from the auth entry screen, then click through to login
+ await page.goto(`${BASE_URL}/auth`, { waitUntil: 'load' });
- // ... existing setup steps ...
+ // ... existing setup steps ...
- await context.storageState({ path: AUTH_STATE_PATH });
- console.log(`[globalSetup] Logged in as ${email}`);
-
- await browser.close();
+ await context.storageState({ path: AUTH_STATE_PATH });
+ console.log(`[globalSetup] Logged in as ${email}`);
+ } finally {
+ await browser.close();
+ }Also applies to: 65-65 🤖 Prompt for AI Agents |
||
| const context = await browser.newContext(); | ||
| const page = await context.newPage(); | ||
|
|
||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.