Created
April 13, 2020 22:38
-
-
Save daedalius/21bf9de5e43941238a736269a9f976f9 to your computer and use it in GitHub Desktop.
Cypress + Storybook. #7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('becomes hidden after being shown when showed=false passed.', () => { | |
// arrange | |
cy.window().then((win) => { | |
// initial state - popup is visible | |
ReactDOM.render( | |
<PopupTestWrapper | |
showed={true} | |
win={win} | |
/>, | |
win.document.querySelector(rootToMountSelector) | |
); | |
}); | |
// act | |
cy.then(() => { setPopupTestWrapperState(false); }) | |
// assert | |
cy | |
.get(selectors.popupWindow) | |
.should('not.be.visible'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment