mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix: fixed param name update and credential edit
This commit is contained in:
parent
baa4a4bad5
commit
da0315d585
|
@ -121,13 +121,13 @@ describe('Webhook Trigger node', async () => {
|
||||||
workflowPage.actions.addNodeToCanvas('Set');
|
workflowPage.actions.addNodeToCanvas('Set');
|
||||||
workflowPage.actions.openNode('Set');
|
workflowPage.actions.openNode('Set');
|
||||||
cy.get('.add-option').click();
|
cy.get('.add-option').click();
|
||||||
cy.get('.add-option').find('.el-select-dropdown__item').contains('Number').click();
|
getVisibleSelect().find('.el-select-dropdown__item').contains('Number').click();
|
||||||
cy.get('.fixed-collection-parameter')
|
cy.get('.fixed-collection-parameter')
|
||||||
.getByTestId('parameter-input-name')
|
.getByTestId('parameter-input-name')
|
||||||
.clear()
|
.clear()
|
||||||
.type('MyValue');
|
.type('MyValue');
|
||||||
cy.get('.fixed-collection-parameter').getByTestId('parameter-input-value').clear().type('1234');
|
cy.get('.fixed-collection-parameter').getByTestId('parameter-input-value').clear().type('1234');
|
||||||
ndv.getters.backToCanvas().click();
|
ndv.getters.backToCanvas().click({ force: true });
|
||||||
|
|
||||||
workflowPage.actions.addNodeToCanvas('Respond to Webhook');
|
workflowPage.actions.addNodeToCanvas('Respond to Webhook');
|
||||||
|
|
||||||
|
@ -173,10 +173,15 @@ describe('Webhook Trigger node', async () => {
|
||||||
getVisibleSelect().find('.el-select-dropdown__item').contains('Number').click();
|
getVisibleSelect().find('.el-select-dropdown__item').contains('Number').click();
|
||||||
cy.get('.fixed-collection-parameter')
|
cy.get('.fixed-collection-parameter')
|
||||||
.getByTestId('parameter-input-name')
|
.getByTestId('parameter-input-name')
|
||||||
|
.find('input')
|
||||||
.clear()
|
.clear()
|
||||||
.type('MyValue');
|
.type('MyValue');
|
||||||
cy.get('.fixed-collection-parameter').getByTestId('parameter-input-value').clear().type('1234');
|
cy.get('.fixed-collection-parameter')
|
||||||
ndv.getters.backToCanvas().click();
|
.getByTestId('parameter-input-value')
|
||||||
|
.find('input')
|
||||||
|
.clear()
|
||||||
|
.type('1234');
|
||||||
|
ndv.getters.backToCanvas().click({ force: true });
|
||||||
|
|
||||||
workflowPage.actions.executeWorkflow();
|
workflowPage.actions.executeWorkflow();
|
||||||
cy.wait(waitForWebhook);
|
cy.wait(waitForWebhook);
|
||||||
|
@ -216,11 +221,7 @@ describe('Webhook Trigger node', async () => {
|
||||||
|
|
||||||
workflowPage.actions.openNode('Move Binary Data');
|
workflowPage.actions.openNode('Move Binary Data');
|
||||||
cy.getByTestId('parameter-input-mode').click();
|
cy.getByTestId('parameter-input-mode').click();
|
||||||
cy.getByTestId('parameter-input-mode')
|
getVisibleSelect().find('.option-headline').contains('JSON to Binary').click();
|
||||||
.find('.el-select-dropdown')
|
|
||||||
.find('.option-headline')
|
|
||||||
.contains('JSON to Binary')
|
|
||||||
.click();
|
|
||||||
ndv.getters.backToCanvas().click();
|
ndv.getters.backToCanvas().click();
|
||||||
|
|
||||||
workflowPage.actions.executeWorkflow();
|
workflowPage.actions.executeWorkflow();
|
||||||
|
@ -249,7 +250,7 @@ describe('Webhook Trigger node', async () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should listen for a GET request with Basic Authentication', () => {
|
it.only('should listen for a GET request with Basic Authentication', () => {
|
||||||
const webhookPath = uuid();
|
const webhookPath = uuid();
|
||||||
simpleWebhookCall({
|
simpleWebhookCall({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
|
|
|
@ -332,7 +332,7 @@ export default defineComponent({
|
||||||
return this.credentialsStore.allUsableCredentialsByType[type];
|
return this.credentialsStore.allUsableCredentialsByType[type];
|
||||||
},
|
},
|
||||||
onDataChange(event: { name: string; value: string | number | boolean | Date | null }): void {
|
onDataChange(event: { name: string; value: string | number | boolean | Date | null }): void {
|
||||||
this.$emit('change', event);
|
this.$emit('update', event);
|
||||||
},
|
},
|
||||||
onDocumentationUrlClick(): void {
|
onDocumentationUrlClick(): void {
|
||||||
this.$telemetry.track('User clicked credential modal docs link', {
|
this.$telemetry.track('User clicked credential modal docs link', {
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
:mode="mode"
|
:mode="mode"
|
||||||
:selectedCredential="selectedCredential"
|
:selectedCredential="selectedCredential"
|
||||||
:showAuthTypeSelector="requiredCredentials"
|
:showAuthTypeSelector="requiredCredentials"
|
||||||
@change="onDataChange"
|
@update="onDataChange"
|
||||||
@oauth="oAuthCredentialAuthorize"
|
@oauth="oAuthCredentialAuthorize"
|
||||||
@retest="retestCredential"
|
@retest="retestCredential"
|
||||||
@scrollToTop="scrollToTop"
|
@scrollToTop="scrollToTop"
|
||||||
|
|
|
@ -605,6 +605,8 @@ export default defineComponent({
|
||||||
valueChanged(parameterData: IUpdateInformation) {
|
valueChanged(parameterData: IUpdateInformation) {
|
||||||
let newValue: NodeParameterValue;
|
let newValue: NodeParameterValue;
|
||||||
|
|
||||||
|
console.log(parameterData);
|
||||||
|
|
||||||
if (parameterData.hasOwnProperty('value')) {
|
if (parameterData.hasOwnProperty('value')) {
|
||||||
// New value is given
|
// New value is given
|
||||||
newValue = parameterData.value as string | number;
|
newValue = parameterData.value as string | number;
|
||||||
|
@ -768,6 +770,8 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log('after set', nodeParameters);
|
||||||
|
|
||||||
// Get the parameters with the now new defaults according to the
|
// Get the parameters with the now new defaults according to the
|
||||||
// from the user actually defined parameters
|
// from the user actually defined parameters
|
||||||
nodeParameters = NodeHelpers.getNodeParameters(
|
nodeParameters = NodeHelpers.getNodeParameters(
|
||||||
|
@ -778,6 +782,8 @@ export default defineComponent({
|
||||||
node,
|
node,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
console.log('after getNodeParameters', nodeParameters);
|
||||||
|
|
||||||
for (const key of Object.keys(nodeParameters as object)) {
|
for (const key of Object.keys(nodeParameters as object)) {
|
||||||
if (nodeParameters && nodeParameters[key] !== null && nodeParameters[key] !== undefined) {
|
if (nodeParameters && nodeParameters[key] !== null && nodeParameters[key] !== undefined) {
|
||||||
this.setValue(`parameters.${key}`, nodeParameters[key] as string);
|
this.setValue(`parameters.${key}`, nodeParameters[key] as string);
|
||||||
|
|
|
@ -131,14 +131,14 @@
|
||||||
|
|
||||||
<n8n-input
|
<n8n-input
|
||||||
v-else
|
v-else
|
||||||
:modelValue="tempValue"
|
v-model="tempValue"
|
||||||
ref="inputField"
|
ref="inputField"
|
||||||
:class="{ 'input-with-opener': true, 'ph-no-capture': shouldRedactValue }"
|
:class="{ 'input-with-opener': true, 'ph-no-capture': shouldRedactValue }"
|
||||||
:size="inputSize"
|
:size="inputSize"
|
||||||
:type="getStringInputType"
|
:type="getStringInputType"
|
||||||
:rows="getArgument('rows')"
|
:rows="getArgument('rows')"
|
||||||
:disabled="isReadOnly"
|
:disabled="isReadOnly"
|
||||||
@update:modelValue="onUpdateTextInput"
|
@update:modelValue="valueChanged($event) && onUpdateTextInput($event)"
|
||||||
@keydown.stop
|
@keydown.stop
|
||||||
@focus="setFocus"
|
@focus="setFocus"
|
||||||
@blur="onBlur"
|
@blur="onBlur"
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
@focus="onFocus"
|
@focus="onFocus"
|
||||||
@blur="onBlur"
|
@blur="onBlur"
|
||||||
@textInput="valueChanged"
|
@textInput="valueChanged"
|
||||||
@update:modelValue="valueChanged"
|
@update="valueChanged"
|
||||||
/>
|
/>
|
||||||
<div :class="$style.errors" v-if="showRequiredErrors">
|
<div :class="$style.errors" v-if="showRequiredErrors">
|
||||||
<n8n-text color="danger" size="small">
|
<n8n-text color="danger" size="small">
|
||||||
|
|
Loading…
Reference in a new issue