diff --git a/cypress/e2e/4-node-creator.cy.ts b/cypress/e2e/4-node-creator.cy.ts index 516bfafa6b..807b2b3471 100644 --- a/cypress/e2e/4-node-creator.cy.ts +++ b/cypress/e2e/4-node-creator.cy.ts @@ -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'; diff --git a/cypress/fixtures/Custom_node.json b/cypress/fixtures/Custom_node.json index bbd661d261..1e562ba335 100644 --- a/cypress/fixtures/Custom_node.json +++ b/cypress/fixtures/Custom_node.json @@ -38,7 +38,7 @@ "transform" ], "codex": { - "categories": ["CustomCategory"] + "categories": ["Custom Category"] }, "version": 1, "description": "Demonstrate rendering of node", diff --git a/packages/editor-ui/src/components/Node/NodeCreator/CategoryItem.vue b/packages/editor-ui/src/components/Node/NodeCreator/CategoryItem.vue index 1dd2191443..bbc2b3dd44 100644 --- a/packages/editor-ui/src/components/Node/NodeCreator/CategoryItem.vue +++ b/packages/editor-ui/src/components/Node/NodeCreator/CategoryItem.vue @@ -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; }, }, });