feat(tests): add grid render
This commit is contained in:
@@ -8,6 +8,13 @@ describe('Advanced Flow Rendering', () => {
|
|||||||
cy.get('.react-flow__edge').should('have.length', 9);
|
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', () => {
|
it('connects nodes', () => {
|
||||||
cy.get('.react-flow__node')
|
cy.get('.react-flow__node')
|
||||||
.contains('1 Tests')
|
.contains('1 Tests')
|
||||||
|
|||||||
@@ -8,6 +8,10 @@ describe('Basic Flow Rendering', () => {
|
|||||||
cy.get('.react-flow__node').children('div').children('.react-flow__handle');
|
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', () => {
|
it('selects a node', () => {
|
||||||
cy.get('.react-flow__node:first').click().should('have.class', 'selected');
|
cy.get('.react-flow__node:first').click().should('have.class', 'selected');
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user