Skip to content

Commit f7d9cad

Browse files
committed
fix(e2e): navigate to step 2 after reload in sensitive envvars test
After page.reload(), the session launcher may restore to step 1 where envvars Form.List fields are not rendered. Explicitly click the "Environments & Resource" step button and increase the toHaveValue timeout to allow form restoration from query params.
1 parent 81dd684 commit f7d9cad

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

e2e/session/session-creation.spec.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -273,11 +273,18 @@ test.describe(
273273
});
274274

275275
await page.reload();
276-
// Wait for the envvars Form.List to be restored from query params before
277-
// checking validation. The page reload triggers chunk load + form mount +
278-
// query-param restoration + validateFields(); without an explicit wait
279-
// for the restored field, the help-text assertion races the form mount.
280-
await expect(page.locator('#envvars_1_variable')).toHaveValue('password');
276+
// After reload, ensure we're on the Environments & Resource step where
277+
// envvars are rendered. The page may restore to step 1 first.
278+
await page
279+
.getByRole('button', { name: '2 Environments & Resource' })
280+
.click();
281+
// Wait for the envvars Form.List to be restored from query params.
282+
await expect(page.locator('#envvars_1_variable')).toHaveValue(
283+
'password',
284+
{
285+
timeout: 10_000,
286+
},
287+
);
281288
await expect(page.locator('#envvars_2_variable')).toHaveValue('api_key');
282289
// Sensitive values are cleared on restore. Trigger onBlur validation
283290
// explicitly so the required-field message is rendered deterministically

0 commit comments

Comments
 (0)