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

Commit225cf8a

Browse files
authored
chore: print page content on failed promise (#9681)
1 parentdcad0a4 commit225cf8a

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

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

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,30 @@ test("web terminal", async ({ context, page }) => {
4141
constterminal=awaitpagePromise;
4242
awaitterminal.waitForLoadState("domcontentloaded");
4343

44-
constxtermRows=awaitterminal.waitForSelector("div.xterm-rows",{
44+
awaitterminal.waitForSelector("div.xterm-rows",{
4545
state:"visible",
4646
});
4747

4848
// Ensure that we can type in it
49-
awaitterminal.keyboard.type("echo he${justabreak}llo");
49+
awaitterminal.keyboard.type("echo he${justabreak}llo123456");
5050
awaitterminal.keyboard.press("Enter");
5151

5252
// Check if "echo" command was executed
53-
awaitxtermRows.waitForSelector('div:text-matches("hello")',{
54-
state:"visible",
55-
});
53+
// try-catch is used temporarily to find the root cause: https://github.com/coder/coder/actions/runs/6176958762/job/16767089943
54+
try{
55+
awaitterminal.waitForSelector(
56+
'div.xterm-rows div:text-matches("hello123456")',
57+
{
58+
state:"visible",
59+
timeout:10*1000,
60+
},
61+
);
62+
}catch(error){
63+
constpageContent=awaitterminal.content();
64+
// eslint-disable-next-line no-console -- Let's see what is inside of xterm-rows
65+
console.log("Unable to find echoed text:",pageContent);
66+
throwerror;
67+
}
5668

5769
awaitstopAgent(agent);
5870
});

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp