aboutsummaryrefslogtreecommitdiff
path: root/e2e/zoom.test.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-09-29 01:06:01 +0000
committerGitHub <noreply@github.com>2019-09-29 01:06:01 +0000
commit4f4396d0a69d33541844e723cad033b0a927333b (patch)
treef3a75c0b41d8fe2b1e6ca730501e36cee5701705 /e2e/zoom.test.js
parent0fc2eea7431649f85c6e5d57cca66457f24bb14d (diff)
parent9f0bc5732823505c91ce6b5ba3aa8e4b60ac93f6 (diff)
Merge pull request #648 from ueokande/migrate-to-latest-lanthan
Clean E2E tests
Diffstat (limited to 'e2e/zoom.test.js')
-rw-r--r--e2e/zoom.test.js66
1 files changed, 0 insertions, 66 deletions
diff --git a/e2e/zoom.test.js b/e2e/zoom.test.js
deleted file mode 100644
index 186f67f..0000000
--- a/e2e/zoom.test.js
+++ /dev/null
@@ -1,66 +0,0 @@
-const express = require('express');
-const lanthan = require('lanthan');
-const path = require('path');
-const assert = require('assert');
-const eventually = require('./eventually');
-
-const Key = lanthan.Key;
-
-describe("zoom test", () => {
-
- let firefox;
- let session;
- let browser;
- let tab;
- let body;
-
- before(async() => {
- firefox = await lanthan.firefox();
- await firefox.session.installAddonFromPath(path.join(__dirname, '..'));
- session = firefox.session;
- browser = firefox.browser;
- tab = (await browser.tabs.query({}))[0]
- });
-
- after(async() => {
- if (firefox) {
- await firefox.close();
- }
- });
-
- beforeEach(async() => {
- await session.navigateTo('about:blank');
- body = await session.findElementByCSS('body');
- });
-
- it('should zoom in by zi', async () => {
- let before = await browser.tabs.getZoom(tab.id);
- await body.sendKeys('z', 'i');
-
- await eventually(async() => {
- let actual = await browser.tabs.getZoom(tab.id);
- assert(before < actual);
- });
- });
-
- it('should zoom out by zo', async () => {
- let before = await browser.tabs.getZoom(tab.id);
- await body.sendKeys('z', 'o');
-
- await eventually(async() => {
- let actual = await browser.tabs.getZoom(tab.id);
- assert(before > actual);
- });
- });
-
- it('scrolls left by h', async () => {
- await browser.tabs.setZoom(tab.id, 2);
- await body.sendKeys('z', 'z');
-
- await eventually(async() => {
- let actual = await browser.tabs.getZoom(tab.id);
- assert(actual === 1);
- });
- });
-});
-