aboutsummaryrefslogtreecommitdiff
path: root/e2e
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2020-08-11 21:40:23 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2020-08-11 21:40:23 +0900
commit0b98a22eba4f7bbac215abd800293ac2be67b24d (patch)
treeae78b7edc460a79708742bff55c4c6fa55699e47 /e2e
parentf497109ecc801660dc23bbad8445b120cd75561e (diff)
Enable @typescript-eslint/no-extra-non-null-assertion
Diffstat (limited to 'e2e')
-rw-r--r--e2e/follow.test.ts4
-rw-r--r--e2e/lib/Console.ts4
-rw-r--r--e2e/lib/JSONOptionPage.ts2
-rw-r--r--e2e/lib/TestServer.ts4
-rw-r--r--e2e/mark.test.ts2
5 files changed, 8 insertions, 8 deletions
diff --git a/e2e/follow.test.ts b/e2e/follow.test.ts
index 5fb6c58..90f9a59 100644
--- a/e2e/follow.test.ts
+++ b/e2e/follow.test.ts
@@ -164,7 +164,7 @@ describe("follow test", () => {
await page.sendKeys("a");
const tagName = (await webdriver.executeScript(
- () => document.activeElement!!.tagName
+ () => document.activeElement!.tagName
)) as string;
assert.strictEqual(tagName.toLowerCase(), "input");
});
@@ -188,7 +188,7 @@ describe("follow test", () => {
await page.sendKeys("a");
const tagName = (await webdriver.executeScript(
- () => document.activeElement!!.tagName
+ () => document.activeElement!.tagName
)) as string;
assert.strictEqual(tagName.toLowerCase(), "input");
});
diff --git a/e2e/lib/Console.ts b/e2e/lib/Console.ts
index 0bae2f7..de61d66 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() });
+ objs.push({ type: "title", text: li.textContent!.trim() });
} else if ("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();
});
diff --git a/e2e/mark.test.ts b/e2e/mark.test.ts
index d7ec26c..0f09d82 100644
--- a/e2e/mark.test.ts
+++ b/e2e/mark.test.ts
@@ -86,7 +86,7 @@ describe("mark test", () => {
handles = await webdriver.getAllWindowHandles();
assert.strictEqual(handles.length, 2);
});
- await webdriver.switchTo().window(handles!![0]);
+ await webdriver.switchTo().window(handles![0]);
page = await Page.navigateTo(webdriver, server.url("/#second"));
await page.sendKeys("'", "A");