Update e2e tests and n8n node for the portal

Follow the new domain model in tests: drop organization profile
assertions, add a trust center profile test, and hit the dedicated HTTPS
listener with SNI for the visitor API. Mirror the custom link rename and
profile field moves in the n8n node operations.

Signed-off-by: Bryan Frimin <bryan@probo.com>
This commit is contained in:
Bryan Frimin
2026-07-10 15:15:24 +02:00
parent ce1b64b529
commit ebe6192a0c
12 changed files with 435 additions and 232 deletions

View File

@@ -49,59 +49,6 @@ export const description: INodeProperties[] = [
default: '',
description: 'The name of the organization',
},
{
displayName: 'Description',
name: 'description',
type: 'string',
displayOptions: {
show: {
resource: ['organization'],
operation: ['update'],
},
},
default: '',
description: 'The description of the organization',
},
{
displayName: 'Website URL',
name: 'websiteUrl',
type: 'string',
displayOptions: {
show: {
resource: ['organization'],
operation: ['update'],
},
},
default: '',
description: 'The website URL of the organization',
},
{
displayName: 'Email',
name: 'email',
type: 'string',
placeholder: 'name@example.com',
displayOptions: {
show: {
resource: ['organization'],
operation: ['update'],
},
},
default: '',
description: 'The email address of the organization',
},
{
displayName: 'Headquarter Address',
name: 'headquarterAddress',
type: 'string',
displayOptions: {
show: {
resource: ['organization'],
operation: ['update'],
},
},
default: '',
description: 'The headquarter address of the organization',
},
];
export async function execute(
@@ -110,10 +57,6 @@ export async function execute(
): Promise<INodeExecutionData> {
const organizationId = this.getNodeParameter('organizationId', itemIndex) as string;
const name = this.getNodeParameter('name', itemIndex, '') as string;
const description = this.getNodeParameter('description', itemIndex, '') as string;
const websiteUrl = this.getNodeParameter('websiteUrl', itemIndex, '') as string;
const email = this.getNodeParameter('email', itemIndex, '') as string;
const headquarterAddress = this.getNodeParameter('headquarterAddress', itemIndex, '') as string;
const query = `
mutation UpdateOrganization($input: UpdateOrganizationInput!) {
@@ -121,10 +64,6 @@ export async function execute(
organization {
id
name
description
websiteUrl
email
headquarterAddress
logo {
id
fileName
@@ -144,10 +83,6 @@ export async function execute(
const input: Record<string, string> = { organizationId };
if (name) input.name = name;
if (description) input.description = description;
if (websiteUrl) input.websiteUrl = websiteUrl;
if (email) input.email = email;
if (headquarterAddress) input.headquarterAddress = headquarterAddress;
const responseData = await proboConnectApiRequest.call(this, query, { input });

View File

@@ -29,7 +29,7 @@ export const description: INodeProperties[] = [
displayOptions: {
show: {
resource: ['trustCenter'],
operation: ['createExternalUrl'],
operation: ['createCustomLink'],
},
},
default: '',
@@ -43,11 +43,11 @@ export const description: INodeProperties[] = [
displayOptions: {
show: {
resource: ['trustCenter'],
operation: ['createExternalUrl'],
operation: ['createCustomLink'],
},
},
default: '',
description: 'The name of the external URL',
description: 'The name of the custom link',
required: true,
},
{
@@ -57,11 +57,11 @@ export const description: INodeProperties[] = [
displayOptions: {
show: {
resource: ['trustCenter'],
operation: ['createExternalUrl'],
operation: ['createCustomLink'],
},
},
default: '',
description: 'The external URL',
description: 'The custom link',
required: true,
},
];
@@ -75,9 +75,9 @@ export async function execute(
const url = this.getNodeParameter('url', itemIndex) as string;
const query = `
mutation CreateComplianceExternalURL($input: CreateComplianceExternalURLInput!) {
createComplianceExternalURL(input: $input) {
complianceExternalURLEdge {
mutation CreateComplianceCustomLink($input: CreateComplianceCustomLinkInput!) {
createComplianceCustomLink(input: $input) {
complianceCustomLinkEdge {
node {
id
name

View File

@@ -23,17 +23,17 @@ import { proboApiRequest } from '../../GenericFunctions';
export const description: INodeProperties[] = [
{
displayName: 'Compliance External URL ID',
name: 'complianceExternalUrlId',
displayName: 'Compliance Custom Link ID',
name: 'complianceCustomLinkId',
type: 'string',
displayOptions: {
show: {
resource: ['trustCenter'],
operation: ['deleteExternalUrl'],
operation: ['deleteCustomLink'],
},
},
default: '',
description: 'The ID of the compliance external URL to delete',
description: 'The ID of the compliance custom link to delete',
required: true,
},
];
@@ -42,17 +42,17 @@ export async function execute(
this: IExecuteFunctions,
itemIndex: number,
): Promise<INodeExecutionData> {
const complianceExternalUrlId = this.getNodeParameter('complianceExternalUrlId', itemIndex) as string;
const complianceCustomLinkId = this.getNodeParameter('complianceCustomLinkId', itemIndex) as string;
const query = `
mutation DeleteComplianceExternalURL($input: DeleteComplianceExternalURLInput!) {
deleteComplianceExternalURL(input: $input) {
deletedComplianceExternalURLId
mutation DeleteComplianceCustomLink($input: DeleteComplianceCustomLinkInput!) {
deleteComplianceCustomLink(input: $input) {
deletedComplianceCustomLinkId
}
}
`;
const responseData = await proboApiRequest.call(this, query, { input: { id: complianceExternalUrlId } });
const responseData = await proboApiRequest.call(this, query, { input: { id: complianceCustomLinkId } });
return {
json: responseData,

View File

@@ -26,8 +26,8 @@ import * as createReferenceOp from './createReference.operation';
import * as deleteReferenceOp from './deleteReference.operation';
import * as getAllFilesOp from './getAllFiles.operation';
import * as deleteFileOp from './deleteFile.operation';
import * as createExternalUrlOp from './createExternalUrl.operation';
import * as deleteExternalUrlOp from './deleteExternalUrl.operation';
import * as createCustomLinkOp from './createCustomLink.operation';
import * as deleteCustomLinkOp from './deleteCustomLink.operation';
import * as getAllCommitmentGroupsOp from './getAllCommitmentGroups.operation';
import * as createCommitmentGroupOp from './createCommitmentGroup.operation';
import * as updateCommitmentGroupOp from './updateCommitmentGroup.operation';
@@ -62,10 +62,10 @@ export const description: INodeProperties[] = [
action: 'Create a compliance portal commitment group',
},
{
name: 'Create External URL',
value: 'createExternalUrl',
description: 'Create a new compliance external URL',
action: 'Create a compliance external URL',
name: 'Create Custom Link',
value: 'createCustomLink',
description: 'Create a new compliance custom link',
action: 'Create a compliance custom link',
},
{
name: 'Create Reference',
@@ -86,10 +86,10 @@ export const description: INodeProperties[] = [
action: 'Delete a compliance portal commitment group',
},
{
name: 'Delete External URL',
value: 'deleteExternalUrl',
description: 'Delete a compliance external URL',
action: 'Delete a compliance external URL',
name: 'Delete Custom Link',
value: 'deleteCustomLink',
description: 'Delete a compliance custom link',
action: 'Delete a compliance custom link',
},
{
name: 'Delete File',
@@ -161,8 +161,8 @@ export const description: INodeProperties[] = [
...deleteReferenceOp.description,
...getAllFilesOp.description,
...deleteFileOp.description,
...createExternalUrlOp.description,
...deleteExternalUrlOp.description,
...createCustomLinkOp.description,
...deleteCustomLinkOp.description,
...getAllCommitmentGroupsOp.description,
...createCommitmentGroupOp.description,
...updateCommitmentGroupOp.description,
@@ -181,8 +181,8 @@ export {
deleteReferenceOp as deleteReference,
getAllFilesOp as getAllFiles,
deleteFileOp as deleteFile,
createExternalUrlOp as createExternalUrl,
deleteExternalUrlOp as deleteExternalUrl,
createCustomLinkOp as createCustomLink,
deleteCustomLinkOp as deleteCustomLink,
getAllCommitmentGroupsOp as getAllCommitmentGroups,
createCommitmentGroupOp as createCommitmentGroup,
updateCommitmentGroupOp as updateCommitmentGroup,

View File

@@ -76,6 +76,59 @@ export const description: INodeProperties[] = [
default: '',
description: 'Whether search engines should index the trust center',
},
{
displayName: 'Description',
name: 'description',
type: 'string',
displayOptions: {
show: {
resource: ['trustCenter'],
operation: ['update'],
},
},
default: '',
description: 'The description shown on the compliance page',
},
{
displayName: 'Website URL',
name: 'websiteUrl',
type: 'string',
displayOptions: {
show: {
resource: ['trustCenter'],
operation: ['update'],
},
},
default: '',
description: 'The website URL shown on the compliance page',
},
{
displayName: 'Email',
name: 'email',
type: 'string',
placeholder: 'name@example.com',
displayOptions: {
show: {
resource: ['trustCenter'],
operation: ['update'],
},
},
default: '',
description: 'The contact email shown on the compliance page',
},
{
displayName: 'Headquarter Address',
name: 'headquarterAddress',
type: 'string',
displayOptions: {
show: {
resource: ['trustCenter'],
operation: ['update'],
},
},
default: '',
description: 'The headquarter address shown on the compliance page',
},
];
export async function execute(
@@ -85,6 +138,10 @@ export async function execute(
const trustCenterId = this.getNodeParameter('trustCenterId', itemIndex) as string;
const active = this.getNodeParameter('active', itemIndex) as boolean | undefined;
const searchEngineIndexing = this.getNodeParameter('searchEngineIndexing', itemIndex, '') as string;
const description = this.getNodeParameter('description', itemIndex, '') as string;
const websiteUrl = this.getNodeParameter('websiteUrl', itemIndex, '') as string;
const email = this.getNodeParameter('email', itemIndex, '') as string;
const headquarterAddress = this.getNodeParameter('headquarterAddress', itemIndex, '') as string;
const query = `
mutation UpdateTrustCenter($input: UpdateTrustCenterInput!) {
@@ -93,6 +150,10 @@ export async function execute(
id
active
searchEngineIndexing
description
websiteUrl
email
headquarterAddress
createdAt
updatedAt
}
@@ -103,6 +164,10 @@ export async function execute(
const input: Record<string, unknown> = { trustCenterId };
if (active !== undefined) input.active = active;
if (searchEngineIndexing) input.searchEngineIndexing = searchEngineIndexing;
if (description) input.description = description;
if (websiteUrl) input.websiteUrl = websiteUrl;
if (email) input.email = email;
if (headquarterAddress) input.headquarterAddress = headquarterAddress;
const responseData = await proboApiRequest.call(this, query, { input });