Skip to content

Commit 2dad878

Browse files
committed
fmt
1 parent e28914a commit 2dad878

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
}
@@ -360,10 +360,12 @@ export class CodeServerPage {
360360
* try again.
361361
*/
362362
const navigate = async (ctx: Context) => {
363-
const steps: Array<{fn: () => Promise<unknown>, name: string}> = [{
364-
fn: () => this.page.waitForSelector(`${selector}:focus-within`),
365-
name: "focus",
366-
}]
363+
const steps: Array<{ fn: () => Promise<unknown>; name: string }> = [
364+
{
365+
fn: () => this.page.waitForSelector(`${selector}:focus-within`),
366+
name: "focus",
367+
},
368+
]
367369

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

382396
for (const step of steps) {

0 commit comments

Comments
 (0)