diff options
Diffstat (limited to 'spec/frontend/releases')
-rw-r--r-- | spec/frontend/releases/__snapshots__/util_spec.js.snap | 7 | ||||
-rw-r--r-- | spec/frontend/releases/components/app_show_spec.js | 1 | ||||
-rw-r--r-- | spec/frontend/releases/util_spec.js | 23 |
3 files changed, 28 insertions, 3 deletions
diff --git a/spec/frontend/releases/__snapshots__/util_spec.js.snap b/spec/frontend/releases/__snapshots__/util_spec.js.snap index b2580d47549..fd2a8eec4d4 100644 --- a/spec/frontend/releases/__snapshots__/util_spec.js.snap +++ b/spec/frontend/releases/__snapshots__/util_spec.js.snap @@ -44,6 +44,7 @@ Object { "author": Object { "__typename": "UserCore", "avatarUrl": "https://www.gravatar.com/avatar/16f8e2050ce10180ca571c2eb19cfce2?s=80&d=identicon", + "id": Any<String>, "username": "administrator", "webUrl": "http://localhost/administrator", }, @@ -139,6 +140,7 @@ Object { "author": Object { "__typename": "UserCore", "avatarUrl": "https://www.gravatar.com/avatar/16f8e2050ce10180ca571c2eb19cfce2?s=80&d=identicon", + "id": Any<String>, "username": "administrator", "webUrl": "http://localhost/administrator", }, @@ -153,6 +155,7 @@ Object { "__typename": "ReleaseEvidence", "collectedAt": "2018-12-03T00:00:00Z", "filepath": "http://localhost/releases-namespace/releases-project/-/releases/v1.1/evidences/1.json", + "id": "gid://gitlab/Releases::Evidence/1", "sha": "760d6cdfb0879c3ffedec13af470e0f71cf52c6cde4d", }, ], @@ -247,6 +250,7 @@ Object { "evidences": Array [], "milestones": Array [ Object { + "id": "gid://gitlab/Milestone/123", "issueStats": Object {}, "stats": undefined, "title": "12.3", @@ -254,6 +258,7 @@ Object { "webUrl": undefined, }, Object { + "id": "gid://gitlab/Milestone/124", "issueStats": Object {}, "stats": undefined, "title": "12.4", @@ -347,6 +352,7 @@ Object { "author": Object { "__typename": "UserCore", "avatarUrl": "https://www.gravatar.com/avatar/16f8e2050ce10180ca571c2eb19cfce2?s=80&d=identicon", + "id": Any<String>, "username": "administrator", "webUrl": "http://localhost/administrator", }, @@ -361,6 +367,7 @@ Object { "__typename": "ReleaseEvidence", "collectedAt": "2018-12-03T00:00:00Z", "filepath": "http://localhost/releases-namespace/releases-project/-/releases/v1.1/evidences/1.json", + "id": "gid://gitlab/Releases::Evidence/1", "sha": "760d6cdfb0879c3ffedec13af470e0f71cf52c6cde4d", }, ], diff --git a/spec/frontend/releases/components/app_show_spec.js b/spec/frontend/releases/components/app_show_spec.js index 72ebaaaf76c..a60b9bda66a 100644 --- a/spec/frontend/releases/components/app_show_spec.js +++ b/spec/frontend/releases/components/app_show_spec.js @@ -58,7 +58,6 @@ describe('Release show component', () => { const expectFlashWithMessage = (message) => { it(`shows a flash message that reads "${message}"`, () => { - expect(createFlash).toHaveBeenCalledTimes(1); expect(createFlash).toHaveBeenCalledWith({ message, captureError: true, diff --git a/spec/frontend/releases/util_spec.js b/spec/frontend/releases/util_spec.js index 3c1060cb0e8..055c8e8b39f 100644 --- a/spec/frontend/releases/util_spec.js +++ b/spec/frontend/releases/util_spec.js @@ -104,13 +104,32 @@ describe('releases/util.js', () => { describe('convertAllReleasesGraphQLResponse', () => { it('matches snapshot', () => { - expect(convertAllReleasesGraphQLResponse(originalAllReleasesQueryResponse)).toMatchSnapshot(); + expect(convertAllReleasesGraphQLResponse(originalAllReleasesQueryResponse)).toMatchSnapshot({ + data: [ + { + author: { + id: expect.any(String), + }, + }, + { + author: { + id: expect.any(String), + }, + }, + ], + }); }); }); describe('convertOneReleaseGraphQLResponse', () => { it('matches snapshot', () => { - expect(convertOneReleaseGraphQLResponse(originalOneReleaseQueryResponse)).toMatchSnapshot(); + expect(convertOneReleaseGraphQLResponse(originalOneReleaseQueryResponse)).toMatchSnapshot({ + data: { + author: { + id: expect.any(String), + }, + }, + }); }); }); |