diff options
Diffstat (limited to 'e2e/lib')
-rw-r--r-- | e2e/lib/Console.ts | 6 | ||||
-rw-r--r-- | e2e/lib/JSONOptionPage.ts | 2 | ||||
-rw-r--r-- | e2e/lib/TestServer.ts | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/e2e/lib/Console.ts b/e2e/lib/Console.ts index 0bae2f7..2c128d1 100644 --- a/e2e/lib/Console.ts +++ b/e2e/lib/Console.ts @@ -62,12 +62,12 @@ export class Console { const objs = []; for (const li of Array.from(items)) { if (li.classList.contains("vimvixen-console-completion-title")) { - objs.push({ type: "title", text: li.textContent!!.trim() }); - } else if ("vimvixen-console-completion-item") { + objs.push({ type: "title", text: li.textContent!.trim() }); + } else if (li.classList.contains("vimvixen-console-completion-item")) { const highlight = li.classList.contains( "vimvixen-completion-selected" ); - objs.push({ type: "item", text: li.textContent!!.trim(), highlight }); + objs.push({ type: "item", text: li.textContent!.trim(), highlight }); } else { throw new Error(`unexpected class: ${li.className}`); } diff --git a/e2e/lib/JSONOptionPage.ts b/e2e/lib/JSONOptionPage.ts index 1c2db5b..0f2b0a7 100644 --- a/e2e/lib/JSONOptionPage.ts +++ b/e2e/lib/JSONOptionPage.ts @@ -15,7 +15,7 @@ export default class JSONOptionPage { ); await textarea.sendKeys(" "); await this.webdriver.executeScript(() => - document.querySelector("textarea")!!.blur() + document.querySelector("textarea")!.blur() ); } diff --git a/e2e/lib/TestServer.ts b/e2e/lib/TestServer.ts index e0c711b..dc86ba2 100644 --- a/e2e/lib/TestServer.ts +++ b/e2e/lib/TestServer.ts @@ -41,7 +41,7 @@ export default class TestServer { this.http = http.createServer(this.app); return new Promise((resolve) => { - this.http!!.listen(this.port, this.address, () => { + this.http!.listen(this.port, this.address, () => { resolve(); }); }); @@ -52,7 +52,7 @@ export default class TestServer { return Promise.resolve(); } return new Promise((resolve) => { - this.http!!.close(() => { + this.http!.close(() => { this.http = undefined; resolve(); }); |