diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2021-05-09 15:04:50 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2021-05-09 15:04:50 +0900 |
commit | 410189d7499886b1ac5d8e12a4fe76863cc28934 (patch) | |
tree | c0b3d9c866c7d58e4fe6db7220419d783fd906d8 /e2e | |
parent | a462f3c4d0a6c9abc152042be8cd8bb473fdfbba (diff) |
Add reader-view test
Diffstat (limited to 'e2e')
-rw-r--r-- | e2e/tab.test.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/e2e/tab.test.ts b/e2e/tab.test.ts index 49d1c03..b59c246 100644 --- a/e2e/tab.test.ts +++ b/e2e/tab.test.ts @@ -107,6 +107,20 @@ describe("tab test", () => { assert.strictEqual(current[0].pinned, true); }); + it("switches to reader view", async () => { + await browser.tabs.update(tabs[0].id, { active: true }); + const page = await Page.currentContext(webdriver); + await page.sendKeys("g", "r"); + + // Unable to switch to reader view, but an error message occurs + const console = await page.getConsole(); + const errorMessage = await console.getErrorMessage(); + assert.strictEqual( + errorMessage, + "The specified tab cannot be placed into reader mode." + ); + }); + it("selects previous tab by K", async () => { await browser.tabs.update(tabs[2].id, { active: true }); const page = await Page.currentContext(webdriver); |