Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(editor): Update copy: Execute --> Test #8137

Merged
merged 14 commits into from
Jan 5, 2024
2 changes: 1 addition & 1 deletion cypress/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const INSTANCE_MEMBERS = [
];

export const MANUAL_TRIGGER_NODE_NAME = 'Manual Trigger';
export const MANUAL_TRIGGER_NODE_DISPLAY_NAME = 'When clicking "Execute Workflow"';
export const MANUAL_TRIGGER_NODE_DISPLAY_NAME = 'When clicking "Test Workflow"';
export const MANUAL_CHAT_TRIGGER_NODE_NAME = 'Manual Chat Trigger';
export const SCHEDULE_TRIGGER_NODE_NAME = 'Schedule Trigger';
export const CODE_NODE_NAME = 'Code';
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/13-pinning.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ describe('Data pinning', () => {
});

function setExpressionOnStringValueInSet(expression: string) {
cy.get('button').contains('Execute node').click();
cy.get('button').contains('Test step').click();
cy.get('.fixed-collection-parameter > :nth-child(2) > .button > span').click();

ndv.getters.nthParam(4).contains('Expression').invoke('show').click();
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/4-node-creator.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ describe('Node Creator', () => {
nodeCreatorFeature.getters.getCategoryItem('Actions').click();
nodeCreatorFeature.getters.getCreatorItem('Create a credential').click();
NDVModal.actions.close();
WorkflowPage.actions.deleteNode('When clicking "Execute Workflow"');
WorkflowPage.actions.deleteNode('When clicking "Test Workflow"');
WorkflowPage.getters.canvasNodePlusEndpointByName('n8n').click();
nodeCreatorFeature.getters.searchBar().find('input').clear().type('n8n');
nodeCreatorFeature.getters.getCreatorItem('n8n').click();
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/5-ndv.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ describe('NDV', () => {
ndv.getters.backToCanvas().click();
workflowPage.actions.executeWorkflow();
// Manual tigger node should show success indicator
workflowPage.actions.openNode('When clicking "Execute Workflow"');
workflowPage.actions.openNode('When clicking "Test Workflow"');
ndv.getters.nodeRunSuccessIndicator().should('exist');
// Code node should show error
ndv.getters.backToCanvas().click();
Expand Down
2 changes: 1 addition & 1 deletion cypress/fixtures/Floating_Nodes.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"parameters": {},
"id": "d0eda550-2526-42a1-aa19-dee411c8acf9",
"name": "When clicking \"Execute Workflow\"",
"name": "When clicking \"Test Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down
4 changes: 2 additions & 2 deletions cypress/fixtures/Lots_of_nodes.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"parameters": {},
"id": "369fe424-dd3b-4399-9de3-50bd4ce1f75b",
"name": "When clicking \"Execute Workflow\"",
"name": "When clicking \"Test Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -570,7 +570,7 @@
],
"pinData": {},
"connections": {
"When clicking \"Execute Workflow\"": {
"When clicking \"Test Workflow\"": {
"main": [
[
{
Expand Down
4 changes: 2 additions & 2 deletions cypress/fixtures/Node_IO_filter.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"parameters": {},
"id": "46770685-44d1-4aad-9107-1d790cf26b50",
"name": "When clicking \"Execute Workflow\"",
"name": "When clicking \"Test Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -599,7 +599,7 @@
]
},
"connections": {
"When clicking \"Execute Workflow\"": {
"When clicking \"Test Workflow\"": {
"main": [
[
{
Expand Down
16 changes: 8 additions & 8 deletions cypress/fixtures/Suggested_Templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
{
"parameters": {},
"id": "551313bb-1e01-4133-9956-e6f09968f2ce",
"name": "When clicking \"Execute Workflow\"",
"name": "When clicking \"Test Workflow\"",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you need to update the fixtures? the tests should have worked even with the old node names, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they kept breaking because we were using some of then to assert the exact label, so updated it all of them

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did they keep breaking? the node names of imported workflows should not change, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Existing display names will not change! I only change it there because for some tests we were using this fixtures and asserting that the node display name was "Execute Node" instead "Test Node" so I changed it on all fixtures to avoid issues. I can revert the changes, and run the e2e tests again and only rename in the fixtures where we assert the new name.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah I see.. new nodes added in tests would need to be updated.. but not imported fixtures in tests.. it's your call here.. it's fine either way

"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -92,7 +92,7 @@
}
],
"connections": {
"When clicking \"Execute Workflow\"": {
"When clicking \"Test Workflow\"": {
"main": [
[
{
Expand Down Expand Up @@ -191,7 +191,7 @@
{
"parameters": {},
"id": "551313bb-1e01-4133-9956-e6f09968f2ce",
"name": "When clicking \"Execute Workflow\"",
"name": "When clicking \"Test Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -241,7 +241,7 @@
}
],
"connections": {
"When clicking \"Execute Workflow\"": {
"When clicking \"Test Workflow\"": {
"main": [
[
{
Expand Down Expand Up @@ -374,7 +374,7 @@
{
"parameters": {},
"id": "551313bb-1e01-4133-9956-e6f09968f2ce",
"name": "When clicking \"Execute Workflow\"",
"name": "When clicking \"Test Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -424,7 +424,7 @@
}
],
"connections": {
"When clicking \"Execute Workflow\"": {
"When clicking \"Test Workflow\"": {
"main": [
[
{
Expand Down Expand Up @@ -524,7 +524,7 @@
{
"parameters": {},
"id": "551313bb-1e01-4133-9956-e6f09968f2ce",
"name": "When clicking \"Execute Workflow\"",
"name": "When clicking \"Test Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -574,7 +574,7 @@
}
],
"connections": {
"When clicking \"Execute Workflow\"": {
"When clicking \"Test Workflow\"": {
"main": [
[
{
Expand Down
4 changes: 2 additions & 2 deletions cypress/fixtures/Test_workflow_5.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
{
"parameters": {},
"id": "ef63cdc5-50bc-4525-9873-7e7f7589a60e",
"name": "When clicking \"Execute Workflow\"",
"name": "When clicking \"Test Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -199,7 +199,7 @@
]
]
},
"When clicking \"Execute Workflow\"": {
"When clicking \"Test Workflow\"": {
"main": [
[
{
Expand Down
4 changes: 2 additions & 2 deletions cypress/fixtures/Test_workflow_filter.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"parameters": {},
"id": "f332a7d1-31b4-4e78-b31e-9e8db945bf3f",
"name": "When clicking \"Execute Workflow\"",
"name": "When clicking \"Test Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -99,7 +99,7 @@
],
"pinData": {},
"connections": {
"When clicking \"Execute Workflow\"": {
"When clicking \"Test Workflow\"": {
"main": [
[
{
Expand Down
2 changes: 1 addition & 1 deletion cypress/fixtures/Test_workflow_ndv_version.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"parameters": {},
"id": "aadaed66-84ed-4cf8-bf21-082e9a65db76",
"name": "When clicking \"Execute Workflow\"",
"name": "When clicking \"Test Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down
4 changes: 2 additions & 2 deletions cypress/fixtures/Test_workflow_schema_test.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
{
"parameters": {},
"id": "58512a93-dabf-4584-817f-27c608c1bdd5",
"name": "When clicking \"Execute Workflow\"",
"name": "When clicking \"Test Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand All @@ -69,7 +69,7 @@
]
]
},
"When clicking \"Execute Workflow\"": {
"When clicking \"Test Workflow\"": {
"main": [
[
{
Expand Down
4 changes: 2 additions & 2 deletions cypress/fixtures/Test_workflow_schema_test_pinned_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
{
"parameters": {},
"id": "3dc7cf26-ff25-4437-b9fd-0e8b127ebec9",
"name": "When clicking \"Execute Workflow\"",
"name": "When clicking \"Test Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -552,7 +552,7 @@
]
]
},
"When clicking \"Execute Workflow\"": {
"When clicking \"Test Workflow\"": {
"main": [
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{
"parameters": {},
"id": "bcb6abdf-d34b-4ea7-a8ed-58155b708c43",
"name": "When clicking \"Execute Workflow\"",
"name": "When clicking \"Test Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -90,7 +90,7 @@
}
],
"connections": {
"When clicking \"Execute Workflow\"": {
"When clicking \"Test Workflow\"": {
"main": [
[
{
Expand Down
4 changes: 2 additions & 2 deletions cypress/fixtures/workflow-with-unknown-credentials.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{
"parameters": {},
"id": "acdd1bdc-c642-4ea6-ad67-f4201b640cfa",
"name": "When clicking \"Execute Workflow\"",
"name": "When clicking \"Test Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand All @@ -37,7 +37,7 @@
}
],
"connections": {
"When clicking \"Execute Workflow\"": {
"When clicking \"Test Workflow\"": {
"main": [
[
{
Expand Down
4 changes: 2 additions & 2 deletions cypress/fixtures/workflow-with-unknown-nodes.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{
"parameters": {},
"id": "40720511-19b6-4421-bdb0-3fb6efef4bc5",
"name": "When clicking \"Execute Workflow\"",
"name": "When clicking \"Test Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
Expand Down Expand Up @@ -64,7 +64,7 @@
}
],
"connections": {
"When clicking \"Execute Workflow\"": {
"When clicking \"Test Workflow\"": {
"main": [
[
{
Expand Down
2 changes: 1 addition & 1 deletion packages/editor-ui/src/components/Node.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
text
icon="play"
:disabled="workflowRunning || isConfigNode"
:title="$locale.baseText('node.executeNode')"
:title="$locale.baseText('node.testStep')"
@click="executeNode"
/>
<n8n-icon-button
Expand Down
14 changes: 3 additions & 11 deletions packages/editor-ui/src/components/NodeExecuteButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
:label="buttonLabel"
:type="type"
:size="size"
:icon="isFormTriggerNode && 'flask'"
:icon="!isListeningForEvents && 'flask'"
:transparent-background="transparent"
@click="onClick"
:title="!isTriggerNode ? $locale.baseText('ndv.execute.testNode.description') : ''"
/>
</div>
</n8n-tooltip>
Expand Down Expand Up @@ -197,16 +198,7 @@ export default defineComponent({
return this.$locale.baseText('ndv.execute.fetchEvent');
}

if (
this.isTriggerNode &&
!this.isScheduleTrigger &&
!this.isManualTriggerNode &&
!this.isFormTriggerNode
) {
return this.$locale.baseText('ndv.execute.listenForEvent');
RicardoE105 marked this conversation as resolved.
Show resolved Hide resolved
}

return this.$locale.baseText('ndv.execute.executeNode');
return this.$locale.baseText('ndv.execute.testNode');
},
},
methods: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ exports[`useContextMenu > Read-only mode > should return the correct actions whe
{
"disabled": true,
"id": "execute",
"label": "Execute node",
"label": "Test node",
},
{
"disabled": true,
Expand Down Expand Up @@ -181,7 +181,7 @@ exports[`useContextMenu > should return the correct actions opening the menu fro
{
"disabled": false,
"id": "execute",
"label": "Execute node",
"label": "Test node",
},
{
"disabled": false,
Expand Down Expand Up @@ -279,7 +279,7 @@ exports[`useContextMenu > should return the correct actions when right clicking
{
"disabled": false,
"id": "execute",
"label": "Execute node",
"label": "Test node",
},
{
"disabled": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/editor-ui/src/composables/useContextMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ export const useContextMenu = (onAction: ContextMenuActionCallback = () => {}) =
},
{
id: 'execute',
label: i18n.baseText('contextMenu.execute'),
label: i18n.baseText('contextMenu.test'),
disabled: isReadOnly.value,
},
{
Expand Down
Loading
Loading