feat(tests): add grid render

This commit is contained in:
moklick
2019-10-07 22:03:10 +02:00
parent e146a63be8
commit 10e9777e27
2 changed files with 11 additions and 0 deletions

View File

@@ -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')

View File

@@ -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');
});