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

Commita229855

Browse files
authored
test(site): e2e: improve webTerminal test (#9659)
1 parent4ebf490 commita229855

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

‎site/e2e/playwright.config.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ export default defineConfig({
3434
use:{
3535
baseURL:`http://localhost:${port}`,
3636
video:"retain-on-failure",
37+
launchOptions:{
38+
args:["--disable-webgl"],
39+
},
3740
},
3841
webServer:{
3942
url:`http://localhost:${port}/api/v2/deployment/config`,

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

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

44+
constxtermRows=awaitterminal.waitForSelector("div.xterm-rows",{
45+
state:"visible",
46+
});
47+
4448
// Ensure that we can type in it
45-
awaitterminal.keyboard.type("echohello");
49+
awaitterminal.keyboard.type("echohe${justabreak}llo");
4650
awaitterminal.keyboard.press("Enter");
4751

48-
constlocator=terminal.locator("text=hello");
52+
// Check if "echo" command was executed
53+
awaitxtermRows.waitForSelector('div:text-matches("hello")',{
54+
state:"visible",
55+
});
4956

50-
for(leti=0;i<10;i++){
51-
constitems=awaitlocator.all();
52-
// Make sure the text came back
53-
if(items.length===2){
54-
break;
55-
}
56-
awaitnewPromise((r)=>setTimeout(r,250));
57-
}
5857
awaitstopAgent(agent);
5958
});

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp