diff --git a/ui-packages/packages/process-details/config/Jest-config/test-setup.js b/ui-packages/packages/process-details/config/Jest-config/test-setup.js index fa68854d2d..928f21afd4 100755 --- a/ui-packages/packages/process-details/config/Jest-config/test-setup.js +++ b/ui-packages/packages/process-details/config/Jest-config/test-setup.js @@ -1,6 +1,3 @@ -const enzyme = require('enzyme'); -const Adapter = require('@wojtekmaj/enzyme-adapter-react-17'); const { TextDecoder } = require('util'); global.TextDecoder = TextDecoder; -enzyme.configure({ adapter: new Adapter() }); diff --git a/ui-packages/packages/process-details/jest.config.js b/ui-packages/packages/process-details/jest.config.js new file mode 100644 index 0000000000..a69e62f547 --- /dev/null +++ b/ui-packages/packages/process-details/jest.config.js @@ -0,0 +1,52 @@ +/* + * Copyright 2023 Red Hat, Inc. and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +module.exports = { + setupFiles: [ + './config/Jest-config/test-shim.js', + './config/Jest-config/test-setup.js', + 'core-js' + ], + moduleFileExtensions: ['ts', 'tsx', 'js'], + coveragePathIgnorePatterns: [ + './src/static', + 'dist/', + './src/envelope/index.ts', + './src/embedded/tests/utils/Mocks.ts', + './src/embedded/tests/mocks/Mocks.ts', + './src/envelope/tests/mocks', + './src/envelope/ProcessDetailsEnvelope.tsx' + ], + coverageReporters: [ + [ + 'lcov', + { + projectRoot: '../../' + } + ] + ], + snapshotSerializers: ['enzyme-to-json/serializer'], + transformIgnorePatterns: [], + transform: { + '^.+.jsx?$': './config/Jest-config/babel-jest-wrapper.js', + '^.+.(ts|tsx)$': 'ts-jest', + '.(jpg|jpeg|png|svg)$': './config/Jest-config/fileMocks.js' + }, + testMatch: ['**/tests/*.(ts|tsx|js)'], + moduleNameMapper: { + '.(scss|sass|css)$': 'identity-obj-proxy' + } +}; diff --git a/ui-packages/packages/process-details/package.json b/ui-packages/packages/process-details/package.json index 7b21415643..ae17c99c4d 100644 --- a/ui-packages/packages/process-details/package.json +++ b/ui-packages/packages/process-details/package.json @@ -53,15 +53,12 @@ "@babel/preset-react": "^7.22.5", "@kogito-apps/ouia-tools": "workspace:*", "@testing-library/jest-dom": "^5.16.5", - "@types/enzyme": "^3.10.13", + "@testing-library/react": "^11.2.6", "@types/jest": "^26.0.24", "@types/react": "17.0.5", "@types/react-dom": "^17.0.20", - "@wojtekmaj/enzyme-adapter-react-17": "^0.8.0", "babel-jest": "^25.5.1", "copyfiles": "^2.4.1", - "enzyme": "^3.11.0", - "enzyme-to-json": "^3.6.2", "identity-obj-proxy": "^3.0.0", "jest": "^26.6.3", "jest-junit": "^14.0.1", @@ -70,50 +67,6 @@ "typescript": "^4.9.5", "waait": "^1.0.5" }, - "jest": { - "setupFiles": [ - "./config/Jest-config/test-shim.js", - "./config/Jest-config/test-setup.js", - "core-js" - ], - "moduleFileExtensions": [ - "ts", - "tsx", - "js" - ], - "coveragePathIgnorePatterns": [ - "./src/static", - "dist/", - "src/types/", - "./tests/mocks/", - "./src/api/", - "./src/envelope/contexts/", - "./src/envelope/index.ts" - ], - "coverageReporters": [ - [ - "lcov", - { - "projectRoot": "../../" - } - ] - ], - "snapshotSerializers": [ - "enzyme-to-json/serializer" - ], - "transformIgnorePatterns": [], - "transform": { - "^.+\\.jsx?$": "./config/Jest-config/babel-jest-wrapper.js", - "^.+\\.(ts|tsx)$": "ts-jest", - "\\.(jpg|jpeg|png|svg)$": "./config/Jest-config/fileMocks.js" - }, - "testMatch": [ - "**/tests/*.(ts|tsx|js)" - ], - "moduleNameMapper": { - "\\.(scss|sass|css)$": "identity-obj-proxy" - } - }, "lint-staged": { "*.{ts,tsx}": [ "pnpm run format", diff --git a/ui-packages/packages/process-details/src/embedded/EmbeddedProcessDetails.tsx b/ui-packages/packages/process-details/src/embedded/EmbeddedProcessDetails.tsx index 556ab01531..1a8af870e4 100644 --- a/ui-packages/packages/process-details/src/embedded/EmbeddedProcessDetails.tsx +++ b/ui-packages/packages/process-details/src/embedded/EmbeddedProcessDetails.tsx @@ -71,6 +71,7 @@ export const EmbeddedProcessDetails = React.forwardRef( container: container(), bus: { postMessage(message, targetOrigin, transfer) { + /* istanbul ignore next */ window.postMessage(message, targetOrigin, transfer); } } diff --git a/ui-packages/packages/process-details/src/embedded/tests/EmbeddedProcessDetails.test.tsx b/ui-packages/packages/process-details/src/embedded/tests/EmbeddedProcessDetails.test.tsx index 96a10e4016..c292b0ae44 100644 --- a/ui-packages/packages/process-details/src/embedded/tests/EmbeddedProcessDetails.test.tsx +++ b/ui-packages/packages/process-details/src/embedded/tests/EmbeddedProcessDetails.test.tsx @@ -17,7 +17,7 @@ import React from 'react'; import { EmbeddedProcessDetails } from '../EmbeddedProcessDetails'; import { MockedProcessDetailsDriver } from './mocks/Mocks'; -import { mount } from 'enzyme'; +import { render } from '@testing-library/react'; import { MilestoneStatus, ProcessInstance, @@ -111,13 +111,10 @@ describe('EmbeddedProcessDetails tests', () => { pluralProcessLabel: 'Workflows' }; - const wrapper = mount(); + const container = render().container; - expect(wrapper).toMatchSnapshot(); - expect(wrapper.props().driver).toStrictEqual(props.driver); - expect(wrapper.props().targetOrigin).toStrictEqual(props.targetOrigin); - const div = wrapper.find('div'); - - expect(div.exists()).toBeTruthy(); + expect(container).toMatchSnapshot(); + const contentDiv = container.querySelector('div'); + expect(contentDiv).toBeTruthy(); }); }); diff --git a/ui-packages/packages/process-details/src/embedded/tests/ProcessDetailsChannelApiImpl.test.ts b/ui-packages/packages/process-details/src/embedded/tests/ProcessDetailsChannelApiImpl.test.ts index 7170441c3e..ee437b970e 100644 --- a/ui-packages/packages/process-details/src/embedded/tests/ProcessDetailsChannelApiImpl.test.ts +++ b/ui-packages/packages/process-details/src/embedded/tests/ProcessDetailsChannelApiImpl.test.ts @@ -237,4 +237,17 @@ describe('ProcessDetailsChannelApiImpl tests', () => { node ); }); + + it('processDetails__handleProcessVariableUpdate', () => { + api.processDetails__handleProcessVariableUpdate(processInstance, {}); + expect(driver.handleProcessVariableUpdate).toHaveBeenCalledWith( + processInstance, + {} + ); + }); + + it('processDetails__openProcessDetails', () => { + api.processDetails__openProcessDetails('1234'); + expect(driver.openProcessInstanceDetails).toHaveBeenCalledWith('1234'); + }); }); diff --git a/ui-packages/packages/process-details/src/embedded/tests/__snapshots__/EmbeddedProcessDetails.test.tsx.snap b/ui-packages/packages/process-details/src/embedded/tests/__snapshots__/EmbeddedProcessDetails.test.tsx.snap index 4e4a1855bb..79e713142e 100644 --- a/ui-packages/packages/process-details/src/embedded/tests/__snapshots__/EmbeddedProcessDetails.test.tsx.snap +++ b/ui-packages/packages/process-details/src/embedded/tests/__snapshots__/EmbeddedProcessDetails.test.tsx.snap @@ -1,140 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`EmbeddedProcessDetails tests Snapshot 1`] = ` - - -
- - +
+
+
`; diff --git a/ui-packages/packages/process-details/src/envelope/ProcessDetailsEnvelopeApiImpl.ts b/ui-packages/packages/process-details/src/envelope/ProcessDetailsEnvelopeApiImpl.ts index 0300a2fbd7..2dd8660f13 100644 --- a/ui-packages/packages/process-details/src/envelope/ProcessDetailsEnvelopeApiImpl.ts +++ b/ui-packages/packages/process-details/src/envelope/ProcessDetailsEnvelopeApiImpl.ts @@ -53,6 +53,7 @@ export class ProcessDetailsEnvelopeApiImpl association.origin, association.envelopeServerId ); + /* istanbul ignore if*/ if (this.hasCapturedInitRequestYet()) { return; } diff --git a/ui-packages/packages/process-details/src/envelope/ProcessDetailsEnvelopeView.tsx b/ui-packages/packages/process-details/src/envelope/ProcessDetailsEnvelopeView.tsx index 8528aae9d1..12a8990b94 100644 --- a/ui-packages/packages/process-details/src/envelope/ProcessDetailsEnvelopeView.tsx +++ b/ui-packages/packages/process-details/src/envelope/ProcessDetailsEnvelopeView.tsx @@ -55,7 +55,7 @@ export const ProcessDetailsEnvelopeView = React.forwardRef< useImperativeHandle( forwardedRef, () => ({ - initialize: (initArgs) => { + initialize: /* istanbul ignore next */ (initArgs) => { setProcessInstance(initArgs.processInstance); setOmittedProcessTimelineEvents(initArgs.omittedProcessTimelineEvents); setDiagramPreviewSize(initArgs.diagramPreviewSize); diff --git a/ui-packages/packages/process-details/src/envelope/components/JobActionsKebab/JobActionsKebab.tsx b/ui-packages/packages/process-details/src/envelope/components/JobActionsKebab/JobActionsKebab.tsx index 8b3d2a5fe7..c7b34fce5e 100644 --- a/ui-packages/packages/process-details/src/envelope/components/JobActionsKebab/JobActionsKebab.tsx +++ b/ui-packages/packages/process-details/src/envelope/components/JobActionsKebab/JobActionsKebab.tsx @@ -122,10 +122,16 @@ const JobActionsKebab: React.FC = ({ const dropdownItems = (): JSX.Element[] => { if (job.endpoint !== null && RescheduleJobs.includes(job.status)) { return [ - + Details , = ({ Reschedule , = ({ ]; } else { return [ - + Details ]; diff --git a/ui-packages/packages/process-details/src/envelope/components/JobActionsKebab/tests/JobsActionsKebab.test.tsx b/ui-packages/packages/process-details/src/envelope/components/JobActionsKebab/tests/JobsActionsKebab.test.tsx index 9b992cb1a6..5843bc6ae4 100644 --- a/ui-packages/packages/process-details/src/envelope/components/JobActionsKebab/tests/JobsActionsKebab.test.tsx +++ b/ui-packages/packages/process-details/src/envelope/components/JobActionsKebab/tests/JobsActionsKebab.test.tsx @@ -16,12 +16,7 @@ import React from 'react'; import JobActionsKebab from '../JobActionsKebab'; -import { mount } from 'enzyme'; -import { - Dropdown, - KebabToggle, - DropdownItem -} from '@patternfly/react-core/dist/js/components/Dropdown'; +import { fireEvent, render, waitFor, screen } from '@testing-library/react'; import { act } from 'react-dom/test-utils'; import { MockedProcessDetailsDriver } from '../../../../embedded/tests/mocks/Mocks'; import { JobStatus } from '@kogito-apps/management-console-shared/dist/types'; @@ -30,35 +25,6 @@ const MockedIcon = (): React.ReactElement => { return <>; }; -const MockedComponent = (): React.ReactElement => { - return <>; -}; - -const MockedBulkList = (): React.ReactElement => { - return <>; -}; - -const MockedJobsRescheduleModal = (): React.ReactElement => { - return <>; -}; - -jest.mock('@patternfly/react-core', () => - Object.assign({}, jest.requireActual('@patternfly/react-core'), { - ModalBoxBody: () => - }) -); - -jest.mock('@kogito-apps/management-console-shared', () => - Object.assign( - {}, - jest.requireActual('@kogito-apps/management-console-shared'), - { - BulkList: () => , - JobsRescheduleModal: () => - } - ) -); - jest.mock('@patternfly/react-icons', () => Object.assign({}, jest.requireActual('@patternfly/react-icons'), { InfoCircleIcon: () => { @@ -110,27 +76,18 @@ const prop2 = { }; describe('job actions kebab tests', () => { it('dropdown open/close tests and details click', async () => { - let wrapper = mount(); + const container = render().container; await act(async () => { - wrapper.find(Dropdown).find(KebabToggle).find('button').simulate('click'); + fireEvent.click(container.querySelector('#kebab-toggle')!); }); - wrapper = wrapper.update(); - expect(wrapper).toMatchSnapshot(); - expect( - wrapper - .find(DropdownItem) - .at(0) - .find('button') - .children() - .contains('Details') - ).toBeTruthy(); - expect(wrapper.find(Dropdown).prop('isOpen')).toBeTruthy(); + await waitFor(() => screen.getAllByText('Details')); + expect(screen.getAllByText('Details')).toBeTruthy(); await act(async () => { - wrapper.find(DropdownItem).at(0).find('button').simulate('click'); + fireEvent.click(screen.getByTestId('job-details')); }); - wrapper = wrapper.update(); - expect(wrapper.find(Dropdown).prop('isOpen')).toBeFalsy(); + expect(container).toMatchSnapshot(); }); + it('test reschedule option', async () => { const modalTitle = 'success'; const modalContent = @@ -138,168 +95,32 @@ describe('job actions kebab tests', () => { (prop2.driver.rescheduleJob as jest.Mock).mockImplementationOnce(() => Promise.resolve({ modalTitle, modalContent }) ); - let wrapper = mount(); - const repeatInterval = 0; - const repeatLimit = 2; - const scheduleDate = new Date('2020-08-27T03:35:50.147Z'); + const container = render().container; await act(async () => { - wrapper - .find(Dropdown) - .find(KebabToggle) - .find('#kebab-toggle') - .at(2) - .simulate('click'); + fireEvent.click(container.querySelector('#kebab-toggle')!); }); - wrapper = wrapper.update(); - expect( - wrapper - .find(DropdownItem) - .at(1) - .find('button') - .children() - .contains('Reschedule') - ).toBeTruthy(); + await waitFor(() => screen.getAllByText('Reschedule')); await act(async () => { - wrapper.find(DropdownItem).at(1).find('button').simulate('click'); + fireEvent.click(screen.getByTestId('job-reschedule')); }); - wrapper = wrapper.update(); - - expect(wrapper.find('JobsRescheduleModal').props()['isModalOpen']).toEqual( - true - ); - await act(async () => { - wrapper - .find('JobsRescheduleModal') - .props() - ['handleJobReschedule'](repeatInterval, repeatLimit, scheduleDate); - }); - expect(prop2.driver.rescheduleJob).toHaveBeenCalledWith( - prop2.job, - repeatInterval, - repeatLimit, - scheduleDate - ); + expect(container).toMatchSnapshot(); }); - it('trigger/test apply reschedule method', async () => { - const modalTitle = 'failure'; - const modalContent = 'The job reschedule is failed'; - (prop2.driver.rescheduleJob as jest.Mock).mockImplementationOnce(() => + + it('test job cancel option', async () => { + const modalTitle = 'success'; + const modalContent = + 'The job: 6e74a570-31c8-4020-bd70-19be2cb625f3_0 is canceled successfully'; + (prop2.driver.cancelJob as jest.Mock).mockImplementationOnce(() => Promise.resolve({ modalTitle, modalContent }) ); - const repeatInterval = 0; - const repeatLimit = 2; - const scheduleDate = new Date('2020-08-27T03:35:50.147Z'); - let wrapper = mount(); - + const container = render().container; await act(async () => { - wrapper - .find(Dropdown) - .find(KebabToggle) - .find('#kebab-toggle') - .at(2) - .simulate('click'); + fireEvent.click(container.querySelector('#kebab-toggle')!); }); - wrapper = wrapper.update(); - expect( - wrapper - .find(DropdownItem) - .at(1) - .find('button') - .children() - .contains('Reschedule') - ).toBeTruthy(); + await waitFor(() => screen.getAllByText('Cancel')); await act(async () => { - wrapper.find('#reschedule-option').at(0).simulate('click'); - }); - wrapper = wrapper.update(); - expect(wrapper.find('JobsRescheduleModal').props()['isModalOpen']).toEqual( - true - ); - await act(async () => { - wrapper - .find('JobsRescheduleModal') - .props() - ['handleJobReschedule'](repeatInterval, repeatLimit, scheduleDate); - }); - expect(prop2.driver.rescheduleJob).toHaveBeenCalledWith( - prop2.job, - repeatInterval, - repeatLimit, - scheduleDate - ); - }); - - describe('trigger/test job cancel action', () => { - it('cancel success', async () => { - const modalTitle = 'success'; - const modalContent = - 'The job: 6e74a570-31c8-4020-bd70-19be2cb625f3_0 is canceled successfully'; - (prop2.driver.cancelJob as jest.Mock).mockImplementationOnce(() => - Promise.resolve({ modalTitle, modalContent }) - ); - let wrapper = mount(); - await act(async () => { - wrapper - .find(Dropdown) - .find(KebabToggle) - .find('button') - .simulate('click'); - }); - wrapper = wrapper.update(); - expect( - wrapper - .find(DropdownItem) - .at(2) - .find('button') - .children() - .contains('Cancel') - ).toBeTruthy(); - await act(async () => { - wrapper.find(DropdownItem).at(2).find('button').simulate('click'); - }); - wrapper = wrapper.update(); - expect(wrapper.find('JobsCancelModal').props()['isModalOpen']).toEqual( - true - ); - expect(wrapper.find('JobsCancelModal').props()['modalContent']).toEqual( - 'The job: 6e74a570-31c8-4020-bd70-19be2cb625f3_0 is canceled successfully' - ); - }); - - it('cancel failure', async () => { - const modalTitle = 'failure'; - const modalContent = - 'The job: 6e74a570-31c8-4020-bd70-19be2cb625f3_0 failed. Message: 404 not found'; - (prop2.driver.cancelJob as jest.Mock).mockImplementationOnce(() => - Promise.resolve({ modalTitle, modalContent }) - ); - let wrapper = mount(); - await act(async () => { - wrapper - .find(Dropdown) - .find(KebabToggle) - .find('button') - .simulate('click'); - }); - wrapper = wrapper.update(); - expect( - wrapper - .find(DropdownItem) - .at(2) - .find('button') - .children() - .contains('Cancel') - ).toBeTruthy(); - await act(async () => { - wrapper.find(DropdownItem).at(2).find('button').simulate('click'); - }); - wrapper = wrapper.update(); - expect(wrapper.find('JobsCancelModal').props()['isModalOpen']).toEqual( - true - ); - expect(wrapper.find('JobsCancelModal').props()['modalContent']).toEqual( - 'The job: 6e74a570-31c8-4020-bd70-19be2cb625f3_0 failed. Message: 404 not found' - ); + fireEvent.click(screen.getByTestId('job-cancel')); }); + expect(container).toMatchSnapshot(); }); }); diff --git a/ui-packages/packages/process-details/src/envelope/components/JobActionsKebab/tests/__snapshots__/JobsActionsKebab.test.tsx.snap b/ui-packages/packages/process-details/src/envelope/components/JobActionsKebab/tests/__snapshots__/JobsActionsKebab.test.tsx.snap index 82f444e62e..4c273b3556 100644 --- a/ui-packages/packages/process-details/src/envelope/components/JobActionsKebab/tests/__snapshots__/JobsActionsKebab.test.tsx.snap +++ b/ui-packages/packages/process-details/src/envelope/components/JobActionsKebab/tests/__snapshots__/JobsActionsKebab.test.tsx.snap @@ -1,832 +1,111 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`job actions kebab tests dropdown open/close tests and details click 1`] = ` - - - OK - , - ] - } - modalTitle={ - - <InfoCircleIcon - className="pf-u-mr-sm" - color="var(--pf-global--info-color--100)" - noVerticalAlign={false} - size="sm" - /> - <span> - Job Details - </span> - - } - > - - OK - , - ] - } - appendTo={[Function]} - aria-describedby="" - aria-label="Job Detailsmodal" - aria-labelledby="Job Detailsmodal" - className="" - data-ouia-component-type="job-details-modal" - data-ouia-safe={true} - hasNoBodyWrapper={false} - header={ - - <InfoCircleIcon - className="pf-u-mr-sm" - color="var(--pf-global--info-color--100)" - noVerticalAlign={false} - size="sm" - /> - <span> - Job Details - </span> - - } - isOpen={false} - onClose={[Function]} - ouiaSafe={true} - showClose={true} - title="" - titleIconVariant={null} - titleLabel="" - variant="large" - > - } - > - - OK - , - ] - } - aria-describedby="" - aria-label="Job Detailsmodal" - aria-labelledby="Job Detailsmodal" - boxId="pf-modal-part-0" - className="" - data-ouia-component-type="job-details-modal" - data-ouia-safe={true} - descriptorId="pf-modal-part-2" - hasNoBodyWrapper={false} - header={ - - <InfoCircleIcon - className="pf-u-mr-sm" - color="var(--pf-global--info-color--100)" - noVerticalAlign={false} - size="sm" - /> - <span> - Job Details - </span> - - } - isOpen={false} - labelId="pf-modal-part-1" - onClose={[Function]} - ouiaId="OUIA-Generated-Modal-large-1" - ouiaSafe={true} - showClose={true} - title="" - titleIconVariant={null} - titleLabel="" - variant="large" - /> - - - - - Cancel - , - ] - } - rescheduleError="" - setRescheduleError={[Function]} +
+
- - Apply - , - , - ] - } - appendTo={[Function]} - aria-describedby="" - aria-label="Job Reschedule modal" - aria-labelledby="actionType modal" - className="" - data-ouia-component-type="job-reschedule-modal" - data-ouia-safe={true} - hasNoBodyWrapper={false} - header={ - - <InfoCircleIcon - className="pf-u-mr-sm" - color="var(--pf-global--info-color--100)" - noVerticalAlign={false} - size="sm" - /> - <span> - Job Reschedule - </span> - - } - isOpen={false} - onClose={[Function]} - ouiaSafe={true} - showClose={true} - title="" - titleIconVariant={null} - titleLabel="" - variant="small" + , - , - ] - } - aria-describedby="" - aria-label="Job Reschedule modal" - aria-labelledby="actionType modal" - boxId="pf-modal-part-1" - className="" - data-ouia-component-type="job-reschedule-modal" - data-ouia-safe={true} - descriptorId="pf-modal-part-3" - hasNoBodyWrapper={false} - header={ - - <InfoCircleIcon - className="pf-u-mr-sm" - color="var(--pf-global--info-color--100)" - noVerticalAlign={false} - size="sm" - /> - <span> - Job Reschedule - </span> - - } - isOpen={false} - labelId="pf-modal-part-2" - onClose={[Function]} - ouiaId="OUIA-Generated-Modal-small-1" - ouiaSafe={true} - showClose={true} - title="" - titleIconVariant={null} - titleLabel="" - variant="small" + - - - - OK - , - ] - } - appendTo={[Function]} - aria-describedby="" - aria-label="Reschedule error modal" - aria-labelledby="Reschedule error modal" - className="" - data-ouia-component-type="job-reschedule-error-modal" - data-ouia-safe={true} - hasNoBodyWrapper={false} - header={ - - <InfoCircleIcon - className="pf-u-mr-sm" - color="var(--pf-global--danger-color--100)" - noVerticalAlign={false} - size="sm" - /> - <span> - Job Reschedule - </span> - - } - isOpen={false} - onClose={[Function]} - ouiaSafe={true} - showClose={true} - title="" - titleIconVariant={null} - titleLabel="" - variant="small" - > - } - > - - OK - , - ] - } - aria-describedby="" - aria-label="Reschedule error modal" - aria-labelledby="Reschedule error modal" - boxId="pf-modal-part-2" - className="" - data-ouia-component-type="job-reschedule-error-modal" - data-ouia-safe={true} - descriptorId="pf-modal-part-4" - hasNoBodyWrapper={false} - header={ - - <InfoCircleIcon - className="pf-u-mr-sm" - color="var(--pf-global--danger-color--100)" - noVerticalAlign={false} - size="sm" - /> - <span> - Job Reschedule - </span> - - } - isOpen={false} - labelId="pf-modal-part-3" - onClose={[Function]} - ouiaId="OUIA-Generated-Modal-small-2" - ouiaSafe={true} - showClose={true} - title="" - titleIconVariant={null} - titleLabel="" - variant="small" - /> - - - - + +
+
+`; + +exports[`job actions kebab tests test job cancel option 1`] = ` + +`; + +exports[`job actions kebab tests test reschedule option 1`] = ` +
+
- Details - , - ] - } - isOpen={true} - isPlain={true} - onSelect={[Function]} - position="right" - toggle={ - - } + class="pf-c-dropdown pf-m-align-right" + data-ouia-component-id="OUIA-Generated-Dropdown-2" + data-ouia-component-type="PF4/Dropdown" + data-ouia-safe="true" > - - Details - , - ] - } - isFlipEnabled={true} - isGrouped={false} - isOpen={true} - isPlain={true} - isText={false} - menuAppendTo="inline" - onSelect={[Function]} - position="right" - removeFindDomNode={false} - toggle={ - - } - zIndex={9999} + - -
, - } - } - > - - - -
, - } - } - > - - - - - - -
- - - + + + +
+ `; diff --git a/ui-packages/packages/process-details/src/envelope/components/JobsPanel/tests/JobsPanel.test.tsx b/ui-packages/packages/process-details/src/envelope/components/JobsPanel/tests/JobsPanel.test.tsx index 58201bafff..7224a9d8f9 100644 --- a/ui-packages/packages/process-details/src/envelope/components/JobsPanel/tests/JobsPanel.test.tsx +++ b/ui-packages/packages/process-details/src/envelope/components/JobsPanel/tests/JobsPanel.test.tsx @@ -16,12 +16,10 @@ import React from 'react'; import JobsPanel from '../JobsPanel'; -import { mount } from 'enzyme'; +import { render } from '@testing-library/react'; import { MockedProcessDetailsDriver } from '../../../../embedded/tests/mocks/Mocks'; import { JobStatus } from '@kogito-apps/management-console-shared/dist/types'; -import wait from 'waait'; import { act } from 'react-dom/test-utils'; -jest.mock('../../JobActionsKebab/JobActionsKebab'); const MockedComponent = (): React.ReactElement => { return <>; @@ -123,30 +121,25 @@ const props3 = { Date.now = jest.fn(() => 1592000000000); // UTC Fri Jun 12 2020 22:13:20 describe('Processdetails jobs pannel component tests', () => { it('Snapshot testing', async () => { - let wrapper; + let container; await act(async () => { - wrapper = mount(); - await wait(0); - wrapper = wrapper.update().find('JobsPanel'); + container = render().container; }); - expect(wrapper).toMatchSnapshot(); + expect(container).toMatchSnapshot(); }); it('test expiration time', async () => { - let wrapper; + let container; await act(async () => { - wrapper = mount(); - await wait(0); - wrapper = wrapper.update().find('JobsPanel'); + container = render().container; }); - expect(wrapper).toMatchSnapshot(); + expect(container).toMatchSnapshot(); }); + it('Jobs empty response', async () => { - let wrapper; + let container; await act(async () => { - wrapper = mount(); - await wait(0); - wrapper = wrapper.update().find('JobsPanel'); + container = render().container; }); - expect(wrapper).toMatchSnapshot(); + expect(container).toMatchSnapshot(); }); }); diff --git a/ui-packages/packages/process-details/src/envelope/components/JobsPanel/tests/__snapshots__/JobsPanel.test.tsx.snap b/ui-packages/packages/process-details/src/envelope/components/JobsPanel/tests/__snapshots__/JobsPanel.test.tsx.snap index 2cefd1d639..678369b1e5 100644 --- a/ui-packages/packages/process-details/src/envelope/components/JobsPanel/tests/__snapshots__/JobsPanel.test.tsx.snap +++ b/ui-packages/packages/process-details/src/envelope/components/JobsPanel/tests/__snapshots__/JobsPanel.test.tsx.snap @@ -1,7056 +1,318 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Processdetails jobs pannel component tests Jobs empty response 1`] = ` - -`; +exports[`Processdetails jobs pannel component tests Jobs empty response 1`] = `
`; exports[`Processdetails jobs pannel component tests Snapshot testing 1`] = ` - - +
-
+

+ Jobs +

+
+
- -
+ - - <h3 - className="pf-c-title pf-m-xl" - data-ouia-component-id="OUIA-Generated-Title-1" - data-ouia-component-type="PF4/Title" - data-ouia-safe={true} + <th + class="" + data-key="0" + data-label="Job id" + scope="col" + > + Job id + </th> + <th + class="" + data-key="1" + data-label="Status" + scope="col" + > + Status + </th> + <th + class="" + data-key="2" + data-label="Expiration time" + scope="col" > - Jobs - </h3> - -
-
- -
+ + Actions + + + + - - - 6e74a57 - - , - }, - Object { - "title": - - Executed - , - }, - Object { - "title": - N/A - , - }, - Object { - "title": , - }, - ], - }, - ] - } - selectVariant="checkbox" - variant="compact" + - + + 6e74a57 + + + + +
+ Executed + + N/A + - - - - -
-
-
- - - + + + +
+ + + + + + + `; exports[`Processdetails jobs pannel component tests test expiration time 1`] = ` - - +
-
- -
+ Jobs + +
+
+ + - - <h3 - className="pf-c-title pf-m-xl" - data-ouia-component-id="OUIA-Generated-Title-2" - data-ouia-component-type="PF4/Title" - data-ouia-safe={true} + <th + class="" + data-key="0" + data-label="Job id" + scope="col" + > + Job id + </th> + <th + class="" + data-key="1" + data-label="Status" + scope="col" + > + Status + </th> + <th + class="" + data-key="2" + data-label="Expiration time" + scope="col" + > + Expiration time + </th> + <th + class="" + data-key="3" + data-label="Actions" + scope="col" > - Jobs - </h3> - - - - -
+ +
+ -
- - 6e74a57 - - , - }, - Object { - "title": - - Executed - , - }, - Object { - "title": - - - expires in - - - 2020-08-29T03:35:50.147Z - - - , - }, - Object { - "title": , - }, - ], - }, - ] - } - selectVariant="checkbox" - variant="compact" + - + + 6e74a57 + + + + +
+ Executed + + + expires in + + + - - - - -
-
- -
- - + + + + + + + + + +
+ `; diff --git a/ui-packages/packages/process-details/src/envelope/components/ProcessDetails/ProcessDetails.tsx b/ui-packages/packages/process-details/src/envelope/components/ProcessDetails/ProcessDetails.tsx index dca733715d..b13245520a 100644 --- a/ui-packages/packages/process-details/src/envelope/components/ProcessDetails/ProcessDetails.tsx +++ b/ui-packages/packages/process-details/src/envelope/components/ProcessDetails/ProcessDetails.tsx @@ -130,6 +130,7 @@ const ProcessDetails: React.FC = ({ const errorModalAction: JSX.Element[] = [ @@ -231,6 +234,7 @@ const ProcessDetails: React.FC = ({ handleRefresh(); }} id="refresh-button" + data-testid="refresh-button" aria-label={'Refresh list'} > @@ -279,6 +283,7 @@ const ProcessDetails: React.FC = ({ + + + + + + + + + +
+
+
+
+
+

+ Details +

+
+
+
+
+
+ + +
+
+

+ HotelBooking +

+ +
+
+
+
+ + +
+
+

+ T1234HotelBooking01 +

+ +
+
+
+
+ + +
+
+

+ + Completed +

+ +
+
+
+
+ + +
+
+

+ a1e139d5-4e77-48c9-84ae-34578e904e5a +

+ +
+
+
+
+ + +
+ +
+
+
+ + +
+
+

+ +

+ +
+
+
+
+ + +
+
+

+ +

+ +
+
+
+
+ + +
+
+

+ +

+ +
+
+
+
+
+
+
+
+
+

+ Milestones +

+
+
+
+

+ Milestone 1: Order placed + + + + + + + Active + + +

+

+ Milestone 2: Order shipped + + + + + + + Available + + +

+
+ Manager decision + + + + + + + Completed + + +
+
+
+
+
+
+
+
+
+
+

+ Variables +

+ + + + + + + Changes are saved + + +
+
+
+
+
+
+
+
+ + +
+ + + + + +
+ + + { + + + +
+
+
+
+ + +
+ + + + + +
+ + + + " + + + trip + + + " + + + + : + + + + { + +
+ +
+
+
+
+ + + + " + + + begin + + + " + + + + : + + +
+
+ + string + + + " + 2019-10-22T22:00:00Z[UTC] + " + +
+
+ +
+
+ + + + " + + + city + + + " + + + + : + + +
+
+ + string + + + " + Bangalore + " + +
+
+ +
+
+ + + + " + + + country + + + " + + + + : + + +
+
+ + string + + + " + India + " + +
+
+ +
+
+ + + + " + + + end + + + " + + + + : + + +
+
+ + string + + + " + 2019-10-30T22:00:00Z[UTC] + " + +
+
+ +
+
+ + + + " + + + visaRequired + + + " + + + + : + + +
+
+ + bool + + false +
+
+ +
+
+
+ + + } + + +
+
+ + +
+ + + + + +
+ + + + " + + + hotel + + + " + + + + : + + + + { + +
+ +
+
+
+
+ + +
+ + + + + +
+ + + + " + + + address + + + " + + + + : + + + + { + +
+ +
+
+
+
+ + + + " + + + city + + + " + + + + : + + +
+
+ + string + + + " + Bangalore + " + +
+
+ +
+
+ + + + " + + + country + + + " + + + + : + + +
+
+ + string + + + " + India + " + +
+
+ +
+
+ + + + " + + + street + + + " + + + + : + + +
+
+ + string + + + " + street + " + +
+
+ +
+
+ + + + " + + + zipCode + + + " + + + + : + + +
+
+ + string + + + " + 12345 + " + +
+
+ +
+
+
+ + + } + + +
+
+ + + + " + + + bookingNumber + + + " + + + + : + + +
+
+ + string + + + " + XX-012345 + " + +
+
+ +
+
+ + + + " + + + name + + + " + + + + : + + +
+
+ + string + + + " + Perfect hotel + " + +
+
+ +
+
+ + + + " + + + phone + + + " + + + + : + + +
+
+ + string + + + " + 09876543 + " + +
+
+ +
+
+
+ + + } + + +
+
+ + +
+ + + + + +
+ + + + " + + + traveller + + + " + + + + : + + + + { + +
+ +
+
+
+
+ + +
+ + + + + +
+ + + + " + + + address + + + " + + + + : + + + + { + +
+ +
+
+
+
+ + + + " + + + city + + + " + + + + : + + +
+
+ + string + + + " + Bangalore + " + +
+
+ +
+
+ + + + " + + + country + + + " + + + + : + + +
+
+ + string + + + " + US + " + +
+
+ +
+
+ + + + " + + + street + + + " + + + + : + + +
+
+ + string + + + " + Bangalore + " + +
+
+ +
+
+ + + + " + + + zipCode + + + " + + + + : + + +
+
+ + string + + + " + 560093 + " + +
+
+ +
+
+
+ + + } + + +
+
+ + + + " + + + email + + + " + + + + : + + +
+
+ + string + + + " + ajaganat@redhat.com + " + +
+
+ +
+
+ + + + " + + + firstName + + + " + + + + : + + +
+
+ + string + + + " + Ajay + " + +
+
+ +
+
+ + + + " + + + lastName + + + " + + + + : + + +
+
+ + string + + + " + Jaganathan + " + +
+
+ +
+
+ + + + " + + + nationality + + + " + + + + : + + +
+
+ + string + + + " + US + " + +
+
+ +
+
+
+ + + } + + +
+
+
+ + + } + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ Timeline +

+
+
+
+
+
+ +
+
+
+

+ StartProcess + + + + +

+
+
+
+
+
+
+ +
+
+
+

+ Book hotel + + + + +

+
+
+
+
+
+
+ +
+
+
+

+ End Event 1 + + + + +

+
+
+
+
+
+
+
+
+
+
+
+

+ Jobs +

+
+
+ + + + + + + + + + + + + + + + + +
+ Job id + + Status + + Expiration time + + Actions +
+ + eff4ee- + + + + Scheduled + + + expires in + + + +
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+ , + "container":
+
+
+
+
+

+ + HotelBooking + + + T1234HotelBooking01 + + +
+

+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+

+ Details +

+
+
+
+
+
+ + +
+
+

+ HotelBooking +

+ +
+
+
+
+ + +
+
+

+ T1234HotelBooking01 +

+ +
+
+
+
+ + +
+
+

+ + Completed +

+ +
+
+
+
+ + +
+
+

+ a1e139d5-4e77-48c9-84ae-34578e904e5a +

+ +
+
+
+
+ + +
+ +
+
+
+ + +
+
+

+ +

+ +
+
+
+
+ + +
+
+

+ +

+ +
+
+
+
+ + +
+
+

+ +

+ +
+
+
+
+
+
+
+
+
+

+ Milestones +

+
+
+
+

+ Milestone 1: Order placed + + + + + + + Active + + +

+

+ Milestone 2: Order shipped + + + + + + + Available + + +

+
+ Manager decision + + + + + + + Completed + + +
+
+
+
+
+
+
+
+
+
+

+ Variables +

+ + + + + + + Changes are saved + + +
+
+
+
+
+
+
+
+ + +
+ + + + + +
+ + + { + + + +
+
+
+
+ + +
+ + + + + +
+ + + + " + + + trip + + + " + + + + : + + + + { + +
+ +
+
+
+
+ + + + " + + + begin + + + " + + + + : + + +
+
+ + string + + + " + 2019-10-22T22:00:00Z[UTC] + " + +
+
+ +
+
+ + + + " + + + city + + + " + + + + : + + +
+
+ + string + + + " + Bangalore + " + +
+
+ +
+
+ + + + " + + + country + + + " + + + + : + + +
+
+ + string + + + " + India + " + +
+
+ +
+
+ + + + " + + + end + + + " + + + + : + + +
+
+ + string + + + " + 2019-10-30T22:00:00Z[UTC] + " + +
+
+ +
+
+ + + + " + + + visaRequired + + + " + + + + : + + +
+
+ + bool + + false +
+
+ +
+
+
+ + + } + + +
+
+ + +
+ + + + + +
+ + + + " + + + hotel + + + " + + + + : + + + + { + +
+ +
+
+
+
+ + +
+ + + + + +
+ + + + " + + + address + + + " + + + + : + + + + { + +
+ +
+
+
+
+ + + + " + + + city + + + " + + + + : + + +
+
+ + string + + + " + Bangalore + " + +
+
+ +
+
+ + + + " + + + country + + + " + + + + : + + +
+
+ + string + + + " + India + " + +
+
+ +
+
+ + + + " + + + street + + + " + + + + : + + +
+
+ + string + + + " + street + " + +
+
+ +
+
+ + + + " + + + zipCode + + + " + + + + : + + +
+
+ + string + + + " + 12345 + " + +
+
+ +
+
+
+ + + } + + +
+
+ + + + " + + + bookingNumber + + + " + + + + : + + +
+
+ + string + + + " + XX-012345 + " + +
+
+ +
+
+ + + + " + + + name + + + " + + + + : + + +
+
+ + string + + + " + Perfect hotel + " + +
+
+ +
+
+ + + + " + + + phone + + + " + + + + : + + +
+
+ + string + + + " + 09876543 + " + +
+
+ +
+
+
+ + + } + + +
+
+ + +
+ + + + + +
+ + + + " + + + traveller + + + " + + + + : + + + + { + +
+ +
+
+
+
+ + +
+ + + + + +
+ + + + " + + + address + + + " + + + + : + + + + { + +
+ +
+
+
+
+ + + + " + + + city + + + " + + + + : + + +
+
+ + string + + + " + Bangalore + " + +
+
+ +
+
+ + + + " + + + country + + + " + + + + : + + +
+
+ + string + + + " + US + " + +
+
+ +
+
+ + + + " + + + street + + + " + + + + : + + +
+
+ + string + + + " + Bangalore + " + +
+
+ +
+
+ + + + " + + + zipCode + + + " + + + + : + + +
+
+ + string + + + " + 560093 + " + +
+
+ +
+
+
+ + + } + + +
+
+ + + + " + + + email + + + " + + + + : + + +
+
+ + string + + + " + ajaganat@redhat.com + " + +
+
+ +
+
+ + + + " + + + firstName + + + " + + + + : + + +
+
+ + string + + + " + Ajay + " + +
+
+ +
+
+ + + + " + + + lastName + + + " + + + + : + + +
+
+ + string + + + " + Jaganathan + " + +
+
+ +
+
+ + + + " + + + nationality + + + " + + + + : + + +
+
+ + string + + + " + US + " + +
+
+ +
+
+
+ + + } + + +
+
+
+ + + } + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ Timeline +

+
+
+
+
+
+ +
+
+
+

+ StartProcess + + + + +

+
+
+
+
+
+
+ +
+
+
+

+ Book hotel + + + + +

+
+
+
+
+
+
+ +
+
+
+

+ End Event 1 + + + + +

+
+
+
+
+
+
+
+
+
+
+
+

+ Jobs +

+
+
+ + + + + + + + + + + + + + + + + +
+ Job id + + Status + + Expiration time + + Actions +
+ + eff4ee- + + + + Scheduled + + + expires in + + + +
+ +
+
+
+
+
+
+
+
, + "debug": [Function], + "findAllByAltText": [Function], + "findAllByDisplayValue": [Function], + "findAllByLabelText": [Function], + "findAllByPlaceholderText": [Function], + "findAllByRole": [Function], + "findAllByTestId": [Function], + "findAllByText": [Function], + "findAllByTitle": [Function], + "findByAltText": [Function], + "findByDisplayValue": [Function], + "findByLabelText": [Function], + "findByPlaceholderText": [Function], + "findByRole": [Function], + "findByTestId": [Function], + "findByText": [Function], + "findByTitle": [Function], + "getAllByAltText": [Function], + "getAllByDisplayValue": [Function], + "getAllByLabelText": [Function], + "getAllByPlaceholderText": [Function], + "getAllByRole": [Function], + "getAllByTestId": [Function], + "getAllByText": [Function], + "getAllByTitle": [Function], + "getByAltText": [Function], + "getByDisplayValue": [Function], + "getByLabelText": [Function], + "getByPlaceholderText": [Function], + "getByRole": [Function], + "getByTestId": [Function], + "getByText": [Function], + "getByTitle": [Function], + "queryAllByAltText": [Function], + "queryAllByDisplayValue": [Function], + "queryAllByLabelText": [Function], + "queryAllByPlaceholderText": [Function], + "queryAllByRole": [Function], + "queryAllByTestId": [Function], + "queryAllByText": [Function], + "queryAllByTitle": [Function], + "queryByAltText": [Function], + "queryByDisplayValue": [Function], + "queryByLabelText": [Function], + "queryByPlaceholderText": [Function], + "queryByRole": [Function], + "queryByTestId": [Function], + "queryByText": [Function], + "queryByTitle": [Function], + "rerender": [Function], + "unmount": [Function], +} +`; + exports[`ProcessDetails tests ProcessDetails tests with success results Snapshot tests with default prop 1`] = ` -", - }, - }, - ], - }, - "getTriggerableNodes": [MockFunction], - "handleNodeInstanceCancel": [MockFunction], - "handleNodeInstanceRetrigger": [MockFunction], - "handleNodeTrigger": [MockFunction], - "handleProcessAbort": [MockFunction], - "handleProcessRetry": [MockFunction], - "handleProcessSkip": [MockFunction], - "handleProcessVariableUpdate": [MockFunction], - "jobsQuery": [MockFunction] { - "calls": Array [ - Array [ - "a1e139d5-4e77-48c9-84ae-34578e904e5a", - ], - ], - "results": Array [ - Object { - "type": "return", - "value": Array [ - Object { - "callbackEndpoint": "http://localhost:8080/management/jobs/travels/instances/5c56eeff-4cbf-3313-a325-4c895e0afced/timers/dad3aa88-5c1e-4858-a919-6123c675a0fa_0", - "endpoint": "http://localhost:4000/jobs", - "executionCounter": 0, - "expirationTime": 2020-08-29T04:35:54.631Z, - "id": "eff4ee-11qw23-6675-pokau97-qwedjut45a0fa_0", - "lastUpdate": 2020-06-29T03:35:54.635Z, - "priority": 0, - "processId": "travels", - "processInstanceId": "a1e139d5-4e77-48c9-84ae-34578e904e5a", - "repeatInterval": null, - "repeatLimit": null, - "retries": 2, - "rootProcessId": "", - "scheduledId": null, - "status": "SCHEDULED", - }, - ], - }, - ], - }, - "openProcessInstanceDetails": [MockFunction], - "processDetailsQuery": [MockFunction], - "rescheduleJob": [MockFunction], - } - } - id="a1e139d5-4e77-48c9-84ae-34578e904e5a" - isEnvelopeConnectedToChannel={true} - omittedProcessTimelineEvents={Array []} - pluralProcessLabel="Workflows" - processDetails={ - Object { - "addons": Array [ - "process-management", - ], - "businessKey": "T1234HotelBooking01", - "childProcessInstances": Array [], - "end": 2019-10-22T05:40:44.089Z, - "endpoint": "http://localhost:4000", - "error": Object { - "__typename": "ProcessInstanceError", - "message": "some thing went wrong", - "nodeDefinitionId": "a1e139d5-4e77-48c9-84ae-34578e904e6b", - }, - "id": "a1e139d5-4e77-48c9-84ae-34578e904e5a", - "lastUpdate": 2021-04-22T14:53:04.000Z, - "milestones": Array [ - Object { - "__typename": "Milestone", - "id": "27107f38-d888-4edf-9a4f-11b9e6d75i86", - "name": "Manager decision", - "status": "COMPLETED", - }, - Object { - "__typename": "Milestone", - "id": "27107f38-d888-4edf-9a4f-11b9e6d75m36", - "name": "Milestone 1: Order placed", - "status": "ACTIVE", - }, - Object { - "__typename": "Milestone", - "id": "27107f38-d888-4edf-9a4f-11b9e6d75m66", - "name": "Milestone 2: Order shipped", - "status": "AVAILABLE", - }, - ], - "nodes": Array [ - Object { - "__typename": "NodeInstance", - "definitionId": "EndEvent_1", - "enter": 2019-10-22T03:37:30.798Z, - "exit": 2019-10-22T03:37:30.798Z, - "id": "27107f38-d888-4edf-9a4f-11b9e6d751b6", - "name": "End Event 1", - "nodeId": "1", - "type": "EndNode", - }, - Object { - "__typename": "NodeInstance", - "definitionId": "ServiceTask_1", - "enter": 2019-10-22T03:37:30.795Z, - "exit": 2019-10-22T03:37:30.798Z, - "id": "41b3f49e-beb3-4b5f-8130-efd28f82b971", - "name": "Book hotel", - "nodeId": "2", - "type": "WorkItemNode", - }, - Object { - "__typename": "NodeInstance", - "definitionId": "StartEvent_1", - "enter": 2019-10-22T03:37:30.793Z, - "exit": 2019-10-22T03:37:30.795Z, - "id": "4165a571-2c79-4fd0-921e-c6d5e7851b67", - "name": "StartProcess", - "nodeId": "2", - "type": "StartNode", - }, - ], - "parentProcessInstance": null, - "parentProcessInstanceId": "e4448857-fa0c-403b-ad69-f0a353458b9d", - "processId": "hotelBooking", - "processName": "HotelBooking", - "roles": Array [], - "serviceUrl": "http://localhost:4000", - "start": 2019-10-22T03:40:44.089Z, - "state": "COMPLETED", - "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\\":\\"ajaganat@redhat.com\\",\\"firstName\\":\\"Ajay\\",\\"lastName\\":\\"Jaganathan\\",\\"nationality\\":\\"US\\"}}", - } - } - showSwfDiagram={true} - singularProcessLabel="Workflow" -> - +
+
+
+
+

+ + HotelBooking + + + T1234HotelBooking01 + + +
+

+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
- +
+
+
+

+ Serverless Workflow Diagram +

+
+
+