From 410189d7499886b1ac5d8e12a4fe76863cc28934 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sun, 9 May 2021 15:04:50 +0900 Subject: Add reader-view test --- e2e/tab.test.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'e2e') 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); -- cgit v1.2.3