@digital-ai/devops-page-object-release 0.0.10 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/main.js +1800 -1396
- package/dist/main.js.map +1 -1
- package/dist/module.js +661 -257
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +197 -137
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/module.js
CHANGED
|
@@ -15,141 +15,6 @@ import $hOLA6$lodashtoPairs from "lodash/toPairs";
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
const $f86fbaaa8b4e8c61$export$45f0aca2596a2bb3 = function() {
|
|
20
|
-
const RELEASE_TYPE = "xlrelease.Release";
|
|
21
|
-
const PHASE_TYPE = "xlrelease.Phase";
|
|
22
|
-
const TEAM_TYPE = "xlrelease.Team";
|
|
23
|
-
const TASK_TYPE = "xlrelease.Task";
|
|
24
|
-
const COMMENT_TYPE = "xlrelease.Comment";
|
|
25
|
-
const CONDITION_TYPE = "xlrelease.GateCondition";
|
|
26
|
-
const DEPENDENCY_TYPE = "xlrelease.Dependency";
|
|
27
|
-
const LINK_TYPE = "xlrelease.Link";
|
|
28
|
-
const ATTACHMENT_TYPE = "xlrelease.Attachment";
|
|
29
|
-
const DASHBOARD_TYPE = "xlrelease.Dashboard";
|
|
30
|
-
const _TRIGGER_TYPE = "xlrelease.ReleaseTrigger";
|
|
31
|
-
const JIRA_TYPE = "jira.CreateIssue";
|
|
32
|
-
const DEFAULT_TASK_OWNER = "Itchy";
|
|
33
|
-
const processTasks = (task, container, index)=>{
|
|
34
|
-
if ((0, $hOLA6$lodashisUndefined)(task.type)) task.type = TASK_TYPE;
|
|
35
|
-
task.id = task.id || `${container.id}/Task${index}`;
|
|
36
|
-
if ((0, $hOLA6$lodashisUndefined)(task.owner) && task.type !== JIRA_TYPE) task.owner = DEFAULT_TASK_OWNER;
|
|
37
|
-
if (task.owner === null) delete task.owner;
|
|
38
|
-
(0, $hOLA6$lodasheach)(task.conditions, function(condition, idx) {
|
|
39
|
-
condition.type = CONDITION_TYPE;
|
|
40
|
-
condition.id = `${task.id}/GateCondition${idx}`;
|
|
41
|
-
});
|
|
42
|
-
(0, $hOLA6$lodasheach)(task.dependencies, function(dependency, idx) {
|
|
43
|
-
dependency.type = DEPENDENCY_TYPE;
|
|
44
|
-
dependency.id = `${task.id}/Dependency${idx}`;
|
|
45
|
-
});
|
|
46
|
-
(0, $hOLA6$lodasheach)(task.links, function(link, idx) {
|
|
47
|
-
link.type = LINK_TYPE;
|
|
48
|
-
link.id = `${task.id}/Link${idx}`;
|
|
49
|
-
});
|
|
50
|
-
(0, $hOLA6$lodasheach)(task.comments, function(comment, idx) {
|
|
51
|
-
comment.type = COMMENT_TYPE;
|
|
52
|
-
comment.id = `${task.id}/Comment${idx}`;
|
|
53
|
-
});
|
|
54
|
-
(0, $hOLA6$lodasheach)(task.tasks, function(subTask, idx) {
|
|
55
|
-
processTasks(subTask, task, idx);
|
|
56
|
-
});
|
|
57
|
-
(0, $hOLA6$lodasheach)(task.templateVariables, function(variable, idx) {
|
|
58
|
-
(0, $hOLA6$lodashdefaults)(variable, getVariableEntity(variable.value, variable.key, task.id, idx));
|
|
59
|
-
});
|
|
60
|
-
(0, $hOLA6$lodasheach)(task.attachments, function(attachment, idx) {
|
|
61
|
-
attachment.type = ATTACHMENT_TYPE;
|
|
62
|
-
attachment.id = `${task.id}/Attachment${idx}`;
|
|
63
|
-
});
|
|
64
|
-
if (task.pythonScript) {
|
|
65
|
-
const pythonScript = task.pythonScript;
|
|
66
|
-
pythonScript.id = `${task.id}/PythonScript`;
|
|
67
|
-
pythonScript.customScriptTask = task.id;
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
const processPhases = (phase, release, index)=>{
|
|
71
|
-
phase.type = PHASE_TYPE;
|
|
72
|
-
phase.id = `${release.id}/Phase${index}`;
|
|
73
|
-
(0, $hOLA6$lodashforEach)(phase.tasks, (task, idx)=>{
|
|
74
|
-
processTasks(task, phase, idx);
|
|
75
|
-
});
|
|
76
|
-
};
|
|
77
|
-
const getVariableEntity = (value, key, containerId, index, password)=>{
|
|
78
|
-
const keyNoSyntax = key.replace("${", "").replace("}", "");
|
|
79
|
-
return {
|
|
80
|
-
id: `${containerId}/Variable${index}`,
|
|
81
|
-
key: keyNoSyntax,
|
|
82
|
-
requiresValue: true,
|
|
83
|
-
showOnReleaseStart: true,
|
|
84
|
-
type: password ? "xlrelease.PasswordStringVariable" : "xlrelease.StringVariable",
|
|
85
|
-
value: value
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
const getValueProviderConfigurationEntity = function(containerId) {
|
|
89
|
-
return {
|
|
90
|
-
id: `${containerId}/valueProvider`,
|
|
91
|
-
variable: containerId
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
const getDashboardExtension = (dashboard, releaseId)=>{
|
|
95
|
-
const dashboardExtension = {
|
|
96
|
-
id: `${releaseId}/summary`,
|
|
97
|
-
type: DASHBOARD_TYPE,
|
|
98
|
-
tiles: []
|
|
99
|
-
};
|
|
100
|
-
if (dashboard.tiles) (0, $hOLA6$lodashforEach)(dashboard.tiles, function(tile, index) {
|
|
101
|
-
dashboardExtension.tiles.push(getTileEntity(tile, `${releaseId}/summary`, index));
|
|
102
|
-
});
|
|
103
|
-
return dashboardExtension;
|
|
104
|
-
};
|
|
105
|
-
function getTileEntity(tile, containerId, index) {
|
|
106
|
-
tile.id = tile.id || `${containerId}/Tile${index}`;
|
|
107
|
-
return tile;
|
|
108
|
-
}
|
|
109
|
-
return function(release) {
|
|
110
|
-
release.type = RELEASE_TYPE;
|
|
111
|
-
if (release.id.indexOf("Applications/") === -1) release.id = `Applications/${release.id}`;
|
|
112
|
-
if (release.startDate) release.queryableStartDate = release.startDate;
|
|
113
|
-
else if (release.scheduledStartDate) release.queryableStartDate = release.scheduledStartDate;
|
|
114
|
-
if (release.endDate) release.queryableEndDate = release.endDate;
|
|
115
|
-
else if (release.dueDate) release.queryableEndDate = release.dueDate;
|
|
116
|
-
if ((0, $hOLA6$lodashisUndefined)(release.owner)) release.owner = "Itchy"; // default release manager
|
|
117
|
-
(0, $hOLA6$lodashforEach)(release.phases, function(phase, index) {
|
|
118
|
-
processPhases(phase, release, index);
|
|
119
|
-
});
|
|
120
|
-
(0, $hOLA6$lodashforEach)(release.teams, function(team, index) {
|
|
121
|
-
team.type = TEAM_TYPE;
|
|
122
|
-
team.id = `${release.id}/Team${index}`;
|
|
123
|
-
});
|
|
124
|
-
(0, $hOLA6$lodashforEach)(release.attachments, function(attachment, index) {
|
|
125
|
-
attachment.type = ATTACHMENT_TYPE;
|
|
126
|
-
attachment.id = `${release.id}/Attachment${index}`;
|
|
127
|
-
});
|
|
128
|
-
(0, $hOLA6$lodashforEach)(release.variables, function(variable, index) {
|
|
129
|
-
(0, $hOLA6$lodashdefaults)(variable, getVariableEntity(variable.value, variable.key, release.id, index));
|
|
130
|
-
if (variable.valueProvider) (0, $hOLA6$lodashdefaults)(variable.valueProvider, getValueProviderConfigurationEntity(variable.id));
|
|
131
|
-
});
|
|
132
|
-
(0, $hOLA6$lodashforEach)((0, $hOLA6$lodashtoPairs)(release.variableValues), function(keyValue, index) {
|
|
133
|
-
if (!release.variables) release.variables = [];
|
|
134
|
-
release.variables.push(getVariableEntity(keyValue[1], keyValue[0], release.id, 1000 + index));
|
|
135
|
-
release.variableValues = undefined;
|
|
136
|
-
});
|
|
137
|
-
(0, $hOLA6$lodashforEach)((0, $hOLA6$lodashtoPairs)(release.passwordVariableValues), function(keyValue, index) {
|
|
138
|
-
if (!release.variables) release.variables = [];
|
|
139
|
-
release.variables.push(getVariableEntity(keyValue[1], keyValue[0], release.id, 1500 + index, true));
|
|
140
|
-
release.passwordVariableValues = undefined;
|
|
141
|
-
});
|
|
142
|
-
if (release.summary) {
|
|
143
|
-
release.extensions = [
|
|
144
|
-
getDashboardExtension(release.summary, release.id)
|
|
145
|
-
];
|
|
146
|
-
release.summary = undefined;
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
}();
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
18
|
class $9626bc9256ce31f7$export$2b65d1d97338f32b {
|
|
154
19
|
constructor(page){
|
|
155
20
|
this.page = page;
|
|
@@ -157,51 +22,11 @@ class $9626bc9256ce31f7$export$2b65d1d97338f32b {
|
|
|
157
22
|
}
|
|
158
23
|
|
|
159
24
|
|
|
160
|
-
class $
|
|
161
|
-
/**
|
|
162
|
-
* Login with username and password
|
|
163
|
-
* @param userName
|
|
164
|
-
* @param password
|
|
165
|
-
*/ async login(userName, password) {
|
|
166
|
-
await this.page.goto("./#/login");
|
|
167
|
-
await this.page.waitForTimeout(1000);
|
|
168
|
-
await (0, $hOLA6$expect)(this.page).toHaveTitle("Digital.ai Release");
|
|
169
|
-
await this.page.getByPlaceholder("User").fill(userName);
|
|
170
|
-
await this.page.getByPlaceholder("Password").fill(password);
|
|
171
|
-
await this.page.getByRole("button", {
|
|
172
|
-
name: "Log in"
|
|
173
|
-
}).click();
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* Logout as authenticated user
|
|
177
|
-
*/ async logout() {
|
|
178
|
-
await this.page.locator("button.dot-avatar").click();
|
|
179
|
-
await this.page.getByText("Log out").click();
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* Expect login to be restricted for a user
|
|
183
|
-
*/ async expectLoginDisallowed() {
|
|
184
|
-
const val = await this.page.textContent('.error-content span[ng-show="loginInfo.failedStatus == 403"]');
|
|
185
|
-
(0, $hOLA6$expect)(val).toContain("You do not have 'login' permission.");
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* Expect the respective user is logged In
|
|
189
|
-
* @param username
|
|
190
|
-
*/ async expectToBeLogged(username) {
|
|
191
|
-
const val = await this.page.locator("top-toolbar .avatar-wrapper span.dot-tooltip").getAttribute("aria-label");
|
|
192
|
-
(0, $hOLA6$expect)(val).toContain(username);
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
class $d2ac4753e13169c7$export$a678525e79c4ccc4 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
25
|
+
class $5359280e98d97ff9$export$a678525e79c4ccc4 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
203
26
|
async expectNumberOfReleases(releaseTitle, amount) {
|
|
204
|
-
if (amount === 1) await (0, $hOLA6$expect)(this.page.locator(".release").getByText(releaseTitle)).toBeVisible(
|
|
27
|
+
if (amount === 1) await (0, $hOLA6$expect)(this.page.locator(".release").getByText(releaseTitle)).toBeVisible({
|
|
28
|
+
timeout: 5000
|
|
29
|
+
});
|
|
205
30
|
else await (0, $hOLA6$expect)(this.page.locator(".release").getByText(releaseTitle).count()).toBe(amount);
|
|
206
31
|
}
|
|
207
32
|
async openReleaseByName(releaseTitle) {
|
|
@@ -220,7 +45,7 @@ class $862f65268e488e83$export$fb932093f944abe4 extends (0, $9626bc9256ce31f7$ex
|
|
|
220
45
|
await this.page.locator(".popover-content xlr-context-menu a", {
|
|
221
46
|
hasText: "View releases"
|
|
222
47
|
}).click();
|
|
223
|
-
return new (0, $
|
|
48
|
+
return new (0, $5359280e98d97ff9$export$a678525e79c4ccc4)(this.page);
|
|
224
49
|
}
|
|
225
50
|
async openContextMenu(title) {
|
|
226
51
|
await (0, $hOLA6$expect)(async ()=>{
|
|
@@ -385,6 +210,56 @@ class $3fa741329d8067d5$export$d4865631ba74f3e2 extends (0, $9626bc9256ce31f7$ex
|
|
|
385
210
|
}
|
|
386
211
|
|
|
387
212
|
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
class $90bb70a7e909e500$export$519356f6c50361f7 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
216
|
+
constructor(page){
|
|
217
|
+
super(page);
|
|
218
|
+
this.railLocator = this.page.locator("task-drawer .dot-drawer .task-drawer-content");
|
|
219
|
+
}
|
|
220
|
+
async setValueFromMap(propertyName, key, value) {
|
|
221
|
+
await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] button.add-new-button`).click();
|
|
222
|
+
await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] input[id="new-row-key-input"]`).fill(key);
|
|
223
|
+
await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] input[id="new-row-value-input"]`).fill(value);
|
|
224
|
+
await this.railLocator.locator(`.input-with-map[data-test-id="${propertyName}"] button.map-row-save-button`).click();
|
|
225
|
+
}
|
|
226
|
+
async setScript(script) {
|
|
227
|
+
await this.page.locator(".code-editor textarea.ace_text-input").clear();
|
|
228
|
+
await this.page.locator(".code-editor textarea.ace_text-input").fill(script);
|
|
229
|
+
await this.page.locator('.code-editor .header button:has-text("Save")').click();
|
|
230
|
+
}
|
|
231
|
+
async expectScriptToContain(script) {
|
|
232
|
+
await (0, $hOLA6$expect)(this.page.locator(".code-editor .ace_content")).toContainText(script);
|
|
233
|
+
}
|
|
234
|
+
async abort(comment) {
|
|
235
|
+
await this.page.getByTestId("single-action-button").click();
|
|
236
|
+
await this.page.getByTestId("task-action-comment").click();
|
|
237
|
+
await this.page.getByTestId("task-action-comment").fill(comment);
|
|
238
|
+
await this.page.getByTestId("task-action-confirm").click();
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
class $69e86f559cdf2bd0$export$15d3f9b095bb5188 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
246
|
+
async expectCommentToContain(text) {
|
|
247
|
+
await (0, $hOLA6$expect)(this.page.locator(".task-comment .markdown-wrapper p")).toContainText(text);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
class $9c357602b6f466e7$export$aa59788fdecae2f2 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
255
|
+
async expectWithAttachment(filename) {
|
|
256
|
+
const test = this.page.locator(".task-attachments-grid .file-item-text");
|
|
257
|
+
await test.isVisible();
|
|
258
|
+
await (0, $hOLA6$expect)(test).toContainText(filename);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
|
|
388
263
|
class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
389
264
|
constructor(page){
|
|
390
265
|
super(page);
|
|
@@ -395,8 +270,11 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
|
|
|
395
270
|
this.cancelButton = this.page.getByTestId("task-action-cancel");
|
|
396
271
|
this.commentBox = this.page.getByTestId("task-action-comment");
|
|
397
272
|
this.confirm = this.page.getByTestId("task-action-confirm");
|
|
273
|
+
this.activity = new (0, $69e86f559cdf2bd0$export$15d3f9b095bb5188)(page);
|
|
274
|
+
this.attachment = new (0, $9c357602b6f466e7$export$aa59788fdecae2f2)(page);
|
|
398
275
|
this.config = new (0, $e44e9af564fb00f7$export$64c93bc7fb9ca44e)(page);
|
|
399
276
|
this.condition = new (0, $3fa741329d8067d5$export$d4865631ba74f3e2)(page);
|
|
277
|
+
this.overview = new (0, $90bb70a7e909e500$export$519356f6c50361f7)(page);
|
|
400
278
|
this.skipMenu = this.page.getByRole("menuitem", {
|
|
401
279
|
name: "Skip"
|
|
402
280
|
});
|
|
@@ -445,10 +323,62 @@ class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$ex
|
|
|
445
323
|
}
|
|
446
324
|
|
|
447
325
|
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
class $c9bb587dd92143c3$export$d1077068a9cc9f17 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
329
|
+
constructor(page){
|
|
330
|
+
super(page);
|
|
331
|
+
}
|
|
332
|
+
async editReleaseName(name) {
|
|
333
|
+
await this.page.locator("#release-form-title").clear();
|
|
334
|
+
await this.page.locator("#release-form-title").fill(name);
|
|
335
|
+
}
|
|
336
|
+
async setDescription(description) {
|
|
337
|
+
await this.page.locator(".display > .xl-icon").first().click();
|
|
338
|
+
await this.page.locator("textarea").click();
|
|
339
|
+
await this.page.locator("textarea").clear();
|
|
340
|
+
await this.page.locator("textarea").fill(description);
|
|
341
|
+
await this.page.getByText("Save").first().click();
|
|
342
|
+
}
|
|
343
|
+
async setScriptUsername(username) {
|
|
344
|
+
await this.page.getByPlaceholder("Set user...").waitFor();
|
|
345
|
+
await this.page.getByPlaceholder("Set user...").click();
|
|
346
|
+
await this.page.locator('input[name=""]').fill(username, {
|
|
347
|
+
timeout: 2000
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
async setScriptUserPassword(password) {
|
|
351
|
+
await this.page.locator('span[name="scriptUserPassword"]').waitFor();
|
|
352
|
+
await this.page.locator('span[name="scriptUserPassword"]').click();
|
|
353
|
+
await this.page.locator('input[name="scriptUserPassword"]').fill(password, {
|
|
354
|
+
timeout: 2000
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
async save() {
|
|
358
|
+
await this.page.getByRole("button", {
|
|
359
|
+
name: "Save"
|
|
360
|
+
}).click({
|
|
361
|
+
timeout: 2000
|
|
362
|
+
});
|
|
363
|
+
await (0, $hOLA6$expect)(this.page.locator(".form-footer .last-saved")).toBeVisible();
|
|
364
|
+
}
|
|
365
|
+
async reset() {
|
|
366
|
+
await this.page.getByRole("button", {
|
|
367
|
+
name: "Reset"
|
|
368
|
+
}).waitFor();
|
|
369
|
+
await this.page.getByRole("button", {
|
|
370
|
+
name: "Reset"
|
|
371
|
+
}).click();
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
|
|
448
376
|
class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
449
377
|
constructor(page){
|
|
450
378
|
super(page);
|
|
451
379
|
this.taskDrawer = new (0, $8e39246218b802fc$export$e946776eae644790)(page);
|
|
380
|
+
this.properties = new (0, $c9bb587dd92143c3$export$d1077068a9cc9f17)(page);
|
|
381
|
+
this.variables = new (0, $f48771b486a3eb8f$export$a87f0ae8695e74be)(page);
|
|
452
382
|
}
|
|
453
383
|
async openTriggers() {
|
|
454
384
|
await this.openSubPage("Triggers");
|
|
@@ -470,43 +400,79 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
|
|
|
470
400
|
name: "Start"
|
|
471
401
|
}).click();
|
|
472
402
|
}
|
|
403
|
+
async waitForCompletion(timeout) {
|
|
404
|
+
await this.page.locator("#release.completed").waitFor({
|
|
405
|
+
timeout: timeout
|
|
406
|
+
});
|
|
407
|
+
}
|
|
473
408
|
async waitForTaskCompleted(taskTitle) {
|
|
474
409
|
await (0, $hOLA6$expect)(this.page.locator(".task.completed").getByText(taskTitle, {
|
|
475
410
|
exact: true
|
|
476
|
-
})).toBeVisible(
|
|
411
|
+
})).toBeVisible({
|
|
412
|
+
timeout: 10000
|
|
413
|
+
});
|
|
477
414
|
}
|
|
478
415
|
async waitForTaskFailed(taskTitle) {
|
|
479
416
|
await (0, $hOLA6$expect)(this.page.locator(".task.failed").getByText(taskTitle, {
|
|
480
417
|
exact: true
|
|
481
|
-
})).toBeVisible(
|
|
418
|
+
})).toBeVisible({
|
|
419
|
+
timeout: 10000
|
|
420
|
+
});
|
|
482
421
|
}
|
|
483
422
|
async waitForTaskSkipped(taskTitle) {
|
|
484
423
|
await (0, $hOLA6$expect)(this.page.locator(".task.skipped").getByText(taskTitle, {
|
|
485
424
|
exact: true
|
|
486
|
-
})).toBeVisible(
|
|
425
|
+
})).toBeVisible({
|
|
426
|
+
timeout: 10000
|
|
427
|
+
});
|
|
487
428
|
}
|
|
488
429
|
async waitForTaskAborted(taskTitle) {
|
|
489
430
|
await (0, $hOLA6$expect)(this.page.locator(".task.aborted").getByText(taskTitle, {
|
|
490
431
|
exact: true
|
|
491
|
-
})).toBeVisible(
|
|
432
|
+
})).toBeVisible({
|
|
433
|
+
timeout: 10000
|
|
434
|
+
});
|
|
492
435
|
}
|
|
493
436
|
async waitForStatusLine(statusLine) {
|
|
494
437
|
await (0, $hOLA6$expect)(this.page.locator(".task .status-line").getByText(statusLine, {
|
|
495
438
|
exact: true
|
|
496
|
-
})).toBeVisible(
|
|
439
|
+
})).toBeVisible({
|
|
440
|
+
timeout: 10000
|
|
441
|
+
});
|
|
497
442
|
}
|
|
498
443
|
async waitForTaskStarted(taskTitle) {
|
|
499
444
|
await (0, $hOLA6$expect)(this.page.locator(".task.in_progress").getByTitle(taskTitle, {
|
|
500
445
|
exact: true
|
|
501
|
-
})).toBeVisible(
|
|
446
|
+
})).toBeVisible({
|
|
447
|
+
timeout: 10000
|
|
448
|
+
});
|
|
502
449
|
}
|
|
503
450
|
async openTaskDrawer(taskName) {
|
|
504
|
-
await this.page.locator(".task-header").getByText(taskName
|
|
451
|
+
await this.page.locator(".task-header").getByText(taskName, {
|
|
452
|
+
exact: true
|
|
453
|
+
}).click();
|
|
505
454
|
return this.taskDrawer;
|
|
506
455
|
}
|
|
507
456
|
async openVariables() {
|
|
508
457
|
await this.openReleaseMenu("Variables");
|
|
509
|
-
|
|
458
|
+
}
|
|
459
|
+
async openProperties() {
|
|
460
|
+
await this.openReleaseMenu("Properties");
|
|
461
|
+
}
|
|
462
|
+
async openReleaseFlow() {
|
|
463
|
+
await this.openReleaseMenu("Release flow");
|
|
464
|
+
}
|
|
465
|
+
async openRelationships() {
|
|
466
|
+
await this.openReleaseMenu("Relationships");
|
|
467
|
+
}
|
|
468
|
+
async openTeamsPermissions() {
|
|
469
|
+
await this.openReleaseMenu("Teams & Permissions");
|
|
470
|
+
}
|
|
471
|
+
async openDashboard() {
|
|
472
|
+
await this.openReleaseMenu("Dashboard");
|
|
473
|
+
}
|
|
474
|
+
async openActivityLogs() {
|
|
475
|
+
await this.openReleaseMenu("ActivityLogs");
|
|
510
476
|
}
|
|
511
477
|
async openReleaseMenu(menuItem) {
|
|
512
478
|
await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
|
|
@@ -543,6 +509,9 @@ class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
|
|
|
543
509
|
}
|
|
544
510
|
}
|
|
545
511
|
}
|
|
512
|
+
async backToRelease() {
|
|
513
|
+
await this.page.locator(".icon-back").click();
|
|
514
|
+
}
|
|
546
515
|
}
|
|
547
516
|
class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
548
517
|
constructor(page, phaseName){
|
|
@@ -551,22 +520,43 @@ class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97
|
|
|
551
520
|
hasText: phaseName
|
|
552
521
|
});
|
|
553
522
|
}
|
|
554
|
-
async
|
|
523
|
+
async setTitle(title) {
|
|
524
|
+
await this.phaseLocator.locator(".phase-header .display").click();
|
|
525
|
+
await this.phaseLocator.locator(".phase-header input").clear();
|
|
526
|
+
await this.phaseLocator.locator(".phase-header input").fill(title);
|
|
527
|
+
await this.phaseLocator.locator(".phase-header input").blur();
|
|
528
|
+
}
|
|
529
|
+
async expectTaskBorderWithColor(taskName, color) {
|
|
530
|
+
await (0, $hOLA6$expect)(this.page.locator(`.task-box:has-text('${taskName}')`)).toHaveCSS("border-top-color", color);
|
|
531
|
+
}
|
|
532
|
+
async addTaskInPhase(taskTitle, taskType) {
|
|
555
533
|
await this.phaseLocator.getByText("Add task").click();
|
|
556
|
-
await this.phaseLocator.
|
|
534
|
+
await this.phaseLocator.getByPlaceholder("Task title...").click();
|
|
535
|
+
await this.phaseLocator.getByPlaceholder("Task title...").fill(taskTitle);
|
|
557
536
|
await this.phaseLocator.locator(".xlr-ctx-menu-toggle").click();
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
}).hover();
|
|
564
|
-
await this.page.locator(`.xlr-ctx-menu.active`).getByTitle(taskType, {
|
|
565
|
-
exact: true
|
|
566
|
-
}).click();
|
|
537
|
+
const count = taskType.length - 1;
|
|
538
|
+
for(let i = 0; i < count; i++){
|
|
539
|
+
await this.page.locator('[data-test="' + taskType[i] + '"]').getByText(taskType[i]).click();
|
|
540
|
+
await this.page.getByText(taskType[i + 1]).click();
|
|
541
|
+
}
|
|
567
542
|
await this.phaseLocator.locator(".quick-controls-container a").getByText("Add", {
|
|
568
543
|
exact: true
|
|
569
544
|
}).click();
|
|
545
|
+
await this.phaseLocator.locator(".button.cancel").click();
|
|
546
|
+
await (0, $hOLA6$expect)(this.phaseLocator.locator(".task").filter({
|
|
547
|
+
hasText: taskTitle
|
|
548
|
+
})).toBeVisible({
|
|
549
|
+
timeout: 5000
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
async getNumberOfTasks() {
|
|
553
|
+
return await this.phaseLocator.locator(".task").count();
|
|
554
|
+
}
|
|
555
|
+
async expectToHaveNoneditableTitle(phaseTitle) {
|
|
556
|
+
await (0, $hOLA6$expect)(this.phaseLocator.locator(".phase-title > span")).toContainText(phaseTitle);
|
|
557
|
+
}
|
|
558
|
+
async expectToHaveTitle(phaseTitle) {
|
|
559
|
+
await (0, $hOLA6$expect)(this.phaseLocator.locator(".phase-title")).toContainText(phaseTitle);
|
|
570
560
|
}
|
|
571
561
|
}
|
|
572
562
|
|
|
@@ -718,12 +708,16 @@ class $f1bf370bb7f683ca$export$1d7840d5cdc861d5 extends (0, $9626bc9256ce31f7$ex
|
|
|
718
708
|
this.settingsIcon = this.page.getByRole("button", {
|
|
719
709
|
name: "Settings"
|
|
720
710
|
});
|
|
721
|
-
this.usersAndPermissionMenu = this.page.
|
|
722
|
-
|
|
711
|
+
this.usersAndPermissionMenu = this.page.getByRole("menuitem", {
|
|
712
|
+
name: "users icon Users and permissions"
|
|
713
|
+
});
|
|
714
|
+
this.managePluginMenu = this.page.getByRole("menuitem", {
|
|
715
|
+
name: "plugins icon Manage plugins"
|
|
716
|
+
});
|
|
723
717
|
}
|
|
724
718
|
async openUsersAndPermissions() {
|
|
725
719
|
await this.settingsIcon.click();
|
|
726
|
-
await this.
|
|
720
|
+
await this.usersAndPermissionMenu.click();
|
|
727
721
|
}
|
|
728
722
|
async openManagePlugin() {
|
|
729
723
|
await this.settingsIcon.click();
|
|
@@ -745,7 +739,6 @@ class $9ca6e63d357957dd$export$922081b54f2ab994 extends (0, $9626bc9256ce31f7$ex
|
|
|
745
739
|
class $3a340a3f4fd8f04d$export$43682cddead1dd78 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
746
740
|
async openReleaseCalendarPage() {
|
|
747
741
|
await this.page.goto("./#/calendar");
|
|
748
|
-
await (0, $hOLA6$expect)(this.page).toHaveTitle("Release calendar / Home - Digital.ai Release");
|
|
749
742
|
//Define date format to verify different calendar views
|
|
750
743
|
const today = new Date();
|
|
751
744
|
let options = {
|
|
@@ -762,6 +755,8 @@ class $3a340a3f4fd8f04d$export$43682cddead1dd78 extends (0, $9626bc9256ce31f7$ex
|
|
|
762
755
|
year: "numeric"
|
|
763
756
|
};
|
|
764
757
|
this.monthFormat = today.toLocaleDateString("en-US", options);
|
|
758
|
+
this.monthFormat = this.monthFormat.replace(/(\w+) (\d+)/, "$1, $2");
|
|
759
|
+
await (0, $hOLA6$expect)(this.page).toHaveTitle("Release calendar / Home - Digital.ai Release");
|
|
765
760
|
return this;
|
|
766
761
|
}
|
|
767
762
|
async exportCalendar() {
|
|
@@ -791,7 +786,7 @@ class $3a340a3f4fd8f04d$export$43682cddead1dd78 extends (0, $9626bc9256ce31f7$ex
|
|
|
791
786
|
return downloadCount;
|
|
792
787
|
}
|
|
793
788
|
async verifyDayView() {
|
|
794
|
-
await this.page.getByRole("combobox").click();
|
|
789
|
+
await this.page.locator(".tl-header-navigation").getByRole("combobox").click();
|
|
795
790
|
await this.page.getByRole("option", {
|
|
796
791
|
name: "Day"
|
|
797
792
|
}).click();
|
|
@@ -802,7 +797,7 @@ class $3a340a3f4fd8f04d$export$43682cddead1dd78 extends (0, $9626bc9256ce31f7$ex
|
|
|
802
797
|
await (0, $hOLA6$expect)(this.page.getByText(this.dayFormat)).toBeVisible();
|
|
803
798
|
}
|
|
804
799
|
async verifyYearView() {
|
|
805
|
-
await this.page.getByRole("combobox").click();
|
|
800
|
+
await this.page.locator(".tl-header-navigation").getByRole("combobox").click();
|
|
806
801
|
await this.page.getByRole("option", {
|
|
807
802
|
name: "Year"
|
|
808
803
|
}).click();
|
|
@@ -810,12 +805,148 @@ class $3a340a3f4fd8f04d$export$43682cddead1dd78 extends (0, $9626bc9256ce31f7$ex
|
|
|
810
805
|
name: "Today"
|
|
811
806
|
}).click();
|
|
812
807
|
//Verify Page has correct Year format displayed at the page bottom
|
|
813
|
-
await (0, $hOLA6$expect)(this.page.
|
|
808
|
+
await (0, $hOLA6$expect)(this.page.locator(".tl-footer-label").filter({
|
|
809
|
+
hasText: this.yearFormatString
|
|
810
|
+
})).toHaveText(this.yearFormatString);
|
|
814
811
|
}
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
812
|
+
async verifyMonthView() {
|
|
813
|
+
await this.page.locator(".tl-header-navigation").getByRole("combobox").click();
|
|
814
|
+
await this.page.getByRole("option", {
|
|
815
|
+
name: "Month"
|
|
816
|
+
}).click();
|
|
817
|
+
await this.page.getByRole("button", {
|
|
818
|
+
name: "Today"
|
|
819
|
+
}).click();
|
|
820
|
+
//Verify Page has correct Year format displayed at the page bottom
|
|
821
|
+
await (0, $hOLA6$expect)(this.page.locator(".tl-footer-label").filter({
|
|
822
|
+
hasText: this.monthFormat
|
|
823
|
+
})).toHaveText(this.monthFormat);
|
|
824
|
+
}
|
|
825
|
+
async verifyPageContent(title) {
|
|
826
|
+
const view_type = [
|
|
827
|
+
"Day",
|
|
828
|
+
"Week",
|
|
829
|
+
"Month",
|
|
830
|
+
"Year"
|
|
831
|
+
];
|
|
832
|
+
for (const view of view_type){
|
|
833
|
+
await this.page.locator(".tl-header-navigation").getByRole("combobox").click();
|
|
834
|
+
await this.page.getByRole("option", {
|
|
835
|
+
name: view
|
|
836
|
+
}).click();
|
|
837
|
+
await this.page.getByRole("button", {
|
|
838
|
+
name: "Today"
|
|
839
|
+
}).click();
|
|
840
|
+
//Verify Page has correct Year format displayed at the page bottom
|
|
841
|
+
await (0, $hOLA6$expect)(this.page.getByText(title)).toBeVisible();
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
async filterReleaseByTitle(title) {
|
|
845
|
+
await this.page.getByPlaceholder("Filter by release title").click();
|
|
846
|
+
await this.page.getByPlaceholder("Filter by release title").fill(title);
|
|
847
|
+
await this.page.getByPlaceholder("Filter by release title").press("Enter");
|
|
848
|
+
//Verify Page has correct Year format displayed at the page bottom
|
|
849
|
+
await this.verifyPageContent(title);
|
|
850
|
+
}
|
|
851
|
+
async filterReleaseByTags(tags, release_title) {
|
|
852
|
+
await this.page.locator(".tl-filter-release-tags").locator(".react-tagsinput").click();
|
|
853
|
+
for (let tag of tags){
|
|
854
|
+
tag = tag.toString();
|
|
855
|
+
await this.page.locator(".tl-filter-release-tags").locator(".react-tagsinput-input").fill(tag);
|
|
856
|
+
await this.page.getByTitle(tag).locator("i").click();
|
|
857
|
+
}
|
|
858
|
+
await this.verifyPageContent(release_title);
|
|
859
|
+
}
|
|
860
|
+
async filterTaskByTags(tags, task_title, release_title) {
|
|
861
|
+
await this.page.locator(".tl-filter-task-tags").locator(".react-tagsinput").click();
|
|
862
|
+
for (let tag of tags){
|
|
863
|
+
tag = tag.toString();
|
|
864
|
+
await this.page.locator(".tl-filter-task-tags").locator(".react-tagsinput-input").fill(tag);
|
|
865
|
+
await this.page.getByTitle(tag).locator("i").click();
|
|
866
|
+
}
|
|
867
|
+
//Make sure task is visible on calnedar page
|
|
868
|
+
await this.verifyPageContent(task_title);
|
|
869
|
+
//Make sure parent release of the selected task is visible on calnedar page
|
|
870
|
+
await this.verifyPageContent(release_title);
|
|
871
|
+
}
|
|
872
|
+
async filterReleaseByStatus(release_status, release_title) {
|
|
873
|
+
if (!await this.page.locator(".tl-filter-advanced").isVisible()) await this.page.getByRole("button", {
|
|
874
|
+
name: "Advanced filters"
|
|
875
|
+
}).click();
|
|
876
|
+
await this.page.locator(".tl-filter-release-status").locator(".react-tagsinput").click();
|
|
877
|
+
await this.page.getByTitle(release_status).locator("i").first().click();
|
|
878
|
+
await this.verifyPageContent(release_title);
|
|
879
|
+
}
|
|
880
|
+
async filterReleaseByRisk(release_risk, release_title) {
|
|
881
|
+
if (!await this.page.locator(".tl-filter-advanced").isVisible()) await this.page.getByRole("button", {
|
|
882
|
+
name: "Advanced filters"
|
|
883
|
+
}).click();
|
|
884
|
+
await this.page.locator(".tl-filter-risk-filter").getByRole("combobox").click();
|
|
885
|
+
await this.page.getByRole("option", {
|
|
886
|
+
name: release_risk
|
|
887
|
+
}).click();
|
|
888
|
+
await this.verifyPageContent(release_title);
|
|
889
|
+
}
|
|
890
|
+
async filterFlaggedRelease(release_title) {
|
|
891
|
+
if (!await this.page.locator(".tl-filter-advanced").isVisible()) await this.page.getByRole("button", {
|
|
892
|
+
name: "Advanced filters"
|
|
893
|
+
}).click();
|
|
894
|
+
if (await this.page.locator(".tl-filter-flag-only.btn.btn-flat.btn-fixed.button-toggle-filter.active").isVisible()) await this.page.getByRole("button", {
|
|
895
|
+
name: " Flagged"
|
|
896
|
+
}).click();
|
|
897
|
+
await this.verifyPageContent(release_title);
|
|
898
|
+
}
|
|
899
|
+
async viewRelease(release_title, release_id) {
|
|
900
|
+
await this.page.locator(".tl-header-navigation").getByRole("combobox").click();
|
|
901
|
+
await this.page.getByRole("option", {
|
|
902
|
+
name: "Day"
|
|
903
|
+
}).click();
|
|
904
|
+
await this.page.getByRole("button", {
|
|
905
|
+
name: "Today"
|
|
906
|
+
}).click();
|
|
907
|
+
await this.page.getByText(release_title).click();
|
|
908
|
+
await this.page.locator(".release-modal-container").locator(".xl-icon.release-icon").click();
|
|
909
|
+
const releaseurl = `/#/releases/${release_id}`;
|
|
910
|
+
const currentURL = await this.page.url();
|
|
911
|
+
// Check if the release name present in redirected URL
|
|
912
|
+
(0, $hOLA6$expect)(currentURL).toContain(releaseurl);
|
|
913
|
+
}
|
|
914
|
+
async viewDependency(source_release, dest_release) {
|
|
915
|
+
const source_text = source_release + "dependencies";
|
|
916
|
+
await this.page.locator(".tl-header-navigation").getByRole("combobox").click();
|
|
917
|
+
await this.page.getByRole("option", {
|
|
918
|
+
name: "Day"
|
|
919
|
+
}).click();
|
|
920
|
+
await this.page.getByRole("button", {
|
|
921
|
+
name: "Today"
|
|
922
|
+
}).click();
|
|
923
|
+
await this.page.getByText(source_release).click();
|
|
924
|
+
await this.page.locator(".release-modal-container").locator(".xl-icon.cluster-dependencies-icon").click();
|
|
925
|
+
await (0, $hOLA6$expect)(this.page.locator(".tl-drawer-navigation-header")).toHaveText(source_text);
|
|
926
|
+
await (0, $hOLA6$expect)(this.page.locator(".tl-drawer-dependency-body-title-text")).toHaveText(dest_release);
|
|
927
|
+
}
|
|
928
|
+
async downloadIcsCalendar(release_title) {
|
|
929
|
+
let downloadCount = 0;
|
|
930
|
+
// Listen to download events
|
|
931
|
+
this.page.on("download", (_download)=>{
|
|
932
|
+
downloadCount++;
|
|
933
|
+
});
|
|
934
|
+
await this.page.locator(".tl-header-navigation").getByRole("combobox").click();
|
|
935
|
+
await this.page.getByRole("option", {
|
|
936
|
+
name: "Day"
|
|
937
|
+
}).click();
|
|
938
|
+
await this.page.getByRole("button", {
|
|
939
|
+
name: "Today"
|
|
940
|
+
}).click();
|
|
941
|
+
await this.page.getByText(release_title).click();
|
|
942
|
+
await this.page.locator(".release-modal-container").locator(".xl-icon.calendar-icon").click();
|
|
943
|
+
return downloadCount;
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
|
|
948
|
+
|
|
949
|
+
class $e72552cbf941ecfa$export$b8a61e5c71402559 {
|
|
819
950
|
constructor(page){
|
|
820
951
|
this.page = page;
|
|
821
952
|
this.releasePage = new (0, $43cbcdfccb6c2a76$export$f43492e8ac3c566)(page);
|
|
@@ -824,6 +955,7 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
|
|
|
824
955
|
this.applicationPage = new (0, $c313b10398604df2$export$1533b625ec0c75e2)(page);
|
|
825
956
|
this.taskDetailsPage = new (0, $9ca6e63d357957dd$export$922081b54f2ab994)(page);
|
|
826
957
|
this.releaseCalendarPage = new (0, $3a340a3f4fd8f04d$export$43682cddead1dd78)(page);
|
|
958
|
+
this.releaseListPage = new (0, $5359280e98d97ff9$export$a678525e79c4ccc4)(page);
|
|
827
959
|
}
|
|
828
960
|
async openTemplate(id) {
|
|
829
961
|
return this.openReleaseOrTemplate(id, false);
|
|
@@ -838,52 +970,84 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
|
|
|
838
970
|
return new (0, $6720a523bcb1cce0$export$3cac5fd37ae64b91)(this.page).openPersonalAccessTokenPage();
|
|
839
971
|
}
|
|
840
972
|
async gotoFolderPage() {
|
|
841
|
-
await this.page.
|
|
973
|
+
await this.page.locator("ul.side-nav li").getByText("Folders", {
|
|
974
|
+
exact: true
|
|
975
|
+
}).click();
|
|
842
976
|
}
|
|
843
977
|
async gotoTaskPage() {
|
|
844
|
-
await this.page.
|
|
978
|
+
await this.page.locator("ul.side-nav li").getByText("Tasks", {
|
|
979
|
+
exact: true
|
|
980
|
+
}).click();
|
|
845
981
|
}
|
|
846
982
|
async gotoReleasePage() {
|
|
847
|
-
await this.page.
|
|
983
|
+
await this.page.locator("ul.side-nav li").getByText("Releases", {
|
|
984
|
+
exact: true
|
|
985
|
+
}).click();
|
|
848
986
|
}
|
|
849
987
|
async gotoWorkflowCatalogPage() {
|
|
850
|
-
await this.page.getByText("Workflow catalog"
|
|
988
|
+
await this.page.locator("ul.side-nav li").getByText("Workflow catalog", {
|
|
989
|
+
exact: true
|
|
990
|
+
}).click();
|
|
851
991
|
}
|
|
852
992
|
async gotoWorkflowsPage() {
|
|
853
|
-
await this.page.
|
|
993
|
+
await this.page.locator("ul.side-nav li").getByText("Workflows", {
|
|
994
|
+
exact: true
|
|
995
|
+
}).click();
|
|
854
996
|
}
|
|
855
997
|
async gotoGroupsPage() {
|
|
856
|
-
await this.page.
|
|
998
|
+
await this.page.locator("ul.side-nav li").getByText("Groups", {
|
|
999
|
+
exact: true
|
|
1000
|
+
}).click();
|
|
857
1001
|
}
|
|
858
1002
|
async gotoReleaseCalenderPage() {
|
|
859
|
-
await this.page.getByText("Release calendar"
|
|
1003
|
+
await this.page.locator("ul.side-nav li").getByText("Release calendar", {
|
|
1004
|
+
exact: true
|
|
1005
|
+
}).click();
|
|
860
1006
|
}
|
|
861
1007
|
async gotoDeliveriesPage() {
|
|
862
|
-
await this.page.
|
|
1008
|
+
await this.page.locator("ul.side-nav li").getByText("Deliveries", {
|
|
1009
|
+
exact: true
|
|
1010
|
+
}).click();
|
|
863
1011
|
}
|
|
864
1012
|
async gotoTriggersPage() {
|
|
865
|
-
await this.page.
|
|
1013
|
+
await this.page.locator("ul.side-nav li").getByText("Triggers", {
|
|
1014
|
+
exact: true
|
|
1015
|
+
}).click();
|
|
866
1016
|
}
|
|
867
1017
|
async gotoDigitalAnalyticsPage() {
|
|
868
|
-
await this.page.getByText("Digital.ai Analytics"
|
|
1018
|
+
await this.page.locator("ul.side-nav li").getByText("Digital.ai Analytics", {
|
|
1019
|
+
exact: true
|
|
1020
|
+
}).click();
|
|
869
1021
|
}
|
|
870
1022
|
async gotoReportsPage() {
|
|
871
|
-
await this.page.
|
|
1023
|
+
await this.page.locator("ul.side-nav li").getByText("Reports", {
|
|
1024
|
+
exact: true
|
|
1025
|
+
}).click();
|
|
872
1026
|
}
|
|
873
1027
|
async gotoTemplatesPage() {
|
|
874
|
-
await this.page.
|
|
1028
|
+
await this.page.locator("ul.side-nav li").getByText("Templates", {
|
|
1029
|
+
exact: true
|
|
1030
|
+
}).click();
|
|
875
1031
|
}
|
|
876
1032
|
async gotoEnvironmentsPage() {
|
|
877
|
-
await this.page.
|
|
1033
|
+
await this.page.locator("ul.side-nav li").getByText("Environments", {
|
|
1034
|
+
exact: true
|
|
1035
|
+
}).click();
|
|
878
1036
|
}
|
|
879
1037
|
async gotoEnvironmentsCalenderPage() {
|
|
880
|
-
await this.page.getByText("Environments calendar"
|
|
1038
|
+
await this.page.locator("ul.side-nav li").getByText("Environments calendar", {
|
|
1039
|
+
exact: true
|
|
1040
|
+
}).click();
|
|
881
1041
|
}
|
|
882
1042
|
async gotoGobalVariablesPage() {
|
|
883
|
-
await this.page.getByText("Global variables"
|
|
1043
|
+
await this.page.locator("ul.side-nav li").getByText("Global variables", {
|
|
1044
|
+
exact: true
|
|
1045
|
+
}).click();
|
|
884
1046
|
}
|
|
885
1047
|
async gotoConnectionsPage() {
|
|
886
|
-
await this.page.
|
|
1048
|
+
await this.page.locator("ul.side-nav li").getByText("Connections", {
|
|
1049
|
+
exact: true
|
|
1050
|
+
}).click();
|
|
887
1051
|
}
|
|
888
1052
|
async openReleaseOrTemplate(id, release) {
|
|
889
1053
|
const url = release ? "releases" : "templates";
|
|
@@ -895,6 +1059,192 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
|
|
|
895
1059
|
|
|
896
1060
|
|
|
897
1061
|
|
|
1062
|
+
|
|
1063
|
+
class $4444bee76761dfb1$export$f14c0e3f98d164c0 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
1064
|
+
/**
|
|
1065
|
+
* Login with username and password
|
|
1066
|
+
* @param userName
|
|
1067
|
+
* @param password
|
|
1068
|
+
*/ async login(userName, password) {
|
|
1069
|
+
await this.page.goto("./#/login");
|
|
1070
|
+
await (0, $hOLA6$expect)(this.page).toHaveTitle("Digital.ai Release");
|
|
1071
|
+
await this.page.getByPlaceholder("User").fill(userName, {
|
|
1072
|
+
timeout: 1000
|
|
1073
|
+
});
|
|
1074
|
+
await this.page.getByPlaceholder("Password").fill(password, {
|
|
1075
|
+
timeout: 10000
|
|
1076
|
+
});
|
|
1077
|
+
await this.page.getByRole("button", {
|
|
1078
|
+
name: "Log in"
|
|
1079
|
+
}).click({
|
|
1080
|
+
timeout: 10000
|
|
1081
|
+
});
|
|
1082
|
+
await this.page.waitForTimeout(1000);
|
|
1083
|
+
}
|
|
1084
|
+
/**
|
|
1085
|
+
* Logout as authenticated user
|
|
1086
|
+
*/ async logout() {
|
|
1087
|
+
await this.page.locator("button.dot-avatar").click();
|
|
1088
|
+
await this.page.getByText("Log out", {
|
|
1089
|
+
exact: true
|
|
1090
|
+
}).click();
|
|
1091
|
+
}
|
|
1092
|
+
/**
|
|
1093
|
+
* Expect login to be restricted for a user
|
|
1094
|
+
*/ async expectLoginDisallowed() {
|
|
1095
|
+
const val = await this.page.textContent('.error-content span[ng-show="loginInfo.failedStatus == 403"]');
|
|
1096
|
+
(0, $hOLA6$expect)(val).toContain("You do not have 'login' permission.");
|
|
1097
|
+
}
|
|
1098
|
+
/**
|
|
1099
|
+
* Expect the respective user is logged In
|
|
1100
|
+
* @param username
|
|
1101
|
+
*/ async expectToBeLogged(username) {
|
|
1102
|
+
const val = await this.page.locator("top-toolbar .avatar-wrapper span.dot-tooltip").getAttribute("aria-label");
|
|
1103
|
+
(0, $hOLA6$expect)(val).toContain(username);
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
|
|
1108
|
+
|
|
1109
|
+
|
|
1110
|
+
|
|
1111
|
+
|
|
1112
|
+
|
|
1113
|
+
const $f86fbaaa8b4e8c61$export$45f0aca2596a2bb3 = function() {
|
|
1114
|
+
const RELEASE_TYPE = "xlrelease.Release";
|
|
1115
|
+
const PHASE_TYPE = "xlrelease.Phase";
|
|
1116
|
+
const TEAM_TYPE = "xlrelease.Team";
|
|
1117
|
+
const TASK_TYPE = "xlrelease.Task";
|
|
1118
|
+
const COMMENT_TYPE = "xlrelease.Comment";
|
|
1119
|
+
const CONDITION_TYPE = "xlrelease.GateCondition";
|
|
1120
|
+
const DEPENDENCY_TYPE = "xlrelease.Dependency";
|
|
1121
|
+
const LINK_TYPE = "xlrelease.Link";
|
|
1122
|
+
const ATTACHMENT_TYPE = "xlrelease.Attachment";
|
|
1123
|
+
const DASHBOARD_TYPE = "xlrelease.Dashboard";
|
|
1124
|
+
const _TRIGGER_TYPE = "xlrelease.ReleaseTrigger";
|
|
1125
|
+
const JIRA_TYPE = "jira.CreateIssue";
|
|
1126
|
+
const DEFAULT_TASK_OWNER = "Itchy";
|
|
1127
|
+
const processTasks = (task, container, index)=>{
|
|
1128
|
+
if ((0, $hOLA6$lodashisUndefined)(task.type)) task.type = TASK_TYPE;
|
|
1129
|
+
task.id = task.id || `${container.id}/Task${index}`;
|
|
1130
|
+
if ((0, $hOLA6$lodashisUndefined)(task.owner) && task.type !== JIRA_TYPE) task.owner = DEFAULT_TASK_OWNER;
|
|
1131
|
+
if (task.owner === null) delete task.owner;
|
|
1132
|
+
(0, $hOLA6$lodasheach)(task.conditions, function(condition, idx) {
|
|
1133
|
+
condition.type = CONDITION_TYPE;
|
|
1134
|
+
condition.id = `${task.id}/GateCondition${idx}`;
|
|
1135
|
+
});
|
|
1136
|
+
(0, $hOLA6$lodasheach)(task.dependencies, function(dependency, idx) {
|
|
1137
|
+
dependency.type = DEPENDENCY_TYPE;
|
|
1138
|
+
dependency.id = `${task.id}/Dependency${idx}`;
|
|
1139
|
+
});
|
|
1140
|
+
(0, $hOLA6$lodasheach)(task.links, function(link, idx) {
|
|
1141
|
+
link.type = LINK_TYPE;
|
|
1142
|
+
link.id = `${task.id}/Link${idx}`;
|
|
1143
|
+
});
|
|
1144
|
+
(0, $hOLA6$lodasheach)(task.comments, function(comment, idx) {
|
|
1145
|
+
comment.type = COMMENT_TYPE;
|
|
1146
|
+
comment.id = `${task.id}/Comment${idx}`;
|
|
1147
|
+
});
|
|
1148
|
+
(0, $hOLA6$lodasheach)(task.tasks, function(subTask, idx) {
|
|
1149
|
+
processTasks(subTask, task, idx);
|
|
1150
|
+
});
|
|
1151
|
+
(0, $hOLA6$lodasheach)(task.templateVariables, function(variable, idx) {
|
|
1152
|
+
(0, $hOLA6$lodashdefaults)(variable, getVariableEntity(variable.value, variable.key, task.id, idx));
|
|
1153
|
+
});
|
|
1154
|
+
(0, $hOLA6$lodasheach)(task.attachments, function(attachment, idx) {
|
|
1155
|
+
attachment.type = ATTACHMENT_TYPE;
|
|
1156
|
+
attachment.id = `${task.id}/Attachment${idx}`;
|
|
1157
|
+
});
|
|
1158
|
+
if (task.pythonScript) {
|
|
1159
|
+
const pythonScript = task.pythonScript;
|
|
1160
|
+
pythonScript.id = `${task.id}/PythonScript`;
|
|
1161
|
+
pythonScript.customScriptTask = task.id;
|
|
1162
|
+
}
|
|
1163
|
+
};
|
|
1164
|
+
const processPhases = (phase, release, index)=>{
|
|
1165
|
+
phase.type = PHASE_TYPE;
|
|
1166
|
+
phase.id = `${release.id}/Phase${index}`;
|
|
1167
|
+
(0, $hOLA6$lodashforEach)(phase.tasks, (task, idx)=>{
|
|
1168
|
+
processTasks(task, phase, idx);
|
|
1169
|
+
});
|
|
1170
|
+
};
|
|
1171
|
+
const getVariableEntity = (value, key, containerId, index, password)=>{
|
|
1172
|
+
const keyNoSyntax = key.replace("${", "").replace("}", "");
|
|
1173
|
+
return {
|
|
1174
|
+
id: `${containerId}/Variable${index}`,
|
|
1175
|
+
key: keyNoSyntax,
|
|
1176
|
+
requiresValue: true,
|
|
1177
|
+
showOnReleaseStart: true,
|
|
1178
|
+
type: password ? "xlrelease.PasswordStringVariable" : "xlrelease.StringVariable",
|
|
1179
|
+
value: value
|
|
1180
|
+
};
|
|
1181
|
+
};
|
|
1182
|
+
const getValueProviderConfigurationEntity = function(containerId) {
|
|
1183
|
+
return {
|
|
1184
|
+
id: `${containerId}/valueProvider`,
|
|
1185
|
+
variable: containerId
|
|
1186
|
+
};
|
|
1187
|
+
};
|
|
1188
|
+
const getDashboardExtension = (dashboard, releaseId)=>{
|
|
1189
|
+
const dashboardExtension = {
|
|
1190
|
+
id: `${releaseId}/summary`,
|
|
1191
|
+
type: DASHBOARD_TYPE,
|
|
1192
|
+
tiles: []
|
|
1193
|
+
};
|
|
1194
|
+
if (dashboard.tiles) (0, $hOLA6$lodashforEach)(dashboard.tiles, function(tile, index) {
|
|
1195
|
+
dashboardExtension.tiles.push(getTileEntity(tile, `${releaseId}/summary`, index));
|
|
1196
|
+
});
|
|
1197
|
+
return dashboardExtension;
|
|
1198
|
+
};
|
|
1199
|
+
function getTileEntity(tile, containerId, index) {
|
|
1200
|
+
tile.id = tile.id || `${containerId}/Tile${index}`;
|
|
1201
|
+
return tile;
|
|
1202
|
+
}
|
|
1203
|
+
return function(release) {
|
|
1204
|
+
release.type = RELEASE_TYPE;
|
|
1205
|
+
if (release.id.indexOf("Applications/") === -1) release.id = `Applications/${release.id}`;
|
|
1206
|
+
if (release.startDate) release.queryableStartDate = release.startDate;
|
|
1207
|
+
else if (release.scheduledStartDate) release.queryableStartDate = release.scheduledStartDate;
|
|
1208
|
+
if (release.endDate) release.queryableEndDate = release.endDate;
|
|
1209
|
+
else if (release.dueDate) release.queryableEndDate = release.dueDate;
|
|
1210
|
+
if ((0, $hOLA6$lodashisUndefined)(release.owner)) release.owner = "Itchy"; // default release manager
|
|
1211
|
+
(0, $hOLA6$lodashforEach)(release.phases, function(phase, index) {
|
|
1212
|
+
processPhases(phase, release, index);
|
|
1213
|
+
});
|
|
1214
|
+
(0, $hOLA6$lodashforEach)(release.teams, function(team, index) {
|
|
1215
|
+
team.type = TEAM_TYPE;
|
|
1216
|
+
team.id = `${release.id}/Team${index}`;
|
|
1217
|
+
});
|
|
1218
|
+
(0, $hOLA6$lodashforEach)(release.attachments, function(attachment, index) {
|
|
1219
|
+
attachment.type = ATTACHMENT_TYPE;
|
|
1220
|
+
attachment.id = `${release.id}/Attachment${index}`;
|
|
1221
|
+
});
|
|
1222
|
+
(0, $hOLA6$lodashforEach)(release.variables, function(variable, index) {
|
|
1223
|
+
(0, $hOLA6$lodashdefaults)(variable, getVariableEntity(variable.value, variable.key, release.id, index));
|
|
1224
|
+
if (variable.valueProvider) (0, $hOLA6$lodashdefaults)(variable.valueProvider, getValueProviderConfigurationEntity(variable.id));
|
|
1225
|
+
});
|
|
1226
|
+
(0, $hOLA6$lodashforEach)((0, $hOLA6$lodashtoPairs)(release.variableValues), function(keyValue, index) {
|
|
1227
|
+
if (!release.variables) release.variables = [];
|
|
1228
|
+
release.variables.push(getVariableEntity(keyValue[1], keyValue[0], release.id, 1000 + index));
|
|
1229
|
+
release.variableValues = undefined;
|
|
1230
|
+
});
|
|
1231
|
+
(0, $hOLA6$lodashforEach)((0, $hOLA6$lodashtoPairs)(release.passwordVariableValues), function(keyValue, index) {
|
|
1232
|
+
if (!release.variables) release.variables = [];
|
|
1233
|
+
release.variables.push(getVariableEntity(keyValue[1], keyValue[0], release.id, 1500 + index, true));
|
|
1234
|
+
release.passwordVariableValues = undefined;
|
|
1235
|
+
});
|
|
1236
|
+
if (release.summary) {
|
|
1237
|
+
release.extensions = [
|
|
1238
|
+
getDashboardExtension(release.summary, release.id)
|
|
1239
|
+
];
|
|
1240
|
+
release.summary = undefined;
|
|
1241
|
+
}
|
|
1242
|
+
};
|
|
1243
|
+
}();
|
|
1244
|
+
|
|
1245
|
+
|
|
1246
|
+
|
|
1247
|
+
const $80c3ae34677b4324$var$JIRA_ISSUE_API_URL = "https://digitalai.atlassian.net/rest/api/2/issue";
|
|
898
1248
|
const $80c3ae34677b4324$var$adminHeaders = {
|
|
899
1249
|
Authorization: "Basic YWRtaW46YWRtaW4=",
|
|
900
1250
|
Cookie: "XSRF-TOKEN=1;",
|
|
@@ -927,7 +1277,7 @@ class $80c3ae34677b4324$var$Fixtures {
|
|
|
927
1277
|
this.request = request;
|
|
928
1278
|
this.page = page;
|
|
929
1279
|
}
|
|
930
|
-
|
|
1280
|
+
release(release) {
|
|
931
1281
|
this.initDefaults(release);
|
|
932
1282
|
this.releaseIds.push(release.id);
|
|
933
1283
|
return this.deleteRelease(release.id).then(()=>this.deleteArchivedRelease(release.id)).then(()=>this.doPost("fixtures/release", release));
|
|
@@ -955,6 +1305,12 @@ class $80c3ae34677b4324$var$Fixtures {
|
|
|
955
1305
|
const releaseId = id.includes("Applications/") ? id : `Applications/${id}`;
|
|
956
1306
|
return this.doDelete(`fixtures/${releaseId}`);
|
|
957
1307
|
}
|
|
1308
|
+
deleteUser(username) {
|
|
1309
|
+
return this.doDelete(`fixtures/user/${username}`);
|
|
1310
|
+
}
|
|
1311
|
+
deleteUserProfile(userProfile) {
|
|
1312
|
+
return this.doDelete(`fixtures/userProfile/${userProfile}`);
|
|
1313
|
+
}
|
|
958
1314
|
deleteTrigger(id) {
|
|
959
1315
|
return this.doDelete(`fixtures/trigger/${id}`);
|
|
960
1316
|
}
|
|
@@ -963,19 +1319,83 @@ class $80c3ae34677b4324$var$Fixtures {
|
|
|
963
1319
|
id
|
|
964
1320
|
]);
|
|
965
1321
|
}
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
for (const
|
|
971
|
-
for (const
|
|
972
|
-
for (const
|
|
1322
|
+
activityLogs(releaseId, logs) {
|
|
1323
|
+
return this.doPost(`fixtures/activityLogs/${releaseId}`, logs);
|
|
1324
|
+
}
|
|
1325
|
+
async cleanAll() {
|
|
1326
|
+
for (const username of this.usernames)await this.deleteUser(username);
|
|
1327
|
+
for (const userProfile of this.userProfiles)await this.deleteUserProfile(userProfile);
|
|
1328
|
+
for (const triggerId of this.triggerIds)await this.deleteTrigger(triggerId);
|
|
1329
|
+
for (const releaseId of this.releaseIds.reverse())await this.deleteRelease(releaseId);
|
|
1330
|
+
for (const confId of this.configurationIds)await this.deleteConfiguration(confId);
|
|
973
1331
|
this.releaseIds = [];
|
|
974
1332
|
this.triggerIds = [];
|
|
975
1333
|
this.configurationIds = [];
|
|
976
1334
|
this.usernames = [];
|
|
977
1335
|
this.userProfiles = [];
|
|
978
|
-
|
|
1336
|
+
}
|
|
1337
|
+
async addJiraTask() {
|
|
1338
|
+
const data = {
|
|
1339
|
+
fields: {
|
|
1340
|
+
project: {
|
|
1341
|
+
key: "RIT"
|
|
1342
|
+
},
|
|
1343
|
+
summary: "Test Task",
|
|
1344
|
+
description: "Test task description",
|
|
1345
|
+
issuetype: {
|
|
1346
|
+
name: "Task"
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1349
|
+
};
|
|
1350
|
+
const headers = {
|
|
1351
|
+
Authorization: `Basic ${btoa("xlr-jira-testuser@xebialabs.com:zgsXK6c3oLVkJxrWVJQy9DB7")}`,
|
|
1352
|
+
Origin: "https://digitalai.atlassian.net/"
|
|
1353
|
+
};
|
|
1354
|
+
const response = await this.request.post($80c3ae34677b4324$var$JIRA_ISSUE_API_URL, {
|
|
1355
|
+
data: data,
|
|
1356
|
+
headers: headers
|
|
1357
|
+
});
|
|
1358
|
+
const json = await response.json();
|
|
1359
|
+
return json.key;
|
|
1360
|
+
}
|
|
1361
|
+
async addUser(username, password) {
|
|
1362
|
+
this.usernames.push(username);
|
|
1363
|
+
await this.doPost("fixtures/user", {
|
|
1364
|
+
username: username,
|
|
1365
|
+
password: password
|
|
1366
|
+
});
|
|
1367
|
+
}
|
|
1368
|
+
async addUserProfile(username, profile) {
|
|
1369
|
+
if (!profile) profile = {};
|
|
1370
|
+
profile.id = username;
|
|
1371
|
+
profile.type = "xlrelease.UserProfile";
|
|
1372
|
+
profile.canonicalId = username.toLowerCase();
|
|
1373
|
+
this.userProfiles.push(profile.canonicalId);
|
|
1374
|
+
await this.doPost("fixtures/userProfile", profile);
|
|
1375
|
+
}
|
|
1376
|
+
async expectJiraTaskStatus(taskId, expectedStatus) {
|
|
1377
|
+
const headers = {
|
|
1378
|
+
Authorization: `Basic ${btoa("xlr-jira-testuser@xebialabs.com:zgsXK6c3oLVkJxrWVJQy9DB7")}`,
|
|
1379
|
+
Origin: "https://digitalai.atlassian.net/"
|
|
1380
|
+
};
|
|
1381
|
+
const response = await this.request.get(`${$80c3ae34677b4324$var$JIRA_ISSUE_API_URL}/${taskId}`, {
|
|
1382
|
+
headers: headers
|
|
1383
|
+
});
|
|
1384
|
+
const json = await response.json();
|
|
1385
|
+
const status = json.fields.status.name;
|
|
1386
|
+
(0, $hOLA6$expect)(status).toBe(expectedStatus);
|
|
1387
|
+
}
|
|
1388
|
+
async expectJiraTaskSummary(taskId, expectedSummary) {
|
|
1389
|
+
const headers = {
|
|
1390
|
+
Authorization: `Basic ${btoa("xlr-jira-testuser@xebialabs.com:zgsXK6c3oLVkJxrWVJQy9DB7")}`,
|
|
1391
|
+
Origin: "https://digitalai.atlassian.net/"
|
|
1392
|
+
};
|
|
1393
|
+
const response = await this.request.get(`${$80c3ae34677b4324$var$JIRA_ISSUE_API_URL}/${taskId}`, {
|
|
1394
|
+
headers: headers
|
|
1395
|
+
});
|
|
1396
|
+
const json = await response.json();
|
|
1397
|
+
const summary = json.fields.summary;
|
|
1398
|
+
(0, $hOLA6$expect)(summary).toBe(expectedSummary);
|
|
979
1399
|
}
|
|
980
1400
|
async waitForReleaseStarted(releaseTitle) {
|
|
981
1401
|
await (0, $hOLA6$expect)(async ()=>{
|
|
@@ -1011,6 +1431,12 @@ class $80c3ae34677b4324$var$Fixtures {
|
|
|
1011
1431
|
getEnvVariable(name) {
|
|
1012
1432
|
return $hOLA6$env[name];
|
|
1013
1433
|
}
|
|
1434
|
+
async archiveRelease(releaseId) {
|
|
1435
|
+
return this.doGet(`fixtures/archive/${releaseId}`);
|
|
1436
|
+
}
|
|
1437
|
+
async preArchiveRelease(releaseId) {
|
|
1438
|
+
return this.doGet(`fixtures/preArchive/${releaseId}`);
|
|
1439
|
+
}
|
|
1014
1440
|
async setFeatures(features) {
|
|
1015
1441
|
return this.doPut("settings/features", features);
|
|
1016
1442
|
}
|
|
@@ -1019,32 +1445,10 @@ class $80c3ae34677b4324$var$Fixtures {
|
|
|
1019
1445
|
{
|
|
1020
1446
|
id: "Configuration/features/xlrelease.TaskDrawer",
|
|
1021
1447
|
type: "xlrelease.TaskDrawer",
|
|
1022
|
-
category: "Stable",
|
|
1023
1448
|
enabled: enabled
|
|
1024
1449
|
}
|
|
1025
1450
|
]);
|
|
1026
1451
|
}
|
|
1027
|
-
async addUser(username, password) {
|
|
1028
|
-
this.usernames.push(username);
|
|
1029
|
-
return await this.doPost("fixtures/user", {
|
|
1030
|
-
username: username,
|
|
1031
|
-
password: password
|
|
1032
|
-
});
|
|
1033
|
-
}
|
|
1034
|
-
async addUserProfile(username, profile) {
|
|
1035
|
-
if (!profile) profile = {};
|
|
1036
|
-
profile.id = username;
|
|
1037
|
-
profile.type = "xlrelease.UserProfile";
|
|
1038
|
-
profile.canonicalId = username.toLowerCase();
|
|
1039
|
-
this.userProfiles.push(profile.canonicalId);
|
|
1040
|
-
return await this.doPost("fixtures/userProfile", profile);
|
|
1041
|
-
}
|
|
1042
|
-
async deleteUser(username) {
|
|
1043
|
-
return await this.request.delete(`fixtures/user/${username}`);
|
|
1044
|
-
}
|
|
1045
|
-
async deleteUserProfile(username) {
|
|
1046
|
-
return await this.request.delete(`fixtures/userProfile/${username}`);
|
|
1047
|
-
}
|
|
1048
1452
|
doPost(url, body) {
|
|
1049
1453
|
return this.request.post(url, {
|
|
1050
1454
|
data: body,
|