Skip to content

Commit

Permalink
fix: avoid UnhandledPromiseRejection error with flows pre
Browse files Browse the repository at this point in the history
  • Loading branch information
Okhelifi authored and gaetanmaisse committed Jun 16, 2022
1 parent 0426178 commit 2fbadf8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/policy-studio/gv-design/gv-design.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ describe('D E S I G N', () => {

test('should update definition when submit schema form with updated flow', async () => {
const _id = 'foobar';
const flow = { _id, name: 'New flow', condition: '#method == "POST"' };
const flow = { _id, name: 'New flow', condition: '#method == "POST"', pre: [], post: [] };
component.definition = { flows: [flow] };

await component._onSelectFlows({ detail: { flows: [flow._id] } });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ describe('P O L I C Y S T U D I O', () => {

test('should update definition when submit schema form with updated flow', async () => {
const _id = 'foobar';
const flow = { _id, name: 'New flow', condition: '#method == "POST"' };
const flow = { _id, name: 'New flow', condition: '#method == "POST"', pre: [], post: [] };
component.definition = { flows: [flow] };

await component._onSelectFlows({ detail: { flows: [flow._id] } });
Expand Down

0 comments on commit 2fbadf8

Please sign in to comment.