Skip to content

Commit

Permalink
Merge branch 'master' into n8n-6758-fix-modal-positioning
Browse files Browse the repository at this point in the history
* master:
  fix(editor): Resolve vue 3 related console-warnings (#6779)
  test(editor): Prevent node view unload by default in e2e run (#6787)
  • Loading branch information
MiloradFilipovic committed Jul 28, 2023
2 parents bb3cc48 + 30484a0 commit 0bc8acf
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 51 deletions.
5 changes: 0 additions & 5 deletions cypress/e2e/14-data-transformation-expressions.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ const ndv = new NDV();
describe('Data transformation expressions', () => {
beforeEach(() => {
wf.actions.visit();

cy.window().then((win) => {
// @ts-ignore
win.preventNodeViewBeforeUnload = true;
});
});

it('$json + native string methods', () => {
Expand Down
5 changes: 0 additions & 5 deletions cypress/e2e/14-mapping.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ const ndv = new NDV();
describe('Data mapping', () => {
beforeEach(() => {
workflowPage.actions.visit();

cy.window().then((win) => {
// @ts-ignore
win.preventNodeViewBeforeUnload = true;
});
});

it('maps expressions from table header', () => {
Expand Down
5 changes: 0 additions & 5 deletions cypress/e2e/16-webhook-node.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,6 @@ const simpleWebhookCall = (options: SimpleWebhookCallOptions) => {
describe('Webhook Trigger node', async () => {
beforeEach(() => {
workflowPage.actions.visit();

cy.window().then((win) => {
// @ts-ignore
win.preventNodeViewBeforeUnload = true;
});
});

it('should listen for a GET request', () => {
Expand Down
5 changes: 0 additions & 5 deletions cypress/e2e/25-stickies.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ function checkStickiesStyle(
describe('Canvas Actions', () => {
beforeEach(() => {
workflowPage.actions.visit();

cy.window().then((win) => {
// @ts-ignore
win.preventNodeViewBeforeUnload = true;
});
});

it('adds sticky to canvas with default text and position', () => {
Expand Down
6 changes: 5 additions & 1 deletion cypress/pages/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,13 @@ export class WorkflowPage extends BasePage {
editorTabButton: () => cy.getByTestId('radio-button-workflow'),
};
actions = {
visit: () => {
visit: (preventNodeViewUnload = true) => {
cy.visit(this.url);
cy.waitForLoad();
cy.window().then((win) => {
// @ts-ignore
win.preventNodeViewBeforeUnload = preventNodeViewUnload;
});
},
addInitialNodeToCanvas: (nodeDisplayName: string, { keepNdvOpen } = { keepNdvOpen: false }) => {
this.getters.canvasPlusButton().click();
Expand Down
14 changes: 8 additions & 6 deletions packages/design-system/src/components/N8nPopover/Popover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ export default defineComponent({
</script>

<template>
<el-popover v-bind="{ ...$props, ...$attrs }">
<template #reference>
<slot name="reference" />
</template>
<slot />
</el-popover>
<span>
<el-popover v-bind="{ ...$props, ...$attrs }">
<template #reference>
<slot name="reference" />
</template>
<slot />
</el-popover>
</span>
</template>
36 changes: 19 additions & 17 deletions packages/editor-ui/src/components/NodeExecuteButton.vue
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
<template>
<n8n-tooltip placement="bottom" :disabled="!disabledHint">
<template #content>
<div>{{ disabledHint }}</div>
</template>
<div>
<n8n-button
v-bind="$attrs"
:loading="nodeRunning && !isListeningForEvents && !isListeningForWorkflowEvents"
:disabled="disabled || !!disabledHint"
:label="buttonLabel"
:type="type"
:size="size"
:transparentBackground="transparent"
@click="onClick"
/>
</div>
</n8n-tooltip>
<span>
<n8n-tooltip placement="bottom" :disabled="!disabledHint">
<template #content>
<div>{{ disabledHint }}</div>
</template>
<div>
<n8n-button
v-bind="$attrs"
:loading="nodeRunning && !isListeningForEvents && !isListeningForWorkflowEvents"
:disabled="disabled || !!disabledHint"
:label="buttonLabel"
:type="type"
:size="size"
:transparentBackground="transparent"
@click="onClick"
/>
</div>
</n8n-tooltip>
</span>
</template>

<script lang="ts">
Expand Down
14 changes: 8 additions & 6 deletions packages/editor-ui/src/components/WarningTooltip.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<template>
<n8n-tooltip content=" " placement="top">
<template #content>
<slot />
</template>
<font-awesome-icon :class="$style['icon']" icon="exclamation-triangle"></font-awesome-icon>
</n8n-tooltip>
<span>
<n8n-tooltip content=" " placement="top">
<template #content>
<slot />
</template>
<font-awesome-icon :class="$style['icon']" icon="exclamation-triangle"></font-awesome-icon>
</n8n-tooltip>
</span>
</template>

<style lang="scss" module>
Expand Down
2 changes: 1 addition & 1 deletion packages/editor-ui/src/plugins/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@
"node.waitingForYouToCreateAnEventIn": "Waiting for you to create an event in {nodeType}",
"node.discovery.pinData.canvas": "You can pin this output instead of waiting for a test event. Open node to do so.",
"node.discovery.pinData.ndv": "You can pin this output instead of waiting for a test event.",
"nodeBase.clickToAddNodeOrDragToConnect": "Click to add node<br />or drag to connect",
"nodeBase.clickToAddNodeOrDragToConnect": "Click to add node \n or drag to connect",
"nodeCreator.actionsPlaceholderNode.scheduleTrigger": "On a Schedule",
"nodeCreator.actionsPlaceholderNode.webhook": "On a Webhook call",
"nodeCreator.actionsCategory.actions": "Actions",
Expand Down

0 comments on commit 0bc8acf

Please sign in to comment.