aboutsummaryrefslogtreecommitdiff
path: root/e2e
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2020-08-12 21:01:02 +0900
committerGitHub <noreply@github.com>2020-08-12 21:01:02 +0900
commitbf6762f0c0c47a20b6a3e722711fafc6611793a9 (patch)
tree67bfdcee88c8fb2bc19277e58684dcf5d2d03be4 /e2e
parent6f7f501c699c53eb63ce5576cf2464ecf4cfe162 (diff)
parent7e8c99d43a402b9e025a710a00879d557ac5b071 (diff)
Merge pull request #798 from ueokande/eslint
Improve eslint
Diffstat (limited to 'e2e')
-rw-r--r--e2e/follow.test.ts4
-rw-r--r--e2e/lib/Console.ts6
-rw-r--r--e2e/lib/JSONOptionPage.ts2
-rw-r--r--e2e/lib/TestServer.ts4
-rw-r--r--e2e/mark.test.ts2
-rw-r--r--e2e/repeat_n_times.test.ts2
6 files changed, 9 insertions, 11 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..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();
});
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");
diff --git a/e2e/repeat_n_times.test.ts b/e2e/repeat_n_times.test.ts
index 303aa34..5a9b172 100644
--- a/e2e/repeat_n_times.test.ts
+++ b/e2e/repeat_n_times.test.ts
@@ -23,8 +23,6 @@ describe("tab test", () => {
webdriver = lanthan.getWebDriver();
browser = lanthan.getWebExtBrowser();
await server.start();
-
- browser = browser;
});
after(async () => {