mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
fix(n8n Form Node): Redirection update (no-changelog) (#13104)
Co-authored-by: Dana <152518854+dana-gill@users.noreply.github.com>
This commit is contained in:
@@ -166,7 +166,7 @@ describe('Form Node', () => {
|
||||
formTitle: 'Form Title',
|
||||
n8nWebsiteLink: 'https://n8n.io/?utm_source=n8n-internal&utm_medium=form-trigger',
|
||||
testRun: true,
|
||||
useResponseData: false,
|
||||
useResponseData: true,
|
||||
validForm: true,
|
||||
formSubmittedHeader: undefined,
|
||||
});
|
||||
@@ -230,6 +230,7 @@ describe('Form Node', () => {
|
||||
appendAttribution: 'test',
|
||||
formTitle: 'test',
|
||||
message: 'Test Message',
|
||||
redirectUrl: '',
|
||||
title: 'Test Title',
|
||||
responseText: '',
|
||||
},
|
||||
@@ -242,6 +243,7 @@ describe('Form Node', () => {
|
||||
appendAttribution: 'test',
|
||||
formTitle: 'test',
|
||||
message: 'Test Message',
|
||||
redirectUrl: '',
|
||||
title: 'Test Title',
|
||||
responseText: '<div>hey</div>',
|
||||
},
|
||||
@@ -254,6 +256,7 @@ describe('Form Node', () => {
|
||||
appendAttribution: 'test',
|
||||
formTitle: 'test',
|
||||
message: 'Test Message',
|
||||
redirectUrl: '',
|
||||
title: 'Test Title',
|
||||
responseText: 'my text over here',
|
||||
},
|
||||
@@ -340,9 +343,14 @@ describe('Form Node', () => {
|
||||
const result = await form.webhook(mockWebhookFunctions);
|
||||
|
||||
expect(result).toEqual({ noWebhookResponse: true });
|
||||
expect(mockResponseObject.send).toHaveBeenCalledWith(
|
||||
'<html><head><meta http-equiv="refresh" content="0; url=https://n8n.io"></head></html>',
|
||||
);
|
||||
expect(mockResponseObject.render).toHaveBeenCalledWith('form-trigger-completion', {
|
||||
appendAttribution: 'test',
|
||||
formTitle: 'test',
|
||||
message: 'Test Message',
|
||||
redirectUrl: 'https://n8n.io',
|
||||
responseText: '',
|
||||
title: 'Test Title',
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user