Skip to content

Commit

Permalink
sync master
Browse files Browse the repository at this point in the history
  • Loading branch information
RicardoE105 committed May 30, 2023
2 parents c121d5e + da856d1 commit 7dc43fc
Show file tree
Hide file tree
Showing 69 changed files with 519 additions and 189 deletions.
1 change: 0 additions & 1 deletion cypress/e2e/1-workflows.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const multipleWorkflowsCount = 5;

describe('Workflows', () => {
before(() => {
cy.resetAll();
cy.skipSetup();
});

Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/10-settings-log-streaming.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const settingsLogStreamingPage = new SettingsLogStreamingPage();

describe('Log Streaming Settings', () => {
before(() => {
cy.resetAll();
cy.setup({ email, firstName, lastName, password });
});

Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/10-undo-redo.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const ndv = new NDV();

describe('Undo/Redo', () => {
before(() => {
cy.resetAll();
cy.skipSetup();
});

Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/11-inline-expression-editor.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const WorkflowPage = new WorkflowPageClass();

describe('Inline expression editor', () => {
before(() => {
cy.resetAll();
cy.skipSetup();
});

Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/12-canvas-actions.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';
const WorkflowPage = new WorkflowPageClass();
describe('Canvas Actions', () => {
before(() => {
cy.resetAll();
cy.skipSetup();
});

Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/12-canvas.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ const RENAME_NODE_NAME = 'Something else';

describe('Canvas Node Manipulation and Navigation', () => {
before(() => {
cy.resetAll();
cy.skipSetup();
});

Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/13-pinning.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const ndv = new NDV();

describe('Data pinning', () => {
before(() => {
cy.resetAll();
cy.skipSetup();
});

Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/14-data-transformation-expressions.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const ndv = new NDV();

describe('Data transformation expressions', () => {
before(() => {
cy.resetAll();
cy.skipSetup();
});

Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/14-mapping.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const ndv = new NDV();

describe('Data mapping', () => {
before(() => {
cy.resetAll();
cy.skipSetup();
});

Expand Down
7 changes: 5 additions & 2 deletions cypress/e2e/15-scheduler-node.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ const workflowPage = new WorkflowPage();
const ndv = new NDV();

describe('Schedule Trigger node', async () => {
beforeEach(() => {
cy.resetAll();
before(() => {
cy.skipSetup();
});

beforeEach(() => {
workflowPage.actions.visit();
});

it('should execute and return the execution timestamp', () => {
workflowPage.actions.addInitialNodeToCanvas('Schedule Trigger');
workflowPage.actions.openNode('Schedule Trigger');
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/16-webhook-node.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ const simpleWebhookCall = (options: SimpleWebhookCallOptions) => {

describe('Webhook Trigger node', async () => {
before(() => {
cy.resetAll();
cy.skipSetup();
});

Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/17-sharing.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ const users = [

describe('Sharing', () => {
before(() => {
cy.resetAll();
cy.setupOwner(instanceOwner);
});

Expand Down
45 changes: 23 additions & 22 deletions cypress/e2e/17-workflow-tags.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,52 @@ import { WorkflowPage } from '../pages';

const wf = new WorkflowPage();

const TEST_TAGS = ['Tag 1', 'Tag 2', 'Tag 3'];
const TEST_TAGS = ['Tag 1', 'Tag 2', 'Tag 3', 'Tag 4', 'Tag 5'];

describe('Workflow tags', () => {
beforeEach(() => {
cy.resetAll();
before(() => {
cy.skipSetup();
});

beforeEach(() => {
wf.actions.visit();
});

it('should create and attach tags inline', () => {
wf.getters.createTagButton().click();
wf.actions.addTags(TEST_TAGS);
wf.getters.tagPills().should('have.length', TEST_TAGS.length);
wf.actions.addTags(TEST_TAGS.slice(0, 2));
wf.getters.tagPills().should('have.length', 2);
wf.getters.nthTagPill(1).click();
wf.actions.addTags('Tag 4');
wf.getters.tagPills().should('have.length', TEST_TAGS.length + 1);
wf.actions.addTags(TEST_TAGS[2]);
wf.getters.tagPills().should('have.length', 3);
wf.getters.isWorkflowSaved();
});

it('should create tags via modal', () => {
wf.actions.openTagManagerModal();

const [first, second] = TEST_TAGS;

cy.contains('Create a tag').click();
cy.getByTestId('tags-table').find('input').type(first).type('{enter}');
cy.contains('Add new').click();
cy.wait(300);
cy.getByTestId('tags-table').find('input').type(second).type('{enter}');
const tags = TEST_TAGS.slice(3);
for (const tag of tags) {
cy.contains('Add new').click();
cy.getByTestId('tags-table').find('input').type(tag).type('{enter}');
cy.wait(300);
}
cy.contains('Done').click();

wf.getters.createTagButton().click();
wf.getters.tagsInDropdown().should('have.length', 2); // two stored
wf.getters.tagsInDropdown().should('have.length', 5);
wf.getters.tagPills().should('have.length', 0); // none attached
});

it('should delete a tag via modal', () => {
it('should delete all tags via modal', () => {
wf.actions.openTagManagerModal();

const [first] = TEST_TAGS;
TEST_TAGS.forEach(() => {
cy.getByTestId('delete-tag-button').first().click({ force: true });
cy.contains('Delete tag').click();
cy.wait(300);
});

cy.contains('Create a tag').click();
cy.getByTestId('tags-table').find('input').type(first).type('{enter}');
cy.getByTestId('delete-tag-button').click({ force: true });
cy.wait(300);
cy.contains('Delete tag').click();
cy.contains('Done').click();
wf.getters.createTagButton().click();
wf.getters.tagsInDropdown().should('have.length', 0); // none stored
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/18-user-management.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ const personalSettingsPage = new PersonalSettingsPage();

describe('User Management', () => {
before(() => {
cy.resetAll();
cy.setupOwner(instanceOwner);
});

Expand Down
8 changes: 5 additions & 3 deletions cypress/e2e/19-execution.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ const workflowPage = new WorkflowPageClass();
const ndv = new NDV();

describe('Execution', () => {
beforeEach(() => {
cy.resetAll();
before(() => {
cy.skipSetup();
});

beforeEach(() => {
workflowPage.actions.visit();
});

it('should test manual workflow', () => {
cy.createFixtureWorkflow('Manual_wait_set.json', `Manual wait set ${uuid()}`);

Expand Down Expand Up @@ -264,7 +267,6 @@ describe('Execution', () => {
.canvasNodeByName('Set')
.within(() => cy.get('.fa-check').should('not.exist'));


// Check canvas nodes after workflow stopped
workflowPage.getters
.canvasNodeByName('Webhook')
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/2-credentials.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const NEW_CREDENTIAL_NAME = 'Something else';

describe('Credentials', () => {
before(() => {
cy.resetAll();
cy.skipSetup();
});

Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/20-workflow-executions.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const executionsTab = new WorkflowExecutionsTab();
// Test suite for executions tab
describe('Current Workflow Executions', () => {
before(() => {
cy.resetAll();
cy.skipSetup();
});

Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/21-community-nodes.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const workflowPage = new WorkflowPage();
// We want to keep the other tests as fast as possible so we don't want to break the cache in those.
describe('Community Nodes', () => {
before(() => {
cy.resetAll();
cy.skipSetup();
})
beforeEach(() => {
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/22-user-activation-modal.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ const userActivationSurveyModal = new UserActivationSurveyModal();
const BASE_WEBHOOK_URL = 'http://localhost:5678/webhook';

describe('User activation survey', () => {
it('Should show activation survey', () => {
cy.resetAll();

before(() => {
cy.skipSetup();
});

it('Should show activation survey', () => {
cy.intercept('GET', '/rest/settings', (req) => {
req.reply(SettingsWithActivationModalEnabled);
});
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/23-variables.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const lastName = randLastName();

describe('Variables', () => {
before(() => {
cy.resetAll();
cy.setup({ email, firstName, lastName, password });
});

Expand Down
3 changes: 1 addition & 2 deletions cypress/e2e/24-ndv-paired-item.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ const ndv = new NDV();

describe('NDV', () => {
before(() => {
cy.resetAll();
cy.skipSetup();

});

beforeEach(() => {
workflowPage.actions.visit();
workflowPage.actions.renameWorkflow(uuid());
Expand Down
6 changes: 4 additions & 2 deletions cypress/e2e/25-stickies.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ function checkStickiesStyle( top: number, left: number, height: number, width: n
}

describe('Canvas Actions', () => {
beforeEach(() => {
cy.resetAll();
before(() => {
cy.skipSetup();
});

beforeEach(() => {
workflowPage.actions.visit();

cy.window().then(
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/26-resource-locator.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const INVALID_CREDENTIALS_MESSAGE = 'Please check your credential';

describe('Resource Locator', () => {
before(() => {
cy.resetAll();
cy.skipSetup();
});

Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/3-default-owner.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const lastName = randLastName();

describe('Default owner', () => {
it('should be able to create workflows', () => {
cy.resetAll();
cy.skipSetup();
cy.createFixtureWorkflow('Test_workflow_1.json', `Test workflow`);

Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/4-node-creator.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ const nodeCreatorFeature = new NodeCreator();
const WorkflowPage = new WorkflowPageClass();
const NDVModal = new NDV();


describe('Node Creator', () => {
before(() => {
cy.resetAll();
cy.skipSetup();
});

Expand Down
3 changes: 1 addition & 2 deletions cypress/e2e/5-ndv.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ const ndv = new NDV();

describe('NDV', () => {
before(() => {
cy.resetAll();
cy.skipSetup();

});

beforeEach(() => {
workflowPage.actions.visit();
workflowPage.actions.renameWorkflow(uuid());
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/6-code-node.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const ndv = new NDV();

describe('Code node', () => {
before(() => {
cy.resetAll();
cy.skipSetup();
});

Expand Down
6 changes: 2 additions & 4 deletions cypress/e2e/7-workflow-actions.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const WorkflowPage = new WorkflowPageClass();

describe('Workflow Actions', () => {
before(() => {
cy.resetAll();
cy.skipSetup();
});

Expand Down Expand Up @@ -111,8 +110,6 @@ describe('Workflow Actions', () => {
});

it('should update workflow settings', () => {
cy.resetAll();
cy.skipSetup();
WorkflowPage.actions.visit();
// Open settings dialog
WorkflowPage.actions.saveWorkflowOnButtonClick();
Expand All @@ -121,7 +118,7 @@ describe('Workflow Actions', () => {
WorkflowPage.getters.workflowMenuItemSettings().should('be.visible');
WorkflowPage.getters.workflowMenuItemSettings().click();
// Change all settings
WorkflowPage.getters.workflowSettingsErrorWorkflowSelect().find('li').should('have.length', 2);
WorkflowPage.getters.workflowSettingsErrorWorkflowSelect().find('li').should('have.length', 7);
WorkflowPage.getters
.workflowSettingsErrorWorkflowSelect()
.find('li')
Expand Down Expand Up @@ -229,6 +226,7 @@ describe('Workflow Actions', () => {
it('should duplicate unsaved workflow', () => {
duplicateWorkflow();
});

it('should duplicate saved workflow', () => {
WorkflowPage.actions.saveWorkflowOnButtonClick();
duplicateWorkflow();
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/8-http-request-node.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const ndv = new NDV();

describe('HTTP Request node', () => {
before(() => {
cy.resetAll();
cy.skipSetup();
});

Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/9-expression-editor-modal.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const WorkflowPage = new WorkflowPageClass();

describe('Expression editor modal', () => {
before(() => {
cy.resetAll();
cy.skipSetup();
});

Expand Down
Loading

0 comments on commit 7dc43fc

Please sign in to comment.