You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

50 lines
1.2 KiB

import * as path from 'path';
import * as assert from 'assert';
import TestServer from './lib/TestServer';
import eventually from './eventually';
import { Builder, Lanthan } from 'lanthan';
import { WebDriver } from 'selenium-webdriver';
import Page from './lib/Page';
describe("help command test", () => {
let server = new TestServer();
let lanthan: Lanthan;
let webdriver: WebDriver;
let browser: any;
let page: Page;
before(async() => {
lanthan = await Builder
.forBrowser('firefox')
.spyAddon(path.join(__dirname, '..'))
.build();
webdriver = lanthan.getWebDriver();
browser = lanthan.getWebExtBrowser();
await server.start();
});
after(async() => {
await server.stop();
if (lanthan) {
await lanthan.quit();
}
});
beforeEach(async() => {
page = await Page.navigateTo(webdriver, server.url());
5 years ago
});
it('should open help page by help command ', async() => {
let console = await page.showConsole();
await console.execCommand('help');
await eventually(async() => {
let tabs = await browser.tabs.query({ active: true });
assert.strictEqual(tabs[0].url, 'https://ueokande.github.io/vim-vixen/')
});
});
});