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

Commit63956ea

Browse files
authored
chore: turn e2e tests back on with fixes (#5719)
* Improvement - wip* Cut out extra waits, increase timeouts* Fix timeout syntax* Extend timeouts for safety* Turn e2e back on* Format
1 parent7f5dcc3 commit63956ea

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

‎.github/workflows/coder.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ jobs:
575575
name:"test/e2e/${{ matrix.os }}"
576576
needs:
577577
-changes
578-
if:false#needs.changes.outputs.docs-only == 'false'
578+
if:needs.changes.outputs.docs-only == 'false'
579579
runs-on:${{ matrix.os }}
580580
timeout-minutes:20
581581
strategy:

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

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
import{test}from"@playwright/test"
1+
import{test,expect}from"@playwright/test"
22
import{email,password}from"../constants"
33
import{SignInPage}from"../pom"
44
import{clickButton,buttons,fillInput}from"../helpers"
5+
importdayjsfrom"dayjs"
56

67
test("Basic flow",async({ baseURL, page})=>{
78
// We're keeping entire flows in one test, which means the test needs extra time.
8-
test.setTimeout(120000)
9+
test.setTimeout(5*60*1000)
910
awaitpage.goto(baseURL+"/",{waitUntil:"networkidle"})
1011

1112
// Log-in with the default credentials we set up in the development server
1213
constsignInPage=newSignInPage(baseURL,page)
1314
awaitsignInPage.submitBuiltInAuthentication(email,password)
1415

1516
// create Docker template
16-
awaitpage.waitForSelector("text=Templates")
1717
awaitpage.click("text=Templates")
1818

1919
awaitclickButton(page,buttons.starterTemplates)
@@ -27,15 +27,22 @@ test("Basic flow", async ({ baseURL, page }) => {
2727
// create workspace
2828
awaitclickButton(page,buttons.createWorkspace)
2929

30-
awaitfillInput(page,"Workspace Name","my-workspace")
30+
// give workspace a unique name to avoid failure
31+
awaitfillInput(
32+
page,
33+
"Workspace Name",
34+
`workspace-${dayjs().format("MM-DD-hh-mm-ss")}`,
35+
)
3136
awaitclickButton(page,buttons.submitCreateWorkspace)
3237

3338
// stop workspace
34-
awaitpage.waitForSelector("text=Started")
3539
awaitclickButton(page,buttons.stopWorkspace)
3640

3741
// start workspace
38-
awaitpage.waitForSelector("text=Stopped")
3942
awaitclickButton(page,buttons.startWorkspace)
40-
awaitpage.waitForSelector("text=Started")
43+
conststopButton=page.getByRole("button",{
44+
name:buttons.stopWorkspace,
45+
exact:true,
46+
})
47+
awaitexpect(stopButton).toBeEnabled({timeout:60_000})
4148
})

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp