test(site): fix flaky outdated agent test (#12927)

This commit is contained in:
Marcin Tojek 2024-04-10 16:09:44 +02:00 committed by GitHub
parent acaa254099
commit e266ecf91b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -60,7 +60,9 @@ export const createWorkspace = async (
await fillParameters(page, richParameters, buildParameters);
await page.getByTestId("form-submit").click();
await expect(page).toHaveURL("/@admin/" + name);
// Workaround: OutdatedAgent lands at "http://localhost:3111/@admin/8d6225b7?resources=echo_dev"
// and this is also a correct location.
await page.waitForURL(new RegExp("/@admin/" + name));
await page.waitForSelector("*[data-testid='build-status'] >> text=Running", {
state: "visible",

View File

@ -17,6 +17,8 @@ const agentVersion = "v0.27.0";
test.beforeEach(async ({ page }) => await beforeCoderTest(page));
test("ssh with agent " + agentVersion, async ({ page }) => {
test.setTimeout(40_000); // This is a slow test, 20s may not be enough on Mac.
const token = randomUUID();
const template = await createTemplate(page, {
apply: [