From 2e4aeead30b52c4425e5f30c184fc33adfb2df46 Mon Sep 17 00:00:00 2001 From: Josh W Date: Fri, 7 Apr 2023 01:42:53 +0100 Subject: [PATCH] #1645 | Added e2e test for new 'Hide Docs' touchbar button. --- packages/altair-electron/e2e/app._spec.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/altair-electron/e2e/app._spec.ts b/packages/altair-electron/e2e/app._spec.ts index c100224eeb..5e959e803a 100644 --- a/packages/altair-electron/e2e/app._spec.ts +++ b/packages/altair-electron/e2e/app._spec.ts @@ -76,6 +76,18 @@ const helpers = { return docViewer; }, + async hideDocs(window: Page) { + const hideDocs = await window.$( + `${SELECTORS.VISIBLE_WINDOW} button[track-id="hide_docs"]` + ); + await hideDocs.click(); + const docViewer = await window.$( + `${SELECTORS.VISIBLE_WINDOW} .app-doc-viewer` + ); + expect(await docViewer.isVisible()).toEqual(false); + + return docViewer; + }, async addHeader(window: Page, key: string, value: string) { const showHeaderElement = await window.$( '.side-menu-item[track-id="show_set_headers"]'