mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
feat: Make use of db:reset in all test suites (no-changelog) (#4739)
* feat: Make use of db:reset in all test suites * refactor: Rename task to no longer use db: prefix * feat: wrap cypress tasks into commands * refactor: rename resetDatabase to resetAll * fix: update test:e2e:all to use --headless
This commit is contained in:
@@ -1,15 +1,24 @@
|
||||
import { NodeCreator } from '../pages/features/node-creator';
|
||||
import { INodeTypeDescription } from '../../packages/workflow';
|
||||
import CustomNodeFixture from '../fixtures/Custom_node.json';
|
||||
import {DEFAULT_USER_EMAIL, DEFAULT_USER_PASSWORD} from "../constants";
|
||||
import {randFirstName, randLastName} from "@ngneat/falso";
|
||||
|
||||
const email = DEFAULT_USER_EMAIL;
|
||||
const password = DEFAULT_USER_PASSWORD;
|
||||
const firstName = randFirstName();
|
||||
const lastName = randLastName();
|
||||
const nodeCreatorFeature = new NodeCreator();
|
||||
|
||||
describe('Node Creator', () => {
|
||||
before(() => {
|
||||
cy.task('db:reset');
|
||||
})
|
||||
cy.resetAll();
|
||||
cy.setup({ email, firstName, lastName, password });
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
cy.signin({ email, password });
|
||||
|
||||
cy.intercept('GET', '/types/nodes.json', (req) => {
|
||||
// Delete caching headers so that we can intercept the request
|
||||
['etag', 'if-none-match', 'if-modified-since'].forEach(header => {delete req.headers[header]});
|
||||
@@ -21,7 +30,8 @@ describe('Node Creator', () => {
|
||||
nodes.push(CustomNodeFixture as INodeTypeDescription);
|
||||
res.send(nodes)
|
||||
})
|
||||
}).as('nodesIntercept')
|
||||
}).as('nodesIntercept');
|
||||
|
||||
cy.visit(nodeCreatorFeature.url);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user