test(basic): adjust tests
This commit is contained in:
@@ -56,7 +56,9 @@ describe('Basic Flow Rendering', () => {
|
|||||||
.wait(50)
|
.wait(50)
|
||||||
.trigger('mouseup', 1, 200, { force: true });
|
.trigger('mouseup', 1, 200, { force: true });
|
||||||
|
|
||||||
cy.get('.react-flow__node').eq(3).should('have.class', 'selected');
|
cy.wait(100);
|
||||||
|
|
||||||
|
cy.get('.react-flow__node').eq(1).should('have.class', 'selected');
|
||||||
|
|
||||||
cy.get('.react-flow__node').eq(0).should('have.not.class', 'selected');
|
cy.get('.react-flow__node').eq(0).should('have.not.class', 'selected');
|
||||||
|
|
||||||
@@ -120,7 +122,7 @@ describe('Basic Flow Rendering', () => {
|
|||||||
.wait(50)
|
.wait(50)
|
||||||
.trigger('mouseup', { force: true });
|
.trigger('mouseup', { force: true });
|
||||||
|
|
||||||
cy.get('.react-flow__edge').should('have.length', 2);
|
cy.get('.react-flow__edge').should('have.length', 3);
|
||||||
});
|
});
|
||||||
|
|
||||||
// @TODO: why does this fail since react18?
|
// @TODO: why does this fail since react18?
|
||||||
|
|||||||
@@ -37,14 +37,15 @@ describe('Minimap Testing', () => {
|
|||||||
const xPosBeforeDrag = Cypress.$('.react-flow__minimap-node:first').attr('x');
|
const xPosBeforeDrag = Cypress.$('.react-flow__minimap-node:first').attr('x');
|
||||||
const yPosBeforeDrag = Cypress.$('.react-flow__minimap-node:first').attr('y');
|
const yPosBeforeDrag = Cypress.$('.react-flow__minimap-node:first').attr('y');
|
||||||
|
|
||||||
cy.drag('.react-flow__node:first', { x: 500, y: 25 }).then(($el) => {
|
cy.drag('.react-flow__node:first', { x: 500, y: 25 })
|
||||||
cy.wait(1000);
|
.wait(100)
|
||||||
const xPosAfterDrag = Cypress.$('.react-flow__minimap-node:first').attr('x');
|
.then(() => {
|
||||||
const yPosAfterDrag = Cypress.$('.react-flow__minimap-node:first').attr('y');
|
const xPosAfterDrag = Cypress.$('.react-flow__minimap-node:first').attr('x');
|
||||||
|
const yPosAfterDrag = Cypress.$('.react-flow__minimap-node:first').attr('y');
|
||||||
|
|
||||||
expect(xPosBeforeDrag).to.not.equal(xPosAfterDrag);
|
expect(xPosBeforeDrag).to.not.equal(xPosAfterDrag);
|
||||||
expect(yPosBeforeDrag).to.not.equal(yPosAfterDrag);
|
expect(yPosBeforeDrag).to.not.equal(yPosAfterDrag);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('changes node positions via pane drag', () => {
|
it('changes node positions via pane drag', () => {
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ const initialNodes: Node[] = [
|
|||||||
{
|
{
|
||||||
id: '1',
|
id: '1',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
draggable: false,
|
|
||||||
data: {
|
data: {
|
||||||
label: (
|
label: (
|
||||||
<>
|
<>
|
||||||
|
|||||||
Reference in New Issue
Block a user