summaryrefslogtreecommitdiff
path: root/spec/frontend/environments/helpers/__snapshots__/deployment_data_transformation_helper_spec.js.snap
blob: 401c10338c13e603fd4cc5469deb1f654383ecf7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`deployment_data_transformation_helper convertToDeploymentTableRow should be converted to proper table row data 1`] = `
Object {
  "commit": Object {
    "author": Object {
      "avatar_url": "/uploads/-/system/user/avatar/1/avatar.png",
      "path": "http://gdk.test:3000/root",
      "username": "Administrator",
    },
    "commitRef": Object {
      "name": "main",
    },
    "commitUrl": "http://gdk.test:3000/gitlab-org/pipelinestest/-/commit/0cb48dd5deddb7632fd7c3defb16075fc6c3ca74",
    "shortSha": "0cb48dd5",
    "tag": false,
    "title": "Update .gitlab-ci.yml file",
  },
  "created": "2022-10-17T07:44:17Z",
  "deployed": "2022-10-17T07:44:43Z",
  "id": "31",
  "job": Object {
    "label": "deploy-prod (#860)",
    "webPath": "/gitlab-org/pipelinestest/-/jobs/860",
  },
  "status": "success",
  "triggerer": Object {
    "avatarUrl": "/uploads/-/system/user/avatar/1/avatar.png",
    "id": "gid://gitlab/User/1",
    "name": "Administrator",
    "webUrl": "http://gdk.test:3000/root",
  },
}
`;

exports[`deployment_data_transformation_helper convertToDeploymentTableRow should be converted to proper table row data 2`] = `
Object {
  "commit": Object {
    "author": Object {
      "avatar_url": "/uploads/-/system/user/avatar/1/avatar.png",
      "path": "http://gdk.test:3000/root",
      "username": "Administrator",
    },
    "commitRef": Object {
      "name": "main",
    },
    "commitUrl": "http://gdk.test:3000/gitlab-org/pipelinestest/-/commit/0cb48dd5deddb7632fd7c3defb16075fc6c3ca74",
    "shortSha": "0cb48dd5",
    "tag": false,
    "title": "Update .gitlab-ci.yml file",
  },
  "created": "2022-10-17T07:44:17Z",
  "deployed": "2022-10-17T07:44:43Z",
  "id": "31",
  "job": undefined,
  "status": "success",
  "triggerer": Object {
    "avatarUrl": "/uploads/-/system/user/avatar/1/avatar.png",
    "id": "gid://gitlab/User/1",
    "name": "Administrator",
    "webUrl": "http://gdk.test:3000/root",
  },
}
`;

exports[`deployment_data_transformation_helper convertToDeploymentTableRow should be converted to proper table row data 3`] = `
Object {
  "commit": Object {
    "author": Object {
      "avatar_url": "/uploads/-/system/user/avatar/1/avatar.png",
      "path": "http://gdk.test:3000/root",
      "username": "Administrator",
    },
    "commitRef": Object {
      "name": "main",
    },
    "commitUrl": "http://gdk.test:3000/gitlab-org/pipelinestest/-/commit/0cb48dd5deddb7632fd7c3defb16075fc6c3ca74",
    "shortSha": "0cb48dd5",
    "tag": false,
    "title": "Update .gitlab-ci.yml file",
  },
  "created": "2022-10-17T07:44:17Z",
  "deployed": "",
  "id": "31",
  "job": null,
  "status": "success",
  "triggerer": Object {
    "avatarUrl": "/uploads/-/system/user/avatar/1/avatar.png",
    "id": "gid://gitlab/User/1",
    "name": "Administrator",
    "webUrl": "http://gdk.test:3000/root",
  },
}
`;

exports[`deployment_data_transformation_helper getAuthorFromCommit should be properly converted 1`] = `
Object {
  "avatar_url": "/uploads/-/system/user/avatar/1/avatar.png",
  "path": "http://gdk.test:3000/root",
  "username": "Administrator",
}
`;

exports[`deployment_data_transformation_helper getAuthorFromCommit should be properly converted 2`] = `
Object {
  "avatar_url": "https://www.gravatar.com/avatar/91811aee1dec1b2655fa56f894e9e7c9?s=80&d=identicon",
  "path": "mailto:azubov@gitlab.com",
  "username": "Andrei Zubov",
}
`;

exports[`deployment_data_transformation_helper getCommitFromDeploymentNode should get correclty formatted commit object 1`] = `
Object {
  "author": Object {
    "avatar_url": "/uploads/-/system/user/avatar/1/avatar.png",
    "path": "http://gdk.test:3000/root",
    "username": "Administrator",
  },
  "commitRef": Object {
    "name": "main",
  },
  "commitUrl": "http://gdk.test:3000/gitlab-org/pipelinestest/-/commit/0cb48dd5deddb7632fd7c3defb16075fc6c3ca74",
  "shortSha": "0cb48dd5",
  "tag": false,
  "title": "Update .gitlab-ci.yml file",
}
`;