diff --git a/plugins/git-release-manager/src/features/Patch/hooks/usePatch.test.ts b/plugins/git-release-manager/src/features/Patch/hooks/usePatch.test.ts
index 41eb936d59..6677a0bbe5 100644
--- a/plugins/git-release-manager/src/features/Patch/hooks/usePatch.test.ts
+++ b/plugins/git-release-manager/src/features/Patch/hooks/usePatch.test.ts
@@ -39,7 +39,7 @@ jest.mock('../../../contexts/UserContext', () => ({
describe('patch', () => {
beforeEach(jest.clearAllMocks);
- it('should return the expected responseSteps and progress', async () => {
+ it('should return the expected responseSteps (including patch validation sequence) and progress', async () => {
const { result } = renderHook(() =>
usePatch({
bumpedTag: mockBumpedTag,
@@ -54,10 +54,10 @@ describe('patch', () => {
});
expect(result.error).toEqual(undefined);
- expect(result.current.responseSteps).toHaveLength(9);
+ expect(result.current.responseSteps).toHaveLength(18);
});
- it('should return the expected responseSteps and progress (with onSuccess)', async () => {
+ it('should return the expected responseSteps (including patch validation sequence) and progress (with onSuccess)', async () => {
const { result } = renderHook(() =>
usePatch({
bumpedTag: mockBumpedTag,
@@ -73,11 +73,56 @@ describe('patch', () => {
});
expect(result.error).toEqual(undefined);
- expect(result.current.responseSteps).toHaveLength(10);
+ expect(result.current.responseSteps).toHaveLength(19);
expect(result.current).toMatchInlineSnapshot(`
Object {
"progress": 100,
"responseSteps": Array [
+ Object {
+ "message": ,
+ },
+ Object {
+ "message": ,
+ },
+ Object {
+ "message": ,
+ },
+ Object {
+ "message": ,
+ },
+ Object {
+ "message": ,
+ },
+ Object {
+ "message": ,
+ },
+ Object {
+ "message": ,
+ },
+ Object {
+ "message": ,
+ },
+ Object {
+ "message": ,
+ },
Object {
"link": "https://mock_branch_links_html",
"message": "Fetched release branch \\"rc/1.2.3\\"",
diff --git a/plugins/git-release-manager/src/test-helpers/mock-api-client.ts b/plugins/git-release-manager/src/test-helpers/mock-api-client.ts
index b2e39d6f7c..bbfe8f7636 100644
--- a/plugins/git-release-manager/src/test-helpers/mock-api-client.ts
+++ b/plugins/git-release-manager/src/test-helpers/mock-api-client.ts
@@ -87,6 +87,10 @@ export const mockApiClient: GitReleaseApi = {
},
})),
+ deleteRef: jest.fn(async () => ({
+ success: true,
+ })),
+
createRelease: jest.fn(async () => ({
release: {
name: 'mock_createRelease_name',