Skip to content

Commit

Permalink
Merge branch 'master' into contact-names
Browse files Browse the repository at this point in the history
  • Loading branch information
kurund authored Sep 24, 2024
2 parents befb1f1 + 2c8b23d commit aaf02fa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/containers/Form/FormLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,10 @@ export const FormLayout = ({
handleOk={() => {
saveHandler(formik.values);
}}
handleCancel={() => setShowConfirmationDialog(false)}
handleCancel={() => {
onSaveClick(false);
setShowConfirmationDialog(false);
}}
colorOk="warning"
alignButtons="center"
contentAlign="center"
Expand Down
10 changes: 9 additions & 1 deletion src/containers/SettingList/Providers/Providers.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,15 @@ describe('update credentials', () => {
fireEvent.change(inputs[0], { target: { value: 'token2' } });
fireEvent.change(inputs[1], { target: { value: 'product_id2' } });

fireEvent.click(screen.getByText('Save'));
fireEvent.click(screen.getByTestId('submitActionButton'));

await waitFor(() => {
expect(screen.getByTestId('dialogBox')).toBeInTheDocument();
});

// testing if it closes the dialog box
fireEvent.click(screen.getByTestId('cancel-button'));
fireEvent.click(screen.getByTestId('submitActionButton'));

await waitFor(() => {
expect(screen.getByTestId('dialogBox')).toBeInTheDocument();
Expand Down

0 comments on commit aaf02fa

Please sign in to comment.