feat(elements): add isHidden option

This commit is contained in:
moklick
2020-07-15 10:31:16 +02:00
parent 084030dbb2
commit b51a25191f
12 changed files with 129 additions and 13 deletions
+30
View File
@@ -0,0 +1,30 @@
describe('Hidden Flow Rendering', () => {
it('renders the initial flow', () => {
cy.visit('/hidden');
cy.get('.react-flow__renderer');
cy.get('.react-flow__node').should('have.length', 4);
cy.get('.react-flow__edge').should('have.length', 3);
cy.get('.react-flow__minimap-node').should('have.length', 4);
});
it('toggles isHidden mode', () => {
cy.get('.react-flow__ishidden').click();
});
it('renders empty flow', () => {
cy.get('.react-flow__node').should('not.exist');
cy.get('.react-flow__edge').should('not.exist');
cy.get('.react-flow__minimap-node').should('not.exist');
});
it('toggles isHidden mode again', () => {
cy.get('.react-flow__ishidden').click();
});
it('renders initial flow', () => {
cy.get('.react-flow__node').should('have.length', 4);
cy.get('.react-flow__edge').should('have.length', 3);
cy.get('.react-flow__minimap-node').should('have.length', 4);
});
});