Skip to content

Commit

Permalink
KOGITO-9481: [SWF Dev UI] Workflows containing hyphens in their id ar…
Browse files Browse the repository at this point in the history
…e not listed in the workflow definitions tab
  • Loading branch information
paulovmr committed Jun 26, 2023
1 parent 79fa832 commit 7b51861
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ export const getProcessDefinitionList = (
.then((response) => {
const processDefinitionObjs = [];
const paths = response.paths;
const regexPattern = /^\/\w+\/schema/;
const regexPattern = /^\/[^\n]+\/schema/;
Object.getOwnPropertyNames(paths)
.filter((path) => regexPattern.test(path.toString()))
.forEach((url) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -893,15 +893,15 @@ describe('custom forms section', () => {
});

describe('process definitions section', () => {
it('swager parser success', async () => {
it('swagger parser success', async () => {
SwaggerParser.parse['mockImplementation'](() =>
Promise.resolve({
paths: {
'/hiring/schema': {
'/hiring-process/schema': {
get: {},
post: {}
},
'/hiring': {
'/hiring-process': {
get: {},
post: {}
}
Expand All @@ -913,7 +913,10 @@ describe('process definitions section', () => {
'/docs/openapi.json'
);
expect(result).toStrictEqual([
{ processName: 'hiring', endpoint: 'http://localhost:8080/hiring' }
{
processName: 'hiring-process',
endpoint: 'http://localhost:8080/hiring-process'
}
]);
});
it('start process instance success', async () => {
Expand Down

0 comments on commit 7b51861

Please sign in to comment.