Skip to content

Commit

Permalink
test: remove cypress test for faq item expansion
Browse files Browse the repository at this point in the history
  • Loading branch information
s-pic committed May 3, 2020
1 parent f92621e commit ec9b9c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/pages/Reports/pages/Landing/components/Faq/FaqItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const CollapsibleWrapper = styled.div`
`;

const FaqItem = ({ heading, text, open }) => (
<CollapsibleWrapper data-cy="reports-landing-faq-item">
<CollapsibleWrapper>
<Collapsible trigger={heading} open={open}>
<StyledText dangerouslySetInnerHTML={{ __html: text }} />
</Collapsible>
Expand Down
23 changes: 1 addition & 22 deletions src/pages/Reports/tests/landing.e2e.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,5 @@ describe('The reports landing page', () => {
.click()
.then(() => cy.url().should('be', '**/karte'));
cy.visit(config.routes.reports.landing);
});
describe('an FAQ item', () => {
it('extends when clicked', () => {
cyElem('reports-landing-faq-item').within(() => {
cy.get('.Collapsible__contentInner').should('not.be.visible');
});
cyElem('reports-landing-faq-item')
.should('be.visible')
.first()
.scrollIntoView()
.click();
cyElem('reports-landing-faq-item').within(() => {
cy.get('.Collapsible__contentInner').should('be.visible');
});
});
it('collapses when clicked again', () => {
cyElem('reports-landing-faq-item')
.first()
.click();
cyElem('reports-landing-faq-contents').should('not.be.visible');
});
});
});;
});

0 comments on commit ec9b9c4

Please sign in to comment.