refactor(examples): rename Advanced to CustomNodes, use func component
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
describe('Basic Flow Rendering', () => {
|
||||
describe('Basic Graph Rendering', () => {
|
||||
it('renders a flow with three nodes', () => {
|
||||
cy.visit('/basic');
|
||||
|
||||
|
||||
+5
-5
@@ -1,11 +1,11 @@
|
||||
describe('Advanced Flow Rendering', () => {
|
||||
describe('Custom Nodes Graph Rendering', () => {
|
||||
it('renders a flow with sone nodes', () => {
|
||||
cy.visit('/');
|
||||
|
||||
cy.get('.react-flow__renderer');
|
||||
|
||||
cy.get('.react-flow__node').should('have.length', 9);
|
||||
cy.get('.react-flow__edge').should('have.length', 9);
|
||||
cy.get('.react-flow__node').should('have.length', 8);
|
||||
cy.get('.react-flow__edge').should('have.length', 8);
|
||||
});
|
||||
|
||||
it('renders a grid', () => {
|
||||
@@ -31,7 +31,7 @@ describe('Advanced Flow Rendering', () => {
|
||||
.should('not.have.class', 'valid')
|
||||
.should('not.have.class', 'connecting');
|
||||
|
||||
cy.get('.react-flow__edge').should('have.length', 10);
|
||||
cy.get('.react-flow__edge').should('have.length', 9);
|
||||
});
|
||||
|
||||
it('tries to make invalid connection', () => {
|
||||
@@ -50,6 +50,6 @@ describe('Advanced Flow Rendering', () => {
|
||||
.trigger('mouseup', { force: true })
|
||||
.should('not.have.class', 'connecting');
|
||||
|
||||
cy.get('.react-flow__edge').should('have.length', 10);
|
||||
cy.get('.react-flow__edge').should('have.length', 9);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,17 @@
|
||||
describe('Empty Flow Rendering', () => {
|
||||
it('renders an empty graph', () => {
|
||||
cy.visit('/empty');
|
||||
|
||||
cy.get('.react-flow__renderer');
|
||||
cy.get('.react-flow__node').should('not.exist');
|
||||
cy.get('.react-flow__edge').should('not.exist');
|
||||
});
|
||||
|
||||
it('renders a control panel', () => {
|
||||
cy.get('.react-flow__controls');
|
||||
});
|
||||
|
||||
it('renders a mini map', () => {
|
||||
cy.get('.react-flow__minimap');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user