mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-21 02:56:40 -08:00
test: Reset DB and skip set-up before running node creator e2e (#4733)
* test: Reset DB and skip set-up before runing * remove second db:reset call in node-creator e2e spec
This commit is contained in:
parent
cb3bfc32f7
commit
2d31720b82
|
@ -1,16 +1,14 @@
|
|||
import { DEFAULT_USER_EMAIL, DEFAULT_USER_PASSWORD } from "../constants";
|
||||
import { randFirstName, randLastName } from "@ngneat/falso";
|
||||
import { NodeCreator } from '../pages/features/node-creator';
|
||||
import { INodeTypeDescription } from '../../packages/workflow';
|
||||
import CustomNodeFixture from '../fixtures/Custom_node.json';
|
||||
|
||||
const username = 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');
|
||||
})
|
||||
|
||||
beforeEach(() => {
|
||||
cy.intercept('GET', '/types/nodes.json', (req) => {
|
||||
// Delete caching headers so that we can intercept the request
|
||||
|
@ -24,16 +22,6 @@ describe('Node Creator', () => {
|
|||
res.send(nodes)
|
||||
})
|
||||
}).as('nodesIntercept')
|
||||
|
||||
cy.signup(username, firstName, lastName, password);
|
||||
|
||||
cy.on('uncaught:exception', (err, runnable) => {
|
||||
expect(err.message).to.include('Not logged in');
|
||||
|
||||
return false;
|
||||
})
|
||||
|
||||
cy.signin(username, password);
|
||||
cy.visit(nodeCreatorFeature.url);
|
||||
});
|
||||
|
||||
|
@ -100,7 +88,7 @@ describe('Node Creator', () => {
|
|||
cy.get('div').contains("On clicking 'execute'").should('exist');
|
||||
})
|
||||
|
||||
it('check if non-core nodes are rendered all nodes', () => {
|
||||
it('check if non-core nodes are rendered', () => {
|
||||
cy.wait('@nodesIntercept').then((interception) => {
|
||||
const nodes = interception.response?.body as INodeTypeDescription[];
|
||||
|
||||
|
@ -126,9 +114,9 @@ describe('Node Creator', () => {
|
|||
})
|
||||
})
|
||||
|
||||
it.only('should render and select community node', () => {
|
||||
it('should render and select community node', () => {
|
||||
cy.wait('@nodesIntercept').then(() => {
|
||||
const customCategory = 'customCategory';
|
||||
const customCategory = 'Custom Category';
|
||||
const customNode = 'E2E Node';
|
||||
const customNodeDescription = 'Demonstrate rendering of node';
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
"transform"
|
||||
],
|
||||
"codex": {
|
||||
"categories": ["CustomCategory"]
|
||||
"categories": ["Custom Category"]
|
||||
},
|
||||
"version": 1,
|
||||
"description": "Demonstrate rendering of node",
|
||||
|
|
|
@ -68,7 +68,7 @@ export default Vue.extend({
|
|||
renderCategoryName(categoryName: CategoryName) {
|
||||
const key = `nodeCreator.categoryNames.${categoryName}` as const;
|
||||
|
||||
return this.$locale.exists(key) ? this.$locale.baseText(key) : categoryName;
|
||||
return this.$locale.exists(key) ? this.$locale.baseText(key) : this.item.category;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue