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