mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix(editor): Set workflow name when importing (no-changelog) (#19410)
This commit is contained in:
@@ -10,7 +10,6 @@ import {
|
||||
N8N_AUTH_COOKIE,
|
||||
} from '../constants';
|
||||
import { WorkflowPage } from '../pages';
|
||||
import { getUniqueWorkflowName } from '../utils/workflowUtils';
|
||||
|
||||
Cypress.Commands.add('setAppDate', (targetDate: number | Date) => {
|
||||
cy.window().then((win) => {
|
||||
@@ -26,22 +25,17 @@ Cypress.Commands.add('getByTestId', (selector, ...args) => {
|
||||
return cy.get(`[data-test-id="${selector}"]`, ...args);
|
||||
});
|
||||
|
||||
Cypress.Commands.add(
|
||||
'createFixtureWorkflow',
|
||||
(fixtureKey: string, workflowName = getUniqueWorkflowName()) => {
|
||||
const workflowPage = new WorkflowPage();
|
||||
Cypress.Commands.add('createFixtureWorkflow', (fixtureKey: string) => {
|
||||
const workflowPage = new WorkflowPage();
|
||||
|
||||
// We need to force the click because the input is hidden
|
||||
workflowPage.getters
|
||||
.workflowImportInput()
|
||||
.selectFile(`fixtures/${fixtureKey}`, { force: true });
|
||||
// We need to force the click because the input is hidden
|
||||
workflowPage.getters.workflowImportInput().selectFile(`fixtures/${fixtureKey}`, { force: true });
|
||||
|
||||
cy.waitForLoad(false);
|
||||
workflowPage.actions.setWorkflowName(workflowName);
|
||||
workflowPage.getters.saveButton().should('contain', 'Saved');
|
||||
workflowPage.actions.zoomToFit();
|
||||
},
|
||||
);
|
||||
cy.waitForLoad(false);
|
||||
workflowPage.actions.saveWorkflowOnButtonClick();
|
||||
workflowPage.getters.saveButton().should('contain', 'Saved');
|
||||
workflowPage.actions.zoomToFit();
|
||||
});
|
||||
|
||||
Cypress.Commands.addQuery('findChildByTestId', function (testId: string) {
|
||||
return (subject: Cypress.Chainable) => subject.find(`[data-test-id="${testId}"]`);
|
||||
|
||||
Reference in New Issue
Block a user