Skip to content

Commit 03a03a0

Browse files
committed
fmt
1 parent 404bee3 commit 03a03a0

File tree

2 files changed

+24
-10
lines changed

2 files changed

+24
-10
lines changed

test/e2e/codeServer.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as path from "path"
21
import { promises as fs } from "fs"
2+
import * as path from "path"
33
import { describe, test, expect } from "./baseFixture"
44

55
describe("CodeServer", true, [], () => {

test/e2e/models/CodeServer.ts

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ export class CodeServerPage {
205205
/**
206206
* Navigate to a code-server endpoint. By default go to the root.
207207
*/
208-
async navigate(path: string = "/") {
208+
async navigate(path = "/") {
209209
const to = new URL(path, await this.codeServer.address())
210210
await this.page.goto(to.toString(), { waitUntil: "networkidle" })
211211
}
@@ -361,10 +361,12 @@ export class CodeServerPage {
361361
* try again.
362362
*/
363363
const navigate = async (ctx: Context) => {
364-
const steps: Array<{fn: () => Promise<unknown>, name: string}> = [{
365-
fn: () => this.page.waitForSelector(`${selector}:focus-within`),
366-
name: "focus",
367-
}]
364+
const steps: Array<{ fn: () => Promise<unknown>; name: string }> = [
365+
{
366+
fn: () => this.page.waitForSelector(`${selector}:focus-within`),
367+
name: "focus",
368+
},
369+
]
368370

369371
for (const item of items) {
370372
// Normally these will wait for the item to be visible and then execute
@@ -374,10 +376,22 @@ export class CodeServerPage {
374376
// if the old promise clicks logout before the new one can). By
375377
// splitting them into two steps each we can cancel before running the
376378
// action.
377-
steps.push({fn: () => this.page.hover(`${selector} :text("${item}")`, { trial: true }), name: `${item}:hover:trial`})
378-
steps.push({fn: () => this.page.hover(`${selector} :text("${item}")`, { force: true }), name: `${item}:hover:force`})
379-
steps.push({fn: () => this.page.click(`${selector} :text("${item}")`, { trial: true }), name: `${item}:click:trial`})
380-
steps.push({fn: () => this.page.click(`${selector} :text("${item}")`, { force: true }), name: `${item}:click:force`})
379+
steps.push({
380+
fn: () => this.page.hover(`${selector} :text("${item}")`, { trial: true }),
381+
name: `${item}:hover:trial`,
382+
})
383+
steps.push({
384+
fn: () => this.page.hover(`${selector} :text("${item}")`, { force: true }),
385+
name: `${item}:hover:force`,
386+
})
387+
steps.push({
388+
fn: () => this.page.click(`${selector} :text("${item}")`, { trial: true }),
389+
name: `${item}:click:trial`,
390+
})
391+
steps.push({
392+
fn: () => this.page.click(`${selector} :text("${item}")`, { force: true }),
393+
name: `${item}:click:force`,
394+
})
381395
}
382396

383397
for (const step of steps) {

0 commit comments

Comments
 (0)