From 8c5629caaa3f2568f9a4d10028f6b29efdebc72c Mon Sep 17 00:00:00 2001 From: m7kvqbe1 <48086589+m7kvqbe1@users.noreply.github.com> Date: Fri, 13 May 2022 11:10:37 +0100 Subject: [PATCH] test(ContextMenu): Run suite on iframe outside of Storybook The Storybook app currently throws some `console.errors`. These are warnings from the Emotion library. https://github.com/storybookjs/storybook/pull/17911 https://github.com/storybookjs/storybook/issues/6998 They have been working to resolve them upstream but don't appear to have caught all of them. --- .../cypress/specs/ContextMenu/index.spec.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/react-component-library/cypress/specs/ContextMenu/index.spec.ts b/packages/react-component-library/cypress/specs/ContextMenu/index.spec.ts index dfea95e91c..fede4d14db 100644 --- a/packages/react-component-library/cypress/specs/ContextMenu/index.spec.ts +++ b/packages/react-component-library/cypress/specs/ContextMenu/index.spec.ts @@ -8,9 +8,11 @@ describe('ContextMenu', () => { describe('Storybook: Docs Mode', () => { describe('the user opens the menu', () => { before(() => { - cy.visit('/iframe.html?id=context-menu--default&viewMode=docs') + cy.visit('/iframe.html?viewMode=story&id=context-menu--default') - cy.get(selectors.contextMenu.target).eq(0).rightclick() + cy.get(selectors.contextMenu.target) + .eq(0) + .rightclick({ scrollBehavior: false }) }) it('should show the Context Menu unobscured', () => {