Skip to content

Commit

Permalink
feat(tests): add grid render
Browse files Browse the repository at this point in the history
  • Loading branch information
moklick committed Oct 7, 2019
1 parent e146a63 commit 10e9777
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cypress/integration/flow/advanced.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ describe('Advanced Flow Rendering', () => {
cy.get('.react-flow__edge').should('have.length', 9);
});

it('renders a grid', () => {
cy.get('.react-flow__grid');

const gridStroke = Cypress.$('.react-flow__grid path').attr('stroke');
expect(gridStroke).to.equal('#aaa');
});

it('connects nodes', () => {
cy.get('.react-flow__node')
.contains('1 Tests')
Expand Down
4 changes: 4 additions & 0 deletions cypress/integration/flow/basic.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ describe('Basic Flow Rendering', () => {
cy.get('.react-flow__node').children('div').children('.react-flow__handle');
});

it('does not render a grid', () => {
cy.get('.react-flow__grid').should('not.exist');
});

it('selects a node', () => {
cy.get('.react-flow__node:first').click().should('have.class', 'selected');
});
Expand Down

0 comments on commit 10e9777

Please sign in to comment.