Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e266ecf

Browse files
authored
test(site): fix flaky outdated agent test (coder#12927)
1 parent acaa254 commit e266ecf

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

site/e2e/helpers.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ export const createWorkspace = async (
6060
await fillParameters(page, richParameters, buildParameters);
6161
await page.getByTestId("form-submit").click();
6262

63-
await expect(page).toHaveURL("/@admin/" + name);
63+
// Workaround: OutdatedAgent lands at "http://localhost:3111/@admin/8d6225b7?resources=echo_dev"
64+
// and this is also a correct location.
65+
await page.waitForURL(new RegExp("/@admin/" + name));
6466

6567
await page.waitForSelector("*[data-testid='build-status'] >> text=Running", {
6668
state: "visible",

site/e2e/tests/outdatedAgent.spec.ts

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ const agentVersion = "v0.27.0";
1717
test.beforeEach(async ({ page }) => await beforeCoderTest(page));
1818

1919
test("ssh with agent " + agentVersion, async ({ page }) => {
20+
test.setTimeout(40_000); // This is a slow test, 20s may not be enough on Mac.
21+
2022
const token = randomUUID();
2123
const template = await createTemplate(page, {
2224
apply: [

0 commit comments

Comments
 (0)