review comments addresed

Signed-off-by: AmbrishRamachandiran <ambrish.r@infosys.com>
This commit is contained in:
AmbrishRamachandiran
2023-08-25 15:26:15 +05:30
parent 2a27eebdaa
commit cdd81a01b6
@@ -48,6 +48,10 @@ describe('UnregisterEntityDialog', () => {
},
};
beforeEach(() => {
jest.spyOn(alertApi, 'post').mockImplementation(() => {});
});
const entity = {
apiVersion: 'backstage.io/v1alpha1',
kind: 'Component',
@@ -346,6 +350,11 @@ describe('UnregisterEntityDialog', () => {
await waitFor(() => {
expect(deleteEntity).toHaveBeenCalled();
expect(onConfirm).toHaveBeenCalled();
expect(alertApi.post).toHaveBeenCalledWith({
message: 'Removed entity n',
severity: 'success',
display: 'transient',
});
});
});
});