aboutsummaryrefslogtreecommitdiff
path: root/e2e/completion_open.test.ts
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-12-22 11:10:36 +0900
committerGitHub <noreply@github.com>2019-12-22 11:10:36 +0900
commitb1a6f374dca078dee2406ebe049715b826e37ca2 (patch)
tree5367c48648e2018f55f12d847baba94559e10040 /e2e/completion_open.test.ts
parentb2dcdedad729ff7087867da50e20578f9fc8fb29 (diff)
parentda72c2ddd916d79d134662e3985b53a4ac78af7a (diff)
Merge pull request #690 from ueokande/eslint-and-prettier
Eslint and prettier
Diffstat (limited to 'e2e/completion_open.test.ts')
-rw-r--r--e2e/completion_open.test.ts46
1 files changed, 23 insertions, 23 deletions
diff --git a/e2e/completion_open.test.ts b/e2e/completion_open.test.ts
index ab9d191..95d4175 100644
--- a/e2e/completion_open.test.ts
+++ b/e2e/completion_open.test.ts
@@ -10,7 +10,7 @@ import Page from './lib/Page';
import SettingRepository from "./lib/SettingRepository";
describe("completion on open/tabopen/winopen commands", () => {
- let server = new TestServer().receiveContent('/*', 'ok');
+ const server = new TestServer().receiveContent('/*', 'ok');
let lanthan: Lanthan;
let webdriver: WebDriver;
let browser: any;
@@ -42,11 +42,11 @@ describe("completion on open/tabopen/winopen commands", () => {
});
it('should show completions from search engines, bookmarks, and histories by "open" command', async() => {
- let console = await page.showConsole();
+ const console = await page.showConsole();
await console.inputKeys('open ');
await eventually(async() => {
- let completions = await console.getCompletions();
+ const completions = await console.getCompletions();
assert.ok(completions.find(x => x.type === 'title' && x.text === 'Search Engines'));
assert.ok(completions.find(x => x.type === 'title' && x.text === 'Bookmarks'));
assert.ok(completions.find(x => x.type === 'title' && x.text === 'History'));
@@ -54,45 +54,45 @@ describe("completion on open/tabopen/winopen commands", () => {
});
it('should filter items with URLs by keywords on "open" command', async() => {
- let console = await page.showConsole();
+ const console = await page.showConsole();
await console.inputKeys('open https://');
await eventually(async() => {
- let completions = await console.getCompletions();
- let items = completions.filter(x => x.type === 'item').map(x => x.text);
+ const completions = await console.getCompletions();
+ const items = completions.filter(x => x.type === 'item').map(x => x.text);
assert.ok(items.every(x => x.includes('https://')));
});
});
it('should filter items with titles by keywords on "open" command', async() => {
- let console = await page.showConsole();
+ const console = await page.showConsole();
await console.inputKeys('open getting');
await eventually(async() => {
- let completions = await console.getCompletions();
- let items = completions.filter(x => x.type === 'item').map(x => x.text);
+ const completions = await console.getCompletions();
+ const items = completions.filter(x => x.type === 'item').map(x => x.text);
assert.ok(items.every(x => x.toLowerCase().includes('getting')));
});
});
it('should filter items with titles by keywords on "tabopen" command', async() => {
- let console = await page.showConsole();
+ const console = await page.showConsole();
await console.inputKeys('tabopen getting');
await eventually(async() => {
- let completions = await console.getCompletions();
- let items = completions.filter(x => x.type === 'item').map(x => x.text);
+ const completions = await console.getCompletions();
+ const items = completions.filter(x => x.type === 'item').map(x => x.text);
assert.ok(items.every(x => x.includes('https://')));
});
});
it('should filter items with titles by keywords on "winopen" command', async() => {
- let console = await page.showConsole();
+ const console = await page.showConsole();
await console.inputKeys('winopen https://');
await eventually(async() => {
- let completions = await console.getCompletions();
- let items = completions.filter(x => x.type === 'item').map(x => x.text);
+ const completions = await console.getCompletions();
+ const items = completions.filter(x => x.type === 'item').map(x => x.text);
assert.ok(items.every(x => x.includes('https://')));
});
});
@@ -106,8 +106,8 @@ describe("completion on open/tabopen/winopen commands", () => {
await console.inputKeys('open ');
await eventually(async() => {
- let completions = await console.getCompletions();
- let titles = completions.filter(x => x.type === 'title').map(x => x.text);
+ const completions = await console.getCompletions();
+ const titles = completions.filter(x => x.type === 'title').map(x => x.text);
assert.deepStrictEqual(titles, ['Search Engines', 'Bookmarks', 'History'])
});
@@ -120,8 +120,8 @@ describe("completion on open/tabopen/winopen commands", () => {
await console.inputKeys('open ');
await eventually(async() => {
- let completions = await console.getCompletions();
- let titles = completions.filter(x => x.type === 'title').map(x => x.text);
+ const completions = await console.getCompletions();
+ const titles = completions.filter(x => x.type === 'title').map(x => x.text);
assert.deepStrictEqual(titles, ['Bookmarks', 'Search Engines', 'Search Engines'])
});
});
@@ -135,8 +135,8 @@ describe("completion on open/tabopen/winopen commands", () => {
await console.inputKeys('open ');
await eventually(async() => {
- let completions = await console.getCompletions();
- let titles = completions.filter(x => x.type === 'title').map(x => x.text);
+ const completions = await console.getCompletions();
+ const titles = completions.filter(x => x.type === 'title').map(x => x.text);
assert.deepStrictEqual(titles, ['Search Engines', 'Bookmarks', 'History'])
});
@@ -151,8 +151,8 @@ describe("completion on open/tabopen/winopen commands", () => {
await console.inputKeys('open ');
await eventually(async() => {
- let completions = await console.getCompletions();
- let titles = completions.filter(x => x.type === 'title').map(x => x.text);
+ const completions = await console.getCompletions();
+ const titles = completions.filter(x => x.type === 'title').map(x => x.text);
assert.deepStrictEqual(titles, ['Bookmarks', 'Search Engines', 'Search Engines'])
});
});