fix(tests): dont start lib dev server while running tests
This commit is contained in:
@@ -13,7 +13,7 @@ describe('Empty Flow Rendering', () => {
|
||||
.get('.react-flow__selectionpane')
|
||||
.trigger('mousedown', 'topLeft', { which: 1, force: true })
|
||||
.trigger('mousemove', 'bottomRight', { which: 1 })
|
||||
.trigger('mouseup', 'bottomRight', { force: true })
|
||||
.trigger('mouseup', 'bottomRight', { force: true });
|
||||
});
|
||||
|
||||
it('renders a control panel', () => {
|
||||
@@ -33,12 +33,8 @@ describe('Empty Flow Rendering', () => {
|
||||
});
|
||||
|
||||
it('uses lock view control', () => {
|
||||
cy.get('.react-flow__controls-unlocked').click();
|
||||
cy.get('.react-flow__controls-unlocked').should('not.exist');
|
||||
|
||||
cy.get('.react-flow__controls-locked').click();
|
||||
cy.get('.react-flow__controls-locked').should('not.exist');
|
||||
})
|
||||
cy.get('.react-flow__controls-interactive').click();
|
||||
});
|
||||
|
||||
it('renders an empty mini map', () => {
|
||||
cy.get('.react-flow__minimap');
|
||||
@@ -51,10 +47,7 @@ describe('Empty Flow Rendering', () => {
|
||||
});
|
||||
|
||||
it('connects nodes', () => {
|
||||
cy.get('.react-flow__node')
|
||||
.first()
|
||||
.find('.react-flow__handle.source')
|
||||
.trigger('mousedown', { which: 1 });
|
||||
cy.get('.react-flow__node').first().find('.react-flow__handle.source').trigger('mousedown', { which: 1 });
|
||||
|
||||
cy.get('.react-flow__node')
|
||||
.last()
|
||||
|
||||
+13
-12
@@ -9,6 +9,19 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/wbkd/react-flow.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "rollup -c --environment NODE_ENV:production",
|
||||
"start": "rollup -w -c",
|
||||
"dev": "npm run build && npm start & cd example && npm start",
|
||||
"start:examples": "npm run build && cd example && npm start",
|
||||
"dev:wait": "start-server-and-test start:examples http-get://localhost:3000",
|
||||
"build:example": "npm install && npm run build && cd example && npm install && npm run build",
|
||||
"cy:run": "cypress run",
|
||||
"cy:open": "cypress open",
|
||||
"cypress": "npm run dev:wait cy:open",
|
||||
"test": "npm run dev:wait cy:run",
|
||||
"release": "release-it"
|
||||
},
|
||||
"dependencies": {
|
||||
"@welldone-software/why-did-you-render": "^4.2.0",
|
||||
"classnames": "^2.2.6",
|
||||
@@ -56,18 +69,6 @@
|
||||
"peerDependencies": {
|
||||
"react": "^16.13.1"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "rollup -c --environment NODE_ENV:production",
|
||||
"start": "rollup -w -c",
|
||||
"dev": "npm run build && npm start & cd example && npm start",
|
||||
"dev:wait": "start-server-and-test dev http-get://localhost:3000",
|
||||
"build:example": "npm install && npm run build && cd example && npm install && npm run build",
|
||||
"cy:run": "cypress run",
|
||||
"cy:open": "cypress open",
|
||||
"cypress": "npm run dev:wait cy:open",
|
||||
"test": "npm run dev:wait cy:run",
|
||||
"release": "release-it"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user