aboutsummaryrefslogtreecommitdiff
path: root/e2e
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2018-06-17 14:18:21 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2018-06-18 20:55:42 +0900
commit2e9574fbea4636577b0e9f33c3650d85ae85055a (patch)
tree68c572ec663fe11748a21630ae745d05baf17dac /e2e
parentef332b1738f4196d092e0946f50ef7f6a7e374dc (diff)
Implement e2e test of view-source
Diffstat (limited to 'e2e')
-rw-r--r--e2e/contents/tab.test.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/e2e/contents/tab.test.js b/e2e/contents/tab.test.js
index 2d7f548..bb6c56f 100644
--- a/e2e/contents/tab.test.js
+++ b/e2e/contents/tab.test.js
@@ -163,4 +163,22 @@ describe("tab test", () => {
let win = await windows.get(targetWindow.id);
expect(win.tabs).to.have.lengthOf(1);
});
+
+ it('opens view-source by gf', () => {
+ let target;
+ return Promise.resolve().then(() => {
+ return windows.get(targetWindow.id);
+ }).then((win) => {
+ target = win.tabs[0];
+ return keys.press(target.id, 'g');
+ }).then(() => {
+ return keys.press(target.id, 'f');
+ }).then(() => {
+ return new Promise((resolve) => setTimeout(resolve, 300));
+ }).then(() => {
+ return windows.get(targetWindow.id);
+ }).then((win) => {
+ expect(win.tabs.map((t) => t.url)).to.include.members([CLIENT_URL + '/', 'view-source:' + CLIENT_URL + '/']);
+ });
+ });
});