aboutsummaryrefslogtreecommitdiff
path: root/e2e/command_help.test.ts
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-10-01 13:37:09 +0000
committerGitHub <noreply@github.com>2019-10-01 13:37:09 +0000
commit620d4bc03e11ae88e2162cb4acdf88b6bded50e5 (patch)
tree6d1ed59cde68ff0cb721e6ac0d3c9554a07bc2bf /e2e/command_help.test.ts
parent1afdb51feaa860c6dd0542b362925fb553eabf4c (diff)
parentcb08141a55e9f067f73f3d9c387c6af5bb05b608 (diff)
Merge pull request #649 from ueokande/help-page
Add :help command to show help page
Diffstat (limited to 'e2e/command_help.test.ts')
-rw-r--r--e2e/command_help.test.ts49
1 files changed, 49 insertions, 0 deletions
diff --git a/e2e/command_help.test.ts b/e2e/command_help.test.ts
new file mode 100644
index 0000000..9269d49
--- /dev/null
+++ b/e2e/command_help.test.ts
@@ -0,0 +1,49 @@
+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());
+ })
+
+ 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/')
+ });
+ });
+});
+