Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix variables in process-details page #1848

Merged
merged 2 commits into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ const ProcessDetails: React.FC<ProcessDetailsProps> = ({
};
const getVariableJSON = (): void => {
if (data && data.id === processDetails.id) {
setUpdateJson(JSON.parse(data.variables));
setUpdateJson(data.variables);
}
};
/* istanbul ignore else*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,38 @@ describe('ProcessDetails tests', () => {
parentProcessInstanceId: 'e4448857-fa0c-403b-ad69-f0a353458b9d',
parentProcessInstance: null,
roles: [],
variables:
'{"trip":{"begin":"2019-10-22T22:00:00Z[UTC]","city":"Bangalore","country":"India","end":"2019-10-30T22:00:00Z[UTC]","visaRequired":false},"hotel":{"address":{"city":"Bangalore","country":"India","street":"street","zipCode":"12345"},"bookingNumber":"XX-012345","name":"Perfect hotel","phone":"09876543"},"traveller":{"address":{"city":"Bangalore","country":"US","street":"Bangalore","zipCode":"560093"},"email":"[email protected]","firstName":"Ajay","lastName":"Jaganathan","nationality":"US"}}',
variables: {
trip: {
begin: '2019-10-22T22:00:00Z[UTC]',
city: 'Bangalore',
country: 'India',
end: '2019-10-30T22:00:00Z[UTC]',
visaRequired: false
},
hotel: {
address: {
city: 'Bangalore',
country: 'India',
street: 'street',
zipCode: '12345'
},
bookingNumber: 'XX-012345',
name: 'Perfect hotel',
phone: '09876543'
},
traveller: {
address: {
city: 'Bangalore',
country: 'US',
street: 'Bangalore',
zipCode: '560093'
},
email: '[email protected]',
firstName: 'Ajay',
lastName: 'Jaganathan',
nationality: 'US'
}
} as any,
state: ProcessInstanceState.Active,
start: new Date('2019-10-22T03:40:44.089Z'),
lastUpdate: new Date('Thu, 22 Apr 2021 14:53:04 GMT'),
Expand Down Expand Up @@ -232,8 +262,38 @@ describe('ProcessDetails tests', () => {
parentProcessInstanceId: 'e4448857-fa0c-403b-ad69-f0a353458b9d',
parentProcessInstance: null,
roles: [],
variables:
'{"trip":{"begin":"2019-10-22T22:00:00Z[UTC]","city":"Bangalore","country":"India","end":"2019-10-30T22:00:00Z[UTC]","visaRequired":false},"hotel":{"address":{"city":"Bangalore","country":"India","street":"street","zipCode":"12345"},"bookingNumber":"XX-012345","name":"Perfect hotel","phone":"09876543"},"traveller":{"address":{"city":"Bangalore","country":"US","street":"Bangalore","zipCode":"560093"},"email":"[email protected]","firstName":"Ajay","lastName":"Jaganathan","nationality":"US"}}',
variables: {
trip: {
begin: '2019-10-22T22:00:00Z[UTC]',
city: 'Bangalore',
country: 'India',
end: '2019-10-30T22:00:00Z[UTC]',
visaRequired: false
},
hotel: {
address: {
city: 'Bangalore',
country: 'India',
street: 'street',
zipCode: '12345'
},
bookingNumber: 'XX-012345',
name: 'Perfect hotel',
phone: '09876543'
},
traveller: {
address: {
city: 'Bangalore',
country: 'US',
street: 'Bangalore',
zipCode: '560093'
},
email: '[email protected]',
firstName: 'Ajay',
lastName: 'Jaganathan',
nationality: 'US'
}
} as any,
state: ProcessInstanceState.Completed,
start: new Date('2019-10-22T03:40:44.089Z'),
lastUpdate: new Date('Thu, 22 Apr 2021 14:53:04 GMT'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,9 @@ const processInstance = {
id: 'tEE12-fo54-l665-mp112-akou112345566',
processId: 'travels',
businessKey: 'TEE12',
parentProcessInstanceId: null,
parentProcessInstance: null,
processName: 'travels',
roles: [],
state: ProcessInstanceState.Completed,
rootProcessInstanceId: null,
addons: ['jobs-management', 'prometheus-monitoring', 'process-management'],
start: new Date('2019-10-22T03:40:44.089Z'),
lastUpdate: new Date('2019-10-22T03:40:44.089Z'),
Expand All @@ -56,8 +53,43 @@ const processInstance = {
},
serviceUrl: 'http://localhost:4000',
endpoint: 'http://localhost:4000',
variables:
'{"flight":{"arrival":"2019-10-30T22:00:00Z[UTC]","departure":"2019-10-22T22:00:00Z[UTC]","flightNumber":"MX555"},"trip":{"begin":"2019-10-22T22:00:00Z[UTC]","city":"Bangalore","country":"India","end":"2019-10-30T22:00:00Z[UTC]","visaRequired":false},"hotel":{"address":{"city":"Bangalore","country":"India","street":"street","zipCode":"12345"},"bookingNumber":"XX-012345","name":"Perfect hotel","phone":"09876543"},"traveller":{"address":{"city":"Bangalore","country":"US","street":"Bangalore","zipCode":"560093"},"email":"[email protected]","firstName":"Ajay","lastName":"Jaganathan","nationality":"US"}}',
variables: {
flight: {
arrival: '2019-10-30T22:00:00Z[UTC]',
departure: '2019-10-22T22:00:00Z[UTC]',
flightNumber: 'MX555'
},
trip: {
begin: '2019-10-22T22:00:00Z[UTC]',
city: 'Bangalore',
country: 'India',
end: '2019-10-30T22:00:00Z[UTC]',
visaRequired: false
},
hotel: {
address: {
city: 'Bangalore',
country: 'India',
street: 'street',
zipCode: '12345'
},
bookingNumber: 'XX-012345',
name: 'Perfect hotel',
phone: '09876543'
},
traveller: {
address: {
city: 'Bangalore',
country: 'US',
street: 'Bangalore',
zipCode: '560093'
},
email: '[email protected]',
firstName: 'Ajay',
lastName: 'Jaganathan',
nationality: 'US'
}
} as any,
nodes: [
{
nodeId: '1',
Expand Down
Loading