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

test(site): e2e: improve webTerminal test#9659

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mtojek merged 4 commits intomainfromfix-e2e-web-terminal
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletionssite/e2e/playwright.config.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -34,6 +34,9 @@ export default defineConfig({
use: {
baseURL: `http://localhost:${port}`,
video: "retain-on-failure",
launchOptions: {
args: ["--disable-webgl"],
},
},
webServer: {
url: `http://localhost:${port}/api/v2/deployment/config`,
Expand Down
19 changes: 9 additions & 10 deletionssite/e2e/tests/webTerminal.spec.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -41,19 +41,18 @@ test("web terminal", async ({ context, page }) => {
const terminal = await pagePromise;
await terminal.waitForLoadState("domcontentloaded");

const xtermRows = await terminal.waitForSelector("div.xterm-rows", {
state: "visible",
});

// Ensure that we can type in it
await terminal.keyboard.type("echohello");
await terminal.keyboard.type("echohe${justabreak}llo");
await terminal.keyboard.press("Enter");

const locator = terminal.locator("text=hello");
// Check if "echo" command was executed
await xtermRows.waitForSelector('div:text-matches("hello")', {
state: "visible",
});

for (let i = 0; i < 10; i++) {
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

for reviewers: once this loop is over, and no items have been located, nothing happens even though the test should fail

const items = await locator.all();
// Make sure the text came back
if (items.length === 2) {
break;
}
await new Promise((r) => setTimeout(r, 250));
}
await stopAgent(agent);
});

[8]ページ先頭

©2009-2025 Movatter.jp