debian-mirror-gitlab/spec/frontend/releases/__snapshots__/util_spec.js.snap

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

410 lines
17 KiB
Text
Raw Normal View History

2020-11-24 15:15:51 +05:30
// Jest Snapshot v1, https://goo.gl/fbAQLP
2021-01-03 14:25:43 +05:30
exports[`releases/util.js convertAllReleasesGraphQLResponse matches snapshot 1`] = `
2020-11-24 15:15:51 +05:30
Object {
"data": Array [
2021-09-04 01:27:46 +05:30
Object {
"_links": Object {
2021-09-30 23:02:18 +05:30
"__typename": "ReleaseLinks",
2021-09-04 01:27:46 +05:30
"closedIssuesUrl": "http://localhost/releases-namespace/releases-project/-/issues?release_tag=v1.2&scope=all&state=closed",
"closedMergeRequestsUrl": "http://localhost/releases-namespace/releases-project/-/merge_requests?release_tag=v1.2&scope=all&state=closed",
"editUrl": "http://localhost/releases-namespace/releases-project/-/releases/v1.2/edit",
"mergedMergeRequestsUrl": "http://localhost/releases-namespace/releases-project/-/merge_requests?release_tag=v1.2&scope=all&state=merged",
"openedIssuesUrl": "http://localhost/releases-namespace/releases-project/-/issues?release_tag=v1.2&scope=all&state=opened",
"openedMergeRequestsUrl": "http://localhost/releases-namespace/releases-project/-/merge_requests?release_tag=v1.2&scope=all&state=opened",
"self": "http://localhost/releases-namespace/releases-project/-/releases/v1.2",
"selfUrl": "http://localhost/releases-namespace/releases-project/-/releases/v1.2",
},
"assets": Object {
"count": 4,
"links": Array [],
"sources": Array [
Object {
2021-09-30 23:02:18 +05:30
"__typename": "ReleaseSource",
2021-09-04 01:27:46 +05:30
"format": "zip",
"url": "http://localhost/releases-namespace/releases-project/-/archive/v1.2/releases-project-v1.2.zip",
},
Object {
2021-09-30 23:02:18 +05:30
"__typename": "ReleaseSource",
2021-09-04 01:27:46 +05:30
"format": "tar.gz",
"url": "http://localhost/releases-namespace/releases-project/-/archive/v1.2/releases-project-v1.2.tar.gz",
},
Object {
2021-09-30 23:02:18 +05:30
"__typename": "ReleaseSource",
2021-09-04 01:27:46 +05:30
"format": "tar.bz2",
"url": "http://localhost/releases-namespace/releases-project/-/archive/v1.2/releases-project-v1.2.tar.bz2",
},
Object {
2021-09-30 23:02:18 +05:30
"__typename": "ReleaseSource",
2021-09-04 01:27:46 +05:30
"format": "tar",
"url": "http://localhost/releases-namespace/releases-project/-/archive/v1.2/releases-project-v1.2.tar",
},
],
},
"author": Object {
2021-09-30 23:02:18 +05:30
"__typename": "UserCore",
2021-09-04 01:27:46 +05:30
"avatarUrl": "https://www.gravatar.com/avatar/16f8e2050ce10180ca571c2eb19cfce2?s=80&d=identicon",
2022-01-26 12:08:38 +05:30
"id": Any<String>,
2021-09-04 01:27:46 +05:30
"username": "administrator",
"webUrl": "http://localhost/administrator",
},
"commit": Object {
"shortId": "b83d6e39",
"title": "Merge branch 'branch-merged' into 'master'",
},
"commitPath": "http://localhost/releases-namespace/releases-project/-/commit/b83d6e391c22777fca1ed3012fce84f633d7fed0",
"descriptionHtml": "<p data-sourcepos=\\"1:1-1:23\\" dir=\\"auto\\">An okay release <gl-emoji title=\\"shrug\\" data-name=\\"shrug\\" data-unicode-version=\\"9.0\\">🤷</gl-emoji></p>",
"evidences": Array [],
"milestones": Array [],
"name": "The second release",
"releasedAt": "2019-01-10T00:00:00Z",
"tagName": "v1.2",
"tagPath": "/releases-namespace/releases-project/-/tags/v1.2",
"upcomingRelease": true,
},
2020-11-24 15:15:51 +05:30
Object {
"_links": Object {
2021-09-30 23:02:18 +05:30
"__typename": "ReleaseLinks",
2021-01-29 00:20:46 +05:30
"closedIssuesUrl": "http://localhost/releases-namespace/releases-project/-/issues?release_tag=v1.1&scope=all&state=closed",
"closedMergeRequestsUrl": "http://localhost/releases-namespace/releases-project/-/merge_requests?release_tag=v1.1&scope=all&state=closed",
2021-01-03 14:25:43 +05:30
"editUrl": "http://localhost/releases-namespace/releases-project/-/releases/v1.1/edit",
2021-01-29 00:20:46 +05:30
"mergedMergeRequestsUrl": "http://localhost/releases-namespace/releases-project/-/merge_requests?release_tag=v1.1&scope=all&state=merged",
"openedIssuesUrl": "http://localhost/releases-namespace/releases-project/-/issues?release_tag=v1.1&scope=all&state=opened",
"openedMergeRequestsUrl": "http://localhost/releases-namespace/releases-project/-/merge_requests?release_tag=v1.1&scope=all&state=opened",
2021-01-03 14:25:43 +05:30
"self": "http://localhost/releases-namespace/releases-project/-/releases/v1.1",
"selfUrl": "http://localhost/releases-namespace/releases-project/-/releases/v1.1",
2020-11-24 15:15:51 +05:30
},
"assets": Object {
2021-01-03 14:25:43 +05:30
"count": 8,
2020-11-24 15:15:51 +05:30
"links": Array [
Object {
2021-09-30 23:02:18 +05:30
"__typename": "ReleaseAssetLink",
2021-01-29 00:20:46 +05:30
"directAssetUrl": "http://localhost/releases-namespace/releases-project/-/releases/v1.1/downloads/binaries/awesome-app-3",
2020-11-24 15:15:51 +05:30
"external": true,
2021-01-03 14:25:43 +05:30
"id": "gid://gitlab/Releases::Link/13",
"linkType": "image",
"name": "Image",
"url": "https://example.com/image",
2020-11-24 15:15:51 +05:30
},
Object {
2021-09-30 23:02:18 +05:30
"__typename": "ReleaseAssetLink",
2021-01-29 00:20:46 +05:30
"directAssetUrl": "http://localhost/releases-namespace/releases-project/-/releases/v1.1/downloads/binaries/awesome-app-2",
2020-11-24 15:15:51 +05:30
"external": true,
2021-01-03 14:25:43 +05:30
"id": "gid://gitlab/Releases::Link/12",
2020-11-24 15:15:51 +05:30
"linkType": "package",
2021-01-03 14:25:43 +05:30
"name": "Package",
2020-11-24 15:15:51 +05:30
"url": "https://example.com/package",
},
Object {
2021-09-30 23:02:18 +05:30
"__typename": "ReleaseAssetLink",
2021-01-29 00:20:46 +05:30
"directAssetUrl": "http://localhost/releases-namespace/releases-project/-/releases/v1.1/downloads/binaries/awesome-app-1",
2021-01-03 14:25:43 +05:30
"external": false,
"id": "gid://gitlab/Releases::Link/11",
"linkType": "runbook",
"name": "Runbook",
"url": "http://localhost/releases-namespace/releases-project/runbook",
},
Object {
2021-09-30 23:02:18 +05:30
"__typename": "ReleaseAssetLink",
2021-01-29 00:20:46 +05:30
"directAssetUrl": "http://localhost/releases-namespace/releases-project/-/releases/v1.1/downloads/binaries/linux-amd64",
2020-11-24 15:15:51 +05:30
"external": true,
2021-01-03 14:25:43 +05:30
"id": "gid://gitlab/Releases::Link/10",
"linkType": "other",
"name": "linux-amd64 binaries",
"url": "https://downloads.example.com/bin/gitlab-linux-amd64",
2020-11-24 15:15:51 +05:30
},
],
"sources": Array [
Object {
2021-09-30 23:02:18 +05:30
"__typename": "ReleaseSource",
2020-11-24 15:15:51 +05:30
"format": "zip",
2021-01-03 14:25:43 +05:30
"url": "http://localhost/releases-namespace/releases-project/-/archive/v1.1/releases-project-v1.1.zip",
2020-11-24 15:15:51 +05:30
},
Object {
2021-09-30 23:02:18 +05:30
"__typename": "ReleaseSource",
2020-11-24 15:15:51 +05:30
"format": "tar.gz",
2021-01-03 14:25:43 +05:30
"url": "http://localhost/releases-namespace/releases-project/-/archive/v1.1/releases-project-v1.1.tar.gz",
2020-11-24 15:15:51 +05:30
},
Object {
2021-09-30 23:02:18 +05:30
"__typename": "ReleaseSource",
2020-11-24 15:15:51 +05:30
"format": "tar.bz2",
2021-01-03 14:25:43 +05:30
"url": "http://localhost/releases-namespace/releases-project/-/archive/v1.1/releases-project-v1.1.tar.bz2",
2020-11-24 15:15:51 +05:30
},
Object {
2021-09-30 23:02:18 +05:30
"__typename": "ReleaseSource",
2020-11-24 15:15:51 +05:30
"format": "tar",
2021-01-03 14:25:43 +05:30
"url": "http://localhost/releases-namespace/releases-project/-/archive/v1.1/releases-project-v1.1.tar",
2020-11-24 15:15:51 +05:30
},
],
},
"author": Object {
2021-09-30 23:02:18 +05:30
"__typename": "UserCore",
2021-01-03 14:25:43 +05:30
"avatarUrl": "https://www.gravatar.com/avatar/16f8e2050ce10180ca571c2eb19cfce2?s=80&d=identicon",
2022-01-26 12:08:38 +05:30
"id": Any<String>,
2021-01-03 14:25:43 +05:30
"username": "administrator",
"webUrl": "http://localhost/administrator",
2020-11-24 15:15:51 +05:30
},
"commit": Object {
2021-01-03 14:25:43 +05:30
"shortId": "b83d6e39",
"title": "Merge branch 'branch-merged' into 'master'",
2020-11-24 15:15:51 +05:30
},
2021-01-03 14:25:43 +05:30
"commitPath": "http://localhost/releases-namespace/releases-project/-/commit/b83d6e391c22777fca1ed3012fce84f633d7fed0",
"descriptionHtml": "<p data-sourcepos=\\"1:1-1:33\\" dir=\\"auto\\">Best. Release. <strong>Ever.</strong> <gl-emoji title=\\"rocket\\" data-name=\\"rocket\\" data-unicode-version=\\"6.0\\">🚀</gl-emoji></p>",
2020-11-24 15:15:51 +05:30
"evidences": Array [
Object {
2021-09-30 23:02:18 +05:30
"__typename": "ReleaseEvidence",
2021-01-03 14:25:43 +05:30
"collectedAt": "2018-12-03T00:00:00Z",
"filepath": "http://localhost/releases-namespace/releases-project/-/releases/v1.1/evidences/1.json",
2022-01-26 12:08:38 +05:30
"id": "gid://gitlab/Releases::Evidence/1",
2021-01-03 14:25:43 +05:30
"sha": "760d6cdfb0879c3ffedec13af470e0f71cf52c6cde4d",
2020-11-24 15:15:51 +05:30
},
],
"milestones": Array [
Object {
2021-09-30 23:02:18 +05:30
"__typename": "Milestone",
2021-01-03 14:25:43 +05:30
"description": "The 12.3 milestone",
"id": "gid://gitlab/Milestone/123",
2020-11-24 15:15:51 +05:30
"issueStats": Object {
2021-01-03 14:25:43 +05:30
"closed": 3,
"total": 5,
2020-11-24 15:15:51 +05:30
},
"stats": undefined,
"title": "12.3",
"webPath": undefined,
2021-01-03 14:25:43 +05:30
"webUrl": "/releases-namespace/releases-project/-/milestones/1",
2020-11-24 15:15:51 +05:30
},
2021-03-08 18:12:59 +05:30
Object {
2021-09-30 23:02:18 +05:30
"__typename": "Milestone",
2021-03-08 18:12:59 +05:30
"description": "The 12.4 milestone",
"id": "gid://gitlab/Milestone/124",
"issueStats": Object {
"closed": 1,
"total": 4,
},
"stats": undefined,
"title": "12.4",
"webPath": undefined,
"webUrl": "/releases-namespace/releases-project/-/milestones/2",
},
2020-11-24 15:15:51 +05:30
],
2021-01-03 14:25:43 +05:30
"name": "The first release",
"releasedAt": "2018-12-10T00:00:00Z",
"tagName": "v1.1",
"tagPath": "/releases-namespace/releases-project/-/tags/v1.1",
"upcomingRelease": true,
2020-11-24 15:15:51 +05:30
},
],
2021-01-03 14:25:43 +05:30
"paginationInfo": Object {
2021-09-30 23:02:18 +05:30
"__typename": "PageInfo",
2021-09-04 01:27:46 +05:30
"endCursor": "eyJyZWxlYXNlZF9hdCI6IjIwMTgtMTItMTAgMDA6MDA6MDAuMDAwMDAwMDAwIFVUQyIsImlkIjoiMSJ9",
2021-01-03 14:25:43 +05:30
"hasNextPage": false,
"hasPreviousPage": false,
2021-09-04 01:27:46 +05:30
"startCursor": "eyJyZWxlYXNlZF9hdCI6IjIwMTktMDEtMTAgMDA6MDA6MDAuMDAwMDAwMDAwIFVUQyIsImlkIjoiMiJ9",
2021-01-03 14:25:43 +05:30
},
}
`;
2021-06-08 01:23:25 +05:30
exports[`releases/util.js convertOneReleaseForEditingGraphQLResponse matches snapshot 1`] = `
Object {
"data": Object {
"_links": Object {
"self": "http://localhost/releases-namespace/releases-project/-/releases/v1.1",
"selfUrl": "http://localhost/releases-namespace/releases-project/-/releases/v1.1",
},
"assets": Object {
"count": undefined,
"links": Array [
Object {
2021-09-30 23:02:18 +05:30
"directAssetPath": "/binaries/awesome-app-3",
2021-06-08 01:23:25 +05:30
"id": "gid://gitlab/Releases::Link/13",
"linkType": "image",
"name": "Image",
"url": "https://example.com/image",
},
Object {
2021-09-30 23:02:18 +05:30
"directAssetPath": "/binaries/awesome-app-2",
2021-06-08 01:23:25 +05:30
"id": "gid://gitlab/Releases::Link/12",
"linkType": "package",
"name": "Package",
"url": "https://example.com/package",
},
Object {
2021-09-30 23:02:18 +05:30
"directAssetPath": "/binaries/awesome-app-1",
2021-06-08 01:23:25 +05:30
"id": "gid://gitlab/Releases::Link/11",
"linkType": "runbook",
"name": "Runbook",
"url": "http://localhost/releases-namespace/releases-project/runbook",
},
Object {
2021-09-30 23:02:18 +05:30
"directAssetPath": "/binaries/linux-amd64",
2021-06-08 01:23:25 +05:30
"id": "gid://gitlab/Releases::Link/10",
"linkType": "other",
"name": "linux-amd64 binaries",
"url": "https://downloads.example.com/bin/gitlab-linux-amd64",
},
],
"sources": Array [],
},
"author": undefined,
"description": "Best. Release. **Ever.** :rocket:",
"evidences": Array [],
"milestones": Array [
Object {
2022-01-26 12:08:38 +05:30
"id": "gid://gitlab/Milestone/123",
2021-06-08 01:23:25 +05:30
"issueStats": Object {},
"stats": undefined,
"title": "12.3",
"webPath": undefined,
"webUrl": undefined,
},
Object {
2022-01-26 12:08:38 +05:30
"id": "gid://gitlab/Milestone/124",
2021-06-08 01:23:25 +05:30
"issueStats": Object {},
"stats": undefined,
"title": "12.4",
"webPath": undefined,
"webUrl": undefined,
},
],
"name": "The first release",
"tagName": "v1.1",
},
}
`;
2021-01-03 14:25:43 +05:30
exports[`releases/util.js convertOneReleaseGraphQLResponse matches snapshot 1`] = `
Object {
"data": Object {
"_links": Object {
2021-09-30 23:02:18 +05:30
"__typename": "ReleaseLinks",
2021-01-29 00:20:46 +05:30
"closedIssuesUrl": "http://localhost/releases-namespace/releases-project/-/issues?release_tag=v1.1&scope=all&state=closed",
"closedMergeRequestsUrl": "http://localhost/releases-namespace/releases-project/-/merge_requests?release_tag=v1.1&scope=all&state=closed",
2021-01-03 14:25:43 +05:30
"editUrl": "http://localhost/releases-namespace/releases-project/-/releases/v1.1/edit",
2021-01-29 00:20:46 +05:30
"mergedMergeRequestsUrl": "http://localhost/releases-namespace/releases-project/-/merge_requests?release_tag=v1.1&scope=all&state=merged",
"openedIssuesUrl": "http://localhost/releases-namespace/releases-project/-/issues?release_tag=v1.1&scope=all&state=opened",
"openedMergeRequestsUrl": "http://localhost/releases-namespace/releases-project/-/merge_requests?release_tag=v1.1&scope=all&state=opened",
2021-01-03 14:25:43 +05:30
"self": "http://localhost/releases-namespace/releases-project/-/releases/v1.1",
"selfUrl": "http://localhost/releases-namespace/releases-project/-/releases/v1.1",
},
"assets": Object {
"count": 8,
"links": Array [
Object {
2021-09-30 23:02:18 +05:30
"__typename": "ReleaseAssetLink",
2021-01-29 00:20:46 +05:30
"directAssetUrl": "http://localhost/releases-namespace/releases-project/-/releases/v1.1/downloads/binaries/awesome-app-3",
2021-01-03 14:25:43 +05:30
"external": true,
"id": "gid://gitlab/Releases::Link/13",
"linkType": "image",
"name": "Image",
"url": "https://example.com/image",
},
Object {
2021-09-30 23:02:18 +05:30
"__typename": "ReleaseAssetLink",
2021-01-29 00:20:46 +05:30
"directAssetUrl": "http://localhost/releases-namespace/releases-project/-/releases/v1.1/downloads/binaries/awesome-app-2",
2021-01-03 14:25:43 +05:30
"external": true,
"id": "gid://gitlab/Releases::Link/12",
"linkType": "package",
"name": "Package",
"url": "https://example.com/package",
},
Object {
2021-09-30 23:02:18 +05:30
"__typename": "ReleaseAssetLink",
2021-01-29 00:20:46 +05:30
"directAssetUrl": "http://localhost/releases-namespace/releases-project/-/releases/v1.1/downloads/binaries/awesome-app-1",
2021-01-03 14:25:43 +05:30
"external": false,
"id": "gid://gitlab/Releases::Link/11",
"linkType": "runbook",
"name": "Runbook",
"url": "http://localhost/releases-namespace/releases-project/runbook",
},
Object {
2021-09-30 23:02:18 +05:30
"__typename": "ReleaseAssetLink",
2021-01-29 00:20:46 +05:30
"directAssetUrl": "http://localhost/releases-namespace/releases-project/-/releases/v1.1/downloads/binaries/linux-amd64",
2021-01-03 14:25:43 +05:30
"external": true,
"id": "gid://gitlab/Releases::Link/10",
"linkType": "other",
"name": "linux-amd64 binaries",
"url": "https://downloads.example.com/bin/gitlab-linux-amd64",
},
],
"sources": Array [
Object {
2021-09-30 23:02:18 +05:30
"__typename": "ReleaseSource",
2021-01-03 14:25:43 +05:30
"format": "zip",
"url": "http://localhost/releases-namespace/releases-project/-/archive/v1.1/releases-project-v1.1.zip",
},
Object {
2021-09-30 23:02:18 +05:30
"__typename": "ReleaseSource",
2021-01-03 14:25:43 +05:30
"format": "tar.gz",
"url": "http://localhost/releases-namespace/releases-project/-/archive/v1.1/releases-project-v1.1.tar.gz",
},
Object {
2021-09-30 23:02:18 +05:30
"__typename": "ReleaseSource",
2021-01-03 14:25:43 +05:30
"format": "tar.bz2",
"url": "http://localhost/releases-namespace/releases-project/-/archive/v1.1/releases-project-v1.1.tar.bz2",
},
Object {
2021-09-30 23:02:18 +05:30
"__typename": "ReleaseSource",
2021-01-03 14:25:43 +05:30
"format": "tar",
"url": "http://localhost/releases-namespace/releases-project/-/archive/v1.1/releases-project-v1.1.tar",
},
],
},
"author": Object {
2021-09-30 23:02:18 +05:30
"__typename": "UserCore",
2021-01-03 14:25:43 +05:30
"avatarUrl": "https://www.gravatar.com/avatar/16f8e2050ce10180ca571c2eb19cfce2?s=80&d=identicon",
2022-01-26 12:08:38 +05:30
"id": Any<String>,
2021-01-03 14:25:43 +05:30
"username": "administrator",
"webUrl": "http://localhost/administrator",
},
"commit": Object {
"shortId": "b83d6e39",
"title": "Merge branch 'branch-merged' into 'master'",
},
"commitPath": "http://localhost/releases-namespace/releases-project/-/commit/b83d6e391c22777fca1ed3012fce84f633d7fed0",
"descriptionHtml": "<p data-sourcepos=\\"1:1-1:33\\" dir=\\"auto\\">Best. Release. <strong>Ever.</strong> <gl-emoji title=\\"rocket\\" data-name=\\"rocket\\" data-unicode-version=\\"6.0\\">🚀</gl-emoji></p>",
"evidences": Array [
Object {
2021-09-30 23:02:18 +05:30
"__typename": "ReleaseEvidence",
2021-01-03 14:25:43 +05:30
"collectedAt": "2018-12-03T00:00:00Z",
"filepath": "http://localhost/releases-namespace/releases-project/-/releases/v1.1/evidences/1.json",
2022-01-26 12:08:38 +05:30
"id": "gid://gitlab/Releases::Evidence/1",
2021-01-03 14:25:43 +05:30
"sha": "760d6cdfb0879c3ffedec13af470e0f71cf52c6cde4d",
},
],
"milestones": Array [
Object {
2021-09-30 23:02:18 +05:30
"__typename": "Milestone",
2021-01-03 14:25:43 +05:30
"description": "The 12.3 milestone",
"id": "gid://gitlab/Milestone/123",
"issueStats": Object {
"closed": 3,
"total": 5,
},
"stats": undefined,
"title": "12.3",
"webPath": undefined,
"webUrl": "/releases-namespace/releases-project/-/milestones/1",
},
2021-03-08 18:12:59 +05:30
Object {
2021-09-30 23:02:18 +05:30
"__typename": "Milestone",
2021-03-08 18:12:59 +05:30
"description": "The 12.4 milestone",
"id": "gid://gitlab/Milestone/124",
"issueStats": Object {
"closed": 1,
"total": 4,
},
"stats": undefined,
"title": "12.4",
"webPath": undefined,
"webUrl": "/releases-namespace/releases-project/-/milestones/2",
},
2021-01-03 14:25:43 +05:30
],
"name": "The first release",
"releasedAt": "2018-12-10T00:00:00Z",
"tagName": "v1.1",
"tagPath": "/releases-namespace/releases-project/-/tags/v1.1",
"upcomingRelease": true,
},
2020-11-24 15:15:51 +05:30
}
`;