aboutsummaryrefslogtreecommitdiff
path: root/e2e/completion_set.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'e2e/completion_set.test.ts')
-rw-r--r--e2e/completion_set.test.ts47
1 files changed, 23 insertions, 24 deletions
diff --git a/e2e/completion_set.test.ts b/e2e/completion_set.test.ts
index 7e9714c..3a139fe 100644
--- a/e2e/completion_set.test.ts
+++ b/e2e/completion_set.test.ts
@@ -1,57 +1,56 @@
-import * as path from 'path';
-import * as assert from 'assert';
+import * as path from "path";
+import * as assert from "assert";
-import eventually from './eventually';
-import { Builder, Lanthan } from 'lanthan';
-import { WebDriver } from 'selenium-webdriver';
-import Page from './lib/Page';
+import eventually from "./eventually";
+import { Builder, Lanthan } from "lanthan";
+import { WebDriver } from "selenium-webdriver";
+import Page from "./lib/Page";
describe("completion on set commands", () => {
let lanthan: Lanthan;
let webdriver: WebDriver;
let page: Page;
- before(async() => {
- lanthan = await Builder
- .forBrowser('firefox')
- .spyAddon(path.join(__dirname, '..'))
+ before(async () => {
+ lanthan = await Builder.forBrowser("firefox")
+ .spyAddon(path.join(__dirname, ".."))
.build();
webdriver = lanthan.getWebDriver();
});
- after(async() => {
+ after(async () => {
if (lanthan) {
await lanthan.quit();
}
});
- beforeEach(async() => {
+ beforeEach(async () => {
page = await Page.navigateTo(webdriver, `about:blank`);
});
- it('should show all property names by "set" command with empty params', async() => {
+ it('should show all property names by "set" command with empty params', async () => {
const console = await page.showConsole();
- await console.inputKeys('set ');
+ await console.inputKeys("set ");
- await eventually(async() => {
+ await eventually(async () => {
const items = await console.getCompletions();
assert.strictEqual(items.length, 5);
- assert.deepStrictEqual(items[0], { type: 'title', text: 'Properties' });
- assert.ok(items[1].text.startsWith('hintchars'));
- assert.ok(items[2].text.startsWith('smoothscroll'));
- assert.ok(items[3].text.startsWith('nosmoothscroll'));
- assert.ok(items[4].text.startsWith('complete'))
+ assert.deepStrictEqual(items[0], { type: "title", text: "Properties" });
+ assert.ok(items[1].text.startsWith("hintchars"));
+ assert.ok(items[2].text.startsWith("smoothscroll"));
+ assert.ok(items[3].text.startsWith("nosmoothscroll"));
+ assert.ok(items[4].text.startsWith("complete"));
});
});
- it('should show filtered property names by "set" command', async() => {
+ it('should show filtered property names by "set" command', async () => {
const console = await page.showConsole();
- await console.inputKeys('set no');
+ await console.inputKeys("set no");
- await eventually(async() => {
+ await eventually(async () => {
const items = await console.getCompletions();
assert.strictEqual(items.length, 2);
- assert.ok(items[1].text.includes('nosmoothscroll'))
+ assert.ok(items[1].text.includes("nosmoothscroll"));
});
});
});