Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit85ff8e0

Browse files
authored
chore: tweak e2e test timeouts (#15275)
1 parent371a2e1 commit85ff8e0

File tree

6 files changed

+14
-10
lines changed

6 files changed

+14
-10
lines changed

‎site/e2e/helpers.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,9 @@ export const startAgentWithCommand = async (
425425
);
426426
});
427427

428-
awaitpage.getByTestId("agent-status-ready").waitFor({state:"visible"});
428+
awaitpage
429+
.getByTestId("agent-status-ready")
430+
.waitFor({state:"visible",timeout:45_000});
429431
returncp;
430432
};
431433

@@ -928,7 +930,7 @@ export async function openTerminalWindow(
928930
):Promise<Page>{
929931
// Wait for the web terminal to open in a new tab
930932
constpagePromise=context.waitForEvent("page");
931-
awaitpage.getByTestId("terminal").click();
933+
awaitpage.getByTestId("terminal").click({timeout:60_000});
932934
constterminal=awaitpagePromise;
933935
awaitterminal.waitForLoadState("domcontentloaded");
934936

‎site/e2e/playwright.config.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,12 @@ export default defineConfig({
6565
testMatch:/.*\.spec\.ts/,
6666
dependencies:["testsSetup"],
6767
use:{ storageState},
68-
timeout:50_000,
68+
timeout:30_000,
6969
},
7070
],
7171
reporter:[["./reporter.ts"]],
7272
use:{
73-
// It'd be very nice to add this, but there are some tests that need
74-
// tweaking to make it work consistently (notably, ones that wait for agent
75-
// stats on the workspace page. The default is like 50 seconds, which is
76-
// way too long and makes it painful to wait for test runs in CI.
77-
// actionTimeout: 5000, // 5 seconds
73+
actionTimeout:5000,
7874
baseURL:`http://localhost:${coderPort}`,
7975
video:"retain-on-failure",
8076
...(wsEndpoint

‎site/e2e/tests/app.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import { beforeCoderTest } from "../hooks";
1313
test.beforeEach(({ page})=>beforeCoderTest(page));
1414

1515
test("app",async({ context, page})=>{
16+
test.setTimeout(75_000);
17+
1618
constappContent="Hello World";
1719
consttoken=randomUUID();
1820
constsrv=http
@@ -56,7 +58,7 @@ test("app", async ({ context, page }) => {
5658

5759
// Wait for the web terminal to open in a new tab
5860
constpagePromise=context.waitForEvent("page");
59-
awaitpage.getByText(appName).click();
61+
awaitpage.getByText(appName).click({timeout:60_000});
6062
constapp=awaitpagePromise;
6163
awaitapp.waitForLoadState("domcontentloaded");
6264
awaitapp.getByText(appContent).isVisible();

‎site/e2e/tests/outdatedAgent.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const agentVersion = "v2.12.1";
1717
test.beforeEach(({ page})=>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.
20+
test.setTimeout(60_000);
2121

2222
consttoken=randomUUID();
2323
consttemplate=awaitcreateTemplate(page,{

‎site/e2e/tests/outdatedCLI.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ const clientVersion = "v2.8.0";
1717
test.beforeEach(({ page})=>beforeCoderTest(page));
1818

1919
test(`ssh with client${clientVersion}`,async({ page})=>{
20+
test.setTimeout(60_000);
21+
2022
consttoken=randomUUID();
2123
consttemplate=awaitcreateTemplate(page,{
2224
apply:[

‎site/e2e/tests/webTerminal.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import { beforeCoderTest } from "../hooks";
1212
test.beforeEach(({ page})=>beforeCoderTest(page));
1313

1414
test("web terminal",async({ context, page})=>{
15+
test.setTimeout(75_000);
16+
1517
consttoken=randomUUID();
1618
consttemplate=awaitcreateTemplate(page,{
1719
apply:[

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp