@digital-ai/devops-page-object-release 0.0.7 → 0.0.8
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 +10 -0
- package/dist/main.js +1308 -1031
- package/dist/main.js.map +1 -1
- package/dist/module.js +524 -247
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +199 -104
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/module.js
CHANGED
|
@@ -15,6 +15,141 @@ 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
|
+
|
|
18
153
|
class $9626bc9256ce31f7$export$2b65d1d97338f32b {
|
|
19
154
|
constructor(page){
|
|
20
155
|
this.page = page;
|
|
@@ -22,7 +157,47 @@ class $9626bc9256ce31f7$export$2b65d1d97338f32b {
|
|
|
22
157
|
}
|
|
23
158
|
|
|
24
159
|
|
|
25
|
-
class $
|
|
160
|
+
class $4444bee76761dfb1$export$f14c0e3f98d164c0 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
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.locator("#inputLogin").fill(userName);
|
|
170
|
+
await this.page.locator("#inputPassword").fill(password);
|
|
171
|
+
await this.page.locator("button[type='submit']").click();
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Logout as authenticated user
|
|
175
|
+
*/ async logout() {
|
|
176
|
+
await this.page.locator("button.dot-avatar").click();
|
|
177
|
+
await this.page.getByText("Log out").click();
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Expect login to be restricted for a user
|
|
181
|
+
*/ async expectLoginDisallowed() {
|
|
182
|
+
const val = await this.page.textContent('.error-content span[ng-show="loginInfo.failedStatus == 403"]');
|
|
183
|
+
(0, $hOLA6$expect)(val).toContain("You do not have 'login' permission.");
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Expect the respective user is logged In
|
|
187
|
+
* @param username
|
|
188
|
+
*/ async expectToBeLogged(username) {
|
|
189
|
+
const val = await this.page.locator("top-toolbar .avatar-wrapper span.dot-tooltip").getAttribute("aria-label");
|
|
190
|
+
(0, $hOLA6$expect)(val).toContain(username);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
class $d2ac4753e13169c7$export$a678525e79c4ccc4 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
26
201
|
async expectNumberOfReleases(releaseTitle, amount) {
|
|
27
202
|
if (amount === 1) await (0, $hOLA6$expect)(this.page.locator(".release").getByText(releaseTitle)).toBeVisible();
|
|
28
203
|
else await (0, $hOLA6$expect)(this.page.locator(".release").getByText(releaseTitle).count()).toBe(amount);
|
|
@@ -31,7 +206,7 @@ class $5359280e98d97ff9$export$a678525e79c4ccc4 extends (0, $9626bc9256ce31f7$ex
|
|
|
31
206
|
await this.page.locator(".release-line .row-wrapper .release-title-wrapper a", {
|
|
32
207
|
hasText: releaseTitle
|
|
33
208
|
}).click();
|
|
34
|
-
return new (0, $
|
|
209
|
+
return new (0, $43cbcdfccb6c2a76$export$f43492e8ac3c566)(this.page);
|
|
35
210
|
}
|
|
36
211
|
}
|
|
37
212
|
|
|
@@ -43,7 +218,7 @@ class $862f65268e488e83$export$fb932093f944abe4 extends (0, $9626bc9256ce31f7$ex
|
|
|
43
218
|
await this.page.locator(".popover-content xlr-context-menu a", {
|
|
44
219
|
hasText: "View releases"
|
|
45
220
|
}).click();
|
|
46
|
-
return new (0, $
|
|
221
|
+
return new (0, $d2ac4753e13169c7$export$a678525e79c4ccc4)(this.page);
|
|
47
222
|
}
|
|
48
223
|
async openContextMenu(title) {
|
|
49
224
|
await (0, $hOLA6$expect)(async ()=>{
|
|
@@ -59,58 +234,6 @@ class $862f65268e488e83$export$fb932093f944abe4 extends (0, $9626bc9256ce31f7$ex
|
|
|
59
234
|
|
|
60
235
|
|
|
61
236
|
|
|
62
|
-
class $1b3e547d6616178c$export$90ba71b7d7997728 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
63
|
-
constructor(page){
|
|
64
|
-
super(page);
|
|
65
|
-
this.taskModalLocator = this.page.locator(".modal-content.task-details");
|
|
66
|
-
}
|
|
67
|
-
async close() {
|
|
68
|
-
await this.taskModalLocator.locator(".modal-header button.close").click();
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
class $aaf14e80ae835616$export$b66cc3708c7bd4a4 extends (0, $1b3e547d6616178c$export$90ba71b7d7997728) {
|
|
74
|
-
async expectFieldNotEmpty(field) {
|
|
75
|
-
await (0, $hOLA6$expect)(this.taskModalLocator.locator(`#${field} .display`).textContent).toBeDefined();
|
|
76
|
-
}
|
|
77
|
-
async setSelectField(propertyName, value) {
|
|
78
|
-
await this.focusOnField(propertyName);
|
|
79
|
-
await this.taskModalLocator.locator(`select[name="${propertyName}"]`).selectOption(value);
|
|
80
|
-
}
|
|
81
|
-
async setTextField(propertyName, value) {
|
|
82
|
-
await this.focusOnField(propertyName);
|
|
83
|
-
await this.taskModalLocator.locator(`input[name="${propertyName}"]`).fill(value);
|
|
84
|
-
}
|
|
85
|
-
async setAutocompleteField(propertyName, value) {
|
|
86
|
-
await this.focusOnAutocompleteField(propertyName);
|
|
87
|
-
await this.taskModalLocator.locator(`#${propertyName} ul li`).getByText(value).click();
|
|
88
|
-
}
|
|
89
|
-
async expectOutputValueToBe(propertyName, value) {
|
|
90
|
-
await (0, $hOLA6$expect)(this.taskModalLocator.locator(`#${propertyName} .field-readonly span`)).toContainText(value);
|
|
91
|
-
}
|
|
92
|
-
// TODO move this to a new inline-editor
|
|
93
|
-
async focusOnField(propertyName) {
|
|
94
|
-
await (0, $hOLA6$expect)(async ()=>{
|
|
95
|
-
await this.taskModalLocator.locator(`#${propertyName} .display`).click({
|
|
96
|
-
force: true
|
|
97
|
-
});
|
|
98
|
-
await (0, $hOLA6$expect)(this.taskModalLocator.locator(`#${propertyName} label.edit`)).toBeVisible();
|
|
99
|
-
}).toPass();
|
|
100
|
-
}
|
|
101
|
-
async focusOnAutocompleteField(propertyName) {
|
|
102
|
-
await (0, $hOLA6$expect)(async ()=>{
|
|
103
|
-
await this.taskModalLocator.locator(`#${propertyName} input`).click({
|
|
104
|
-
force: true
|
|
105
|
-
});
|
|
106
|
-
await (0, $hOLA6$expect)(this.taskModalLocator.locator(`#${propertyName} ul`)).toBeVisible();
|
|
107
|
-
}).toPass();
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
237
|
async function $251ce8153733e46f$export$a0f926f04148e5d2(locators) {
|
|
115
238
|
const res = await Promise.all([
|
|
116
239
|
...locators.map(async (locator, index)=>{
|
|
@@ -134,13 +257,13 @@ async function $251ce8153733e46f$export$a0f926f04148e5d2(locators) {
|
|
|
134
257
|
}
|
|
135
258
|
|
|
136
259
|
|
|
137
|
-
class $
|
|
260
|
+
class $f48771b486a3eb8f$export$a87f0ae8695e74be extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
138
261
|
async openVariable(variableKey) {
|
|
139
262
|
await this.page.locator(`.variables-list .variable`).getByText(variableKey).click();
|
|
140
|
-
return new $
|
|
263
|
+
return new $f48771b486a3eb8f$var$ReleaseVariableModal(this.page);
|
|
141
264
|
}
|
|
142
265
|
}
|
|
143
|
-
class $
|
|
266
|
+
class $f48771b486a3eb8f$var$ReleaseVariableModal extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
144
267
|
async expectValue(locators, expectFn) {
|
|
145
268
|
const [index, locator] = await (0, $251ce8153733e46f$export$a0f926f04148e5d2)(locators);
|
|
146
269
|
await expectFn[index](locator);
|
|
@@ -175,26 +298,10 @@ class $2d8ab26bb7c4ceb5$var$ReleaseVariableModal extends (0, $9626bc9256ce31f7$e
|
|
|
175
298
|
|
|
176
299
|
|
|
177
300
|
|
|
178
|
-
class $
|
|
179
|
-
constructor(page){
|
|
180
|
-
super(page);
|
|
181
|
-
this.taskDrawerLocator = this.page.locator("task-drawer .dot-drawer");
|
|
182
|
-
}
|
|
183
|
-
async openConfigRail() {
|
|
184
|
-
await this.openRail("Config");
|
|
185
|
-
return new $e50eb8e8657a3113$var$ConfigRail(this.page);
|
|
186
|
-
}
|
|
187
|
-
async openRail(rail) {
|
|
188
|
-
await this.taskDrawerLocator.locator(".task-navigation-rail").getByText(rail).click();
|
|
189
|
-
}
|
|
190
|
-
async close() {
|
|
191
|
-
await this.taskDrawerLocator.locator(".task-drawer-header").getByTestId("close-btn").click();
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
class $e50eb8e8657a3113$var$ConfigRail extends $e50eb8e8657a3113$export$e946776eae644790 {
|
|
301
|
+
class $e44e9af564fb00f7$export$64c93bc7fb9ca44e extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
195
302
|
constructor(page){
|
|
196
303
|
super(page);
|
|
197
|
-
this.railLocator = this.
|
|
304
|
+
this.railLocator = this.page.locator("task-drawer .dot-drawer .task-config");
|
|
198
305
|
}
|
|
199
306
|
async openInputProperties() {
|
|
200
307
|
await this.railLocator.locator(".task-config-header").getByText("Input properties").click();
|
|
@@ -248,7 +355,99 @@ class $e50eb8e8657a3113$var$ConfigRail extends $e50eb8e8657a3113$export$e946776e
|
|
|
248
355
|
}
|
|
249
356
|
|
|
250
357
|
|
|
251
|
-
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
class $3fa741329d8067d5$export$d4865631ba74f3e2 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
362
|
+
constructor(page){
|
|
363
|
+
super(page);
|
|
364
|
+
this.railLocator = this.page.locator("task-drawer .dot-drawer .task-conditions");
|
|
365
|
+
this.preconditionToggle = page.getByLabel("Enable precondition");
|
|
366
|
+
this.textEditor = page.getByRole("textbox");
|
|
367
|
+
this.saveButton = page.getByTestId("save-btn");
|
|
368
|
+
}
|
|
369
|
+
async enablePrecondition() {
|
|
370
|
+
(0, $hOLA6$expect)(await this.preconditionToggle.isChecked()).toBe(false);
|
|
371
|
+
await this.preconditionToggle.check();
|
|
372
|
+
}
|
|
373
|
+
async disablePrecondition() {
|
|
374
|
+
(0, $hOLA6$expect)(await this.preconditionToggle.isChecked()).toBe(true);
|
|
375
|
+
await this.preconditionToggle.uncheck();
|
|
376
|
+
}
|
|
377
|
+
async setPrecondition(script) {
|
|
378
|
+
await this.enablePrecondition();
|
|
379
|
+
await this.textEditor.fill(script);
|
|
380
|
+
await this.saveButton.dblclick();
|
|
381
|
+
await this.page.waitForTimeout(1000);
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
387
|
+
constructor(page){
|
|
388
|
+
super(page);
|
|
389
|
+
this.taskDrawerLocator = this.page.locator("task-drawer .dot-drawer");
|
|
390
|
+
this.retryButton = this.page.getByRole("button", {
|
|
391
|
+
name: "Retry"
|
|
392
|
+
});
|
|
393
|
+
this.cancelButton = this.page.getByTestId("task-action-cancel");
|
|
394
|
+
this.commentBox = this.page.getByTestId("task-action-comment");
|
|
395
|
+
this.confirm = this.page.getByTestId("task-action-confirm");
|
|
396
|
+
this.config = new (0, $e44e9af564fb00f7$export$64c93bc7fb9ca44e)(page);
|
|
397
|
+
this.condition = new (0, $3fa741329d8067d5$export$d4865631ba74f3e2)(page);
|
|
398
|
+
this.skipMenu = this.page.getByRole("menuitem", {
|
|
399
|
+
name: "Skip"
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
async openOverviewRail() {
|
|
403
|
+
await this.openRail("Overview");
|
|
404
|
+
}
|
|
405
|
+
async openActivityRail() {
|
|
406
|
+
await this.openRail("Activity");
|
|
407
|
+
}
|
|
408
|
+
async openSchedulingRail() {
|
|
409
|
+
await this.openRail("Scheduling");
|
|
410
|
+
}
|
|
411
|
+
async openConditionRail() {
|
|
412
|
+
await this.openRail("Conditions");
|
|
413
|
+
}
|
|
414
|
+
async openAttributesRail() {
|
|
415
|
+
await this.openRail("Attributes");
|
|
416
|
+
}
|
|
417
|
+
async openAttachRail() {
|
|
418
|
+
await this.openRail("Attach");
|
|
419
|
+
}
|
|
420
|
+
async openTagsRail() {
|
|
421
|
+
await this.openRail("Tags");
|
|
422
|
+
}
|
|
423
|
+
async openRail(rail) {
|
|
424
|
+
await this.taskDrawerLocator.locator(".task-navigation-rail").getByText(rail).click();
|
|
425
|
+
}
|
|
426
|
+
async close() {
|
|
427
|
+
await this.taskDrawerLocator.locator(".task-drawer-header").getByTestId("close-btn").click();
|
|
428
|
+
}
|
|
429
|
+
async retryTask(comment) {
|
|
430
|
+
await this.retryButton.click();
|
|
431
|
+
await this.commentBox.fill(comment);
|
|
432
|
+
await this.confirm.click();
|
|
433
|
+
}
|
|
434
|
+
async skipTask(comment) {
|
|
435
|
+
await this.page.getByRole("button", {
|
|
436
|
+
name: "arrow-down icon",
|
|
437
|
+
exact: true
|
|
438
|
+
}).click();
|
|
439
|
+
await this.skipMenu.click();
|
|
440
|
+
await this.commentBox.fill(comment);
|
|
441
|
+
await this.confirm.click();
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
447
|
+
constructor(page){
|
|
448
|
+
super(page);
|
|
449
|
+
this.taskDrawer = new (0, $8e39246218b802fc$export$e946776eae644790)(page);
|
|
450
|
+
}
|
|
252
451
|
async openTriggers() {
|
|
253
452
|
await this.openSubPage("Triggers");
|
|
254
453
|
return new (0, $862f65268e488e83$export$fb932093f944abe4)(this.page);
|
|
@@ -261,13 +460,13 @@ class $6100b25ffc426db0$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
|
|
|
261
460
|
await this.page.locator(".modal .continue").click();
|
|
262
461
|
}
|
|
263
462
|
getPhase(phaseName) {
|
|
264
|
-
return new $
|
|
463
|
+
return new $43cbcdfccb6c2a76$var$Phase(this.page, phaseName);
|
|
265
464
|
}
|
|
266
465
|
async start() {
|
|
267
|
-
await this.page.
|
|
268
|
-
|
|
466
|
+
await this.page.getByTestId("start-btn").click();
|
|
467
|
+
await this.page.getByRole("button", {
|
|
468
|
+
name: "Start"
|
|
269
469
|
}).click();
|
|
270
|
-
await this.page.locator(".modal button.primary").click();
|
|
271
470
|
}
|
|
272
471
|
async waitForTaskCompleted(taskTitle) {
|
|
273
472
|
await (0, $hOLA6$expect)(this.page.locator(".task.completed").getByText(taskTitle, {
|
|
@@ -279,24 +478,33 @@ class $6100b25ffc426db0$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
|
|
|
279
478
|
exact: true
|
|
280
479
|
})).toBeVisible();
|
|
281
480
|
}
|
|
481
|
+
async waitForTaskSkipped(taskTitle) {
|
|
482
|
+
await (0, $hOLA6$expect)(this.page.locator(".task.skipped").getByText(taskTitle, {
|
|
483
|
+
exact: true
|
|
484
|
+
})).toBeVisible();
|
|
485
|
+
}
|
|
486
|
+
async waitForTaskAborted(taskTitle) {
|
|
487
|
+
await (0, $hOLA6$expect)(this.page.locator(".task.aborted").getByText(taskTitle, {
|
|
488
|
+
exact: true
|
|
489
|
+
})).toBeVisible();
|
|
490
|
+
}
|
|
282
491
|
async waitForStatusLine(statusLine) {
|
|
283
492
|
await (0, $hOLA6$expect)(this.page.locator(".task .status-line").getByText(statusLine, {
|
|
284
493
|
exact: true
|
|
285
494
|
})).toBeVisible();
|
|
286
495
|
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
return new (0, $aaf14e80ae835616$export$b66cc3708c7bd4a4)(this.page);
|
|
496
|
+
async waitForTaskStarted(taskTitle) {
|
|
497
|
+
await (0, $hOLA6$expect)(this.page.locator(".task.in_progress").getByTitle(taskTitle, {
|
|
498
|
+
exact: true
|
|
499
|
+
})).toBeVisible();
|
|
292
500
|
}
|
|
293
501
|
async openTaskDrawer(taskName) {
|
|
294
502
|
await this.page.locator(".task-header").getByText(taskName).click();
|
|
295
|
-
return
|
|
503
|
+
return this.taskDrawer;
|
|
296
504
|
}
|
|
297
505
|
async openVariables() {
|
|
298
506
|
await this.openReleaseMenu("Variables");
|
|
299
|
-
return new (0, $
|
|
507
|
+
return new (0, $f48771b486a3eb8f$export$a87f0ae8695e74be)(this.page);
|
|
300
508
|
}
|
|
301
509
|
async openReleaseMenu(menuItem) {
|
|
302
510
|
await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
|
|
@@ -308,8 +516,33 @@ class $6100b25ffc426db0$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
|
|
|
308
516
|
hasText: subpage
|
|
309
517
|
}).click();
|
|
310
518
|
}
|
|
519
|
+
async openTask(taskName) {
|
|
520
|
+
await this.page.getByTitle(taskName, {
|
|
521
|
+
exact: true
|
|
522
|
+
}).click();
|
|
523
|
+
}
|
|
524
|
+
async collapseAllTaskView() {
|
|
525
|
+
const icCollapseTreeview1 = this.page.locator("div.pull-left.expander.ng-scope i.xl-icon.arrow-down-icon");
|
|
526
|
+
for (const element of (await icCollapseTreeview1.all())){
|
|
527
|
+
const blnVal = await element.isVisible();
|
|
528
|
+
if (blnVal) {
|
|
529
|
+
await element.click();
|
|
530
|
+
await this.collapseAllTaskView();
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
async expandAllTaskView() {
|
|
535
|
+
const icExpandTreeview1 = this.page.locator("div.pull-left.expander.ng-scope i.xl-icon.arrow-right-icon");
|
|
536
|
+
for (const element of (await icExpandTreeview1.all())){
|
|
537
|
+
const blnVal = await element.isVisible();
|
|
538
|
+
if (blnVal) {
|
|
539
|
+
await element.click();
|
|
540
|
+
await this.expandAllTaskView();
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
}
|
|
311
544
|
}
|
|
312
|
-
class $
|
|
545
|
+
class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
313
546
|
constructor(page, phaseName){
|
|
314
547
|
super(page);
|
|
315
548
|
this.phaseLocator = page.locator(".phase", {
|
|
@@ -385,9 +618,134 @@ class $6720a523bcb1cce0$export$3cac5fd37ae64b91 extends (0, $9626bc9256ce31f7$ex
|
|
|
385
618
|
}
|
|
386
619
|
|
|
387
620
|
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
class $21185a378c23589e$export$e2e2e1ffdce20c30 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
625
|
+
constructor(page){
|
|
626
|
+
super(page);
|
|
627
|
+
this.userName = page.locator("#username");
|
|
628
|
+
this.name = page.locator("#full-name");
|
|
629
|
+
this.email = page.locator("#email");
|
|
630
|
+
this.password = page.locator('[data-test="password-input"]');
|
|
631
|
+
this.cnfPassword = page.locator("#passwordConfirmation");
|
|
632
|
+
this.saveButton = page.getByRole("button", {
|
|
633
|
+
name: "Save"
|
|
634
|
+
});
|
|
635
|
+
this.cancelButton = page.getByRole("button", {
|
|
636
|
+
name: "Cancel"
|
|
637
|
+
});
|
|
638
|
+
this.deleteButton = page.getByRole("button", {
|
|
639
|
+
name: "Delete"
|
|
640
|
+
});
|
|
641
|
+
}
|
|
642
|
+
async setUserName(username) {
|
|
643
|
+
return await this.userName.fill(username);
|
|
644
|
+
}
|
|
645
|
+
async setFullName(fullName) {
|
|
646
|
+
return await this.name.fill(fullName);
|
|
647
|
+
}
|
|
648
|
+
async setEmail(email) {
|
|
649
|
+
return await this.email.fill(email);
|
|
650
|
+
}
|
|
651
|
+
async setPassword(password) {
|
|
652
|
+
return await this.password.fill(password);
|
|
653
|
+
}
|
|
654
|
+
async setConfirmPassword(cnfPassword) {
|
|
655
|
+
return await this.cnfPassword.fill(cnfPassword);
|
|
656
|
+
}
|
|
657
|
+
async save() {
|
|
658
|
+
await this.saveButton.click();
|
|
659
|
+
}
|
|
660
|
+
async cancel() {
|
|
661
|
+
await this.cancelButton.click();
|
|
662
|
+
}
|
|
663
|
+
async delete() {
|
|
664
|
+
await this.deleteButton.click();
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
670
|
+
constructor(page){
|
|
671
|
+
super(page);
|
|
672
|
+
this.page = page;
|
|
673
|
+
this.newUserButton = this.page.getByTestId("new-user-btn");
|
|
674
|
+
this.modal = new (0, $21185a378c23589e$export$e2e2e1ffdce20c30)(page);
|
|
675
|
+
}
|
|
676
|
+
async openUsersPage() {
|
|
677
|
+
this.page.goto("/#/users", {
|
|
678
|
+
timeout: 1000
|
|
679
|
+
});
|
|
680
|
+
}
|
|
681
|
+
async toggleLoginPermission(username) {
|
|
682
|
+
await this.page.getByRole("row", {
|
|
683
|
+
name: "" + username + ""
|
|
684
|
+
}).getByRole("checkbox").check();
|
|
685
|
+
//await this.page.locator(`tr:contains('${username}') .login-permission input`).click();
|
|
686
|
+
}
|
|
687
|
+
async addUser() {
|
|
688
|
+
await this.newUserButton.click();
|
|
689
|
+
}
|
|
690
|
+
async createUser(username, password) {
|
|
691
|
+
await this.modal.setUserName(username);
|
|
692
|
+
await this.modal.setFullName(username);
|
|
693
|
+
await this.modal.setEmail("testuser@company.com");
|
|
694
|
+
await this.modal.setPassword(password);
|
|
695
|
+
await this.modal.setConfirmPassword(password);
|
|
696
|
+
await this.modal.save();
|
|
697
|
+
}
|
|
698
|
+
async expectToHaveLoginPermission(username) {
|
|
699
|
+
return await (0, $hOLA6$expect)(this.page.getByRole("row", {
|
|
700
|
+
name: "" + username + ""
|
|
701
|
+
}).getByRole("checkbox")).toBeChecked();
|
|
702
|
+
}
|
|
703
|
+
async deleteUser(username) {
|
|
704
|
+
await this.page.getByRole("row", {
|
|
705
|
+
name: "" + username + ""
|
|
706
|
+
}).locator("i").nth(1).click();
|
|
707
|
+
await this.modal.delete();
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
class $f1bf370bb7f683ca$export$1d7840d5cdc861d5 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
714
|
+
constructor(page){
|
|
715
|
+
super(page);
|
|
716
|
+
this.settingsIcon = this.page.getByRole("button", {
|
|
717
|
+
name: "Settings"
|
|
718
|
+
});
|
|
719
|
+
this.usersAndPermissionMenu = this.page.getByTestId("undefined-menu").getByText("Users and permissions");
|
|
720
|
+
this.managePluginMenu = this.page.getByText("Manage plugins");
|
|
721
|
+
}
|
|
722
|
+
async openUsersAndPermissions() {
|
|
723
|
+
await this.settingsIcon.click();
|
|
724
|
+
await this.page.getByTestId("undefined-menu").getByText("Users and permissions").click();
|
|
725
|
+
}
|
|
726
|
+
async openManagePlugin() {
|
|
727
|
+
await this.settingsIcon.click();
|
|
728
|
+
await this.managePluginMenu.click();
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
|
|
733
|
+
|
|
734
|
+
class $9ca6e63d357957dd$export$922081b54f2ab994 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
735
|
+
constructor(page){
|
|
736
|
+
super(page);
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
|
|
388
741
|
class $e72552cbf941ecfa$export$b8a61e5c71402559 {
|
|
389
742
|
constructor(page){
|
|
390
743
|
this.page = page;
|
|
744
|
+
this.releasePage = new (0, $43cbcdfccb6c2a76$export$f43492e8ac3c566)(page);
|
|
745
|
+
this.settingsMenu = new (0, $f1bf370bb7f683ca$export$1d7840d5cdc861d5)(page);
|
|
746
|
+
this.usersPage = new (0, $2cb6a6ac6b17e85f$export$107317390f5aa598)(page);
|
|
747
|
+
this.applicationPage = new (0, $c313b10398604df2$export$1533b625ec0c75e2)(page);
|
|
748
|
+
this.taskDetailsPage = new (0, $9ca6e63d357957dd$export$922081b54f2ab994)(page);
|
|
391
749
|
}
|
|
392
750
|
async openTemplate(id) {
|
|
393
751
|
return this.openReleaseOrTemplate(id, false);
|
|
@@ -401,172 +759,64 @@ class $e72552cbf941ecfa$export$b8a61e5c71402559 {
|
|
|
401
759
|
async openPersonalAccessTokenPage() {
|
|
402
760
|
return new (0, $6720a523bcb1cce0$export$3cac5fd37ae64b91)(this.page).openPersonalAccessTokenPage();
|
|
403
761
|
}
|
|
762
|
+
async gotoFolderPage() {
|
|
763
|
+
await this.page.getByText("Folders").click();
|
|
764
|
+
}
|
|
765
|
+
async gotoTaskPage() {
|
|
766
|
+
await this.page.getByTestId("sideNav-item-3").getByText("Tasks").click();
|
|
767
|
+
}
|
|
768
|
+
async gotoReleasePage() {
|
|
769
|
+
await this.page.getByText("Releases").click();
|
|
770
|
+
}
|
|
771
|
+
async gotoWorkflowCatalogPage() {
|
|
772
|
+
await this.page.getByText("Workflow catalog").click();
|
|
773
|
+
}
|
|
774
|
+
async gotoWorkflowsPage() {
|
|
775
|
+
await this.page.getByTestId("sideNav-item-6").getByText("Workflows").click();
|
|
776
|
+
}
|
|
777
|
+
async gotoGroupsPage() {
|
|
778
|
+
await this.page.getByText("Groups").click();
|
|
779
|
+
}
|
|
780
|
+
async gotoReleaseCalenderPage() {
|
|
781
|
+
await this.page.getByText("Release calendar").click();
|
|
782
|
+
}
|
|
783
|
+
async gotoDeliveriesPage() {
|
|
784
|
+
await this.page.getByText("Deliveries").click();
|
|
785
|
+
}
|
|
786
|
+
async gotoTriggersPage() {
|
|
787
|
+
await this.page.getByText("Triggers").click();
|
|
788
|
+
}
|
|
789
|
+
async gotoDigitalAnalyticsPage() {
|
|
790
|
+
await this.page.getByText("Digital.ai Analytics").click();
|
|
791
|
+
}
|
|
792
|
+
async gotoReportsPage() {
|
|
793
|
+
await this.page.getByText("Reports").click();
|
|
794
|
+
}
|
|
795
|
+
async gotoTemplatesPage() {
|
|
796
|
+
await this.page.getByText("Templates").click();
|
|
797
|
+
}
|
|
798
|
+
async gotoEnvironmentsPage() {
|
|
799
|
+
await this.page.getByText("Environments").click();
|
|
800
|
+
}
|
|
801
|
+
async gotoEnvironmentsCalenderPage() {
|
|
802
|
+
await this.page.getByText("Environments calendar").click();
|
|
803
|
+
}
|
|
804
|
+
async gotoGobalVariablesPage() {
|
|
805
|
+
await this.page.getByText("Global variables").click();
|
|
806
|
+
}
|
|
807
|
+
async gotoConnectionsPage() {
|
|
808
|
+
await this.page.getByText("Connections").click();
|
|
809
|
+
}
|
|
404
810
|
async openReleaseOrTemplate(id, release) {
|
|
405
811
|
const url = release ? "releases" : "templates";
|
|
406
812
|
await this.page.goto(`./#/${url}/${id}`);
|
|
407
813
|
await this.page.waitForSelector("#release");
|
|
408
|
-
return new (0, $
|
|
814
|
+
return new (0, $43cbcdfccb6c2a76$export$f43492e8ac3c566)(this.page);
|
|
409
815
|
}
|
|
410
816
|
}
|
|
411
817
|
|
|
412
818
|
|
|
413
819
|
|
|
414
|
-
|
|
415
|
-
class $ccd46c191f81b177$export$f14c0e3f98d164c0 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
416
|
-
async login(userName, password) {
|
|
417
|
-
await this.page.goto("./");
|
|
418
|
-
await (0, $hOLA6$expect)(this.page).toHaveTitle("Digital.ai Release");
|
|
419
|
-
await this.page.locator("#inputLogin").fill(userName);
|
|
420
|
-
await this.page.locator("#inputPassword").fill(password);
|
|
421
|
-
await this.page.locator("button[type='submit']").click();
|
|
422
|
-
await (0, $hOLA6$expect)(this.page.locator("#releases-content")).toBeVisible();
|
|
423
|
-
}
|
|
424
|
-
async logout() {
|
|
425
|
-
await this.page.locator("button.dot-avatar").click();
|
|
426
|
-
await this.page.getByText("Log out").click();
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
const $f86fbaaa8b4e8c61$export$45f0aca2596a2bb3 = function() {
|
|
437
|
-
const RELEASE_TYPE = "xlrelease.Release";
|
|
438
|
-
const PHASE_TYPE = "xlrelease.Phase";
|
|
439
|
-
const TEAM_TYPE = "xlrelease.Team";
|
|
440
|
-
const TASK_TYPE = "xlrelease.Task";
|
|
441
|
-
const COMMENT_TYPE = "xlrelease.Comment";
|
|
442
|
-
const CONDITION_TYPE = "xlrelease.GateCondition";
|
|
443
|
-
const DEPENDENCY_TYPE = "xlrelease.Dependency";
|
|
444
|
-
const LINK_TYPE = "xlrelease.Link";
|
|
445
|
-
const ATTACHMENT_TYPE = "xlrelease.Attachment";
|
|
446
|
-
const DASHBOARD_TYPE = "xlrelease.Dashboard";
|
|
447
|
-
const _TRIGGER_TYPE = "xlrelease.ReleaseTrigger";
|
|
448
|
-
const JIRA_TYPE = "jira.CreateIssue";
|
|
449
|
-
const DEFAULT_TASK_OWNER = "Itchy";
|
|
450
|
-
const processTasks = (task, container, index)=>{
|
|
451
|
-
if ((0, $hOLA6$lodashisUndefined)(task.type)) task.type = TASK_TYPE;
|
|
452
|
-
task.id = task.id || `${container.id}/Task${index}`;
|
|
453
|
-
if ((0, $hOLA6$lodashisUndefined)(task.owner) && task.type !== JIRA_TYPE) task.owner = DEFAULT_TASK_OWNER;
|
|
454
|
-
if (task.owner === null) delete task.owner;
|
|
455
|
-
(0, $hOLA6$lodasheach)(task.conditions, function(condition, idx) {
|
|
456
|
-
condition.type = CONDITION_TYPE;
|
|
457
|
-
condition.id = `${task.id}/GateCondition${idx}`;
|
|
458
|
-
});
|
|
459
|
-
(0, $hOLA6$lodasheach)(task.dependencies, function(dependency, idx) {
|
|
460
|
-
dependency.type = DEPENDENCY_TYPE;
|
|
461
|
-
dependency.id = `${task.id}/Dependency${idx}`;
|
|
462
|
-
});
|
|
463
|
-
(0, $hOLA6$lodasheach)(task.links, function(link, idx) {
|
|
464
|
-
link.type = LINK_TYPE;
|
|
465
|
-
link.id = `${task.id}/Link${idx}`;
|
|
466
|
-
});
|
|
467
|
-
(0, $hOLA6$lodasheach)(task.comments, function(comment, idx) {
|
|
468
|
-
comment.type = COMMENT_TYPE;
|
|
469
|
-
comment.id = `${task.id}/Comment${idx}`;
|
|
470
|
-
});
|
|
471
|
-
(0, $hOLA6$lodasheach)(task.tasks, function(subTask, idx) {
|
|
472
|
-
processTasks(subTask, task, idx);
|
|
473
|
-
});
|
|
474
|
-
(0, $hOLA6$lodasheach)(task.templateVariables, function(variable, idx) {
|
|
475
|
-
(0, $hOLA6$lodashdefaults)(variable, getVariableEntity(variable.value, variable.key, task.id, idx));
|
|
476
|
-
});
|
|
477
|
-
(0, $hOLA6$lodasheach)(task.attachments, function(attachment, idx) {
|
|
478
|
-
attachment.type = ATTACHMENT_TYPE;
|
|
479
|
-
attachment.id = `${task.id}/Attachment${idx}`;
|
|
480
|
-
});
|
|
481
|
-
if (task.pythonScript) {
|
|
482
|
-
const pythonScript = task.pythonScript;
|
|
483
|
-
pythonScript.id = `${task.id}/PythonScript`;
|
|
484
|
-
pythonScript.customScriptTask = task.id;
|
|
485
|
-
}
|
|
486
|
-
};
|
|
487
|
-
const processPhases = (phase, release, index)=>{
|
|
488
|
-
phase.type = PHASE_TYPE;
|
|
489
|
-
phase.id = `${release.id}/Phase${index}`;
|
|
490
|
-
(0, $hOLA6$lodashforEach)(phase.tasks, (task, idx)=>{
|
|
491
|
-
processTasks(task, phase, idx);
|
|
492
|
-
});
|
|
493
|
-
};
|
|
494
|
-
const getVariableEntity = (value, key, containerId, index, password)=>{
|
|
495
|
-
const keyNoSyntax = key.replace("${", "").replace("}", "");
|
|
496
|
-
return {
|
|
497
|
-
id: `${containerId}/Variable${index}`,
|
|
498
|
-
key: keyNoSyntax,
|
|
499
|
-
requiresValue: true,
|
|
500
|
-
showOnReleaseStart: true,
|
|
501
|
-
type: password ? "xlrelease.PasswordStringVariable" : "xlrelease.StringVariable",
|
|
502
|
-
value: value
|
|
503
|
-
};
|
|
504
|
-
};
|
|
505
|
-
const getValueProviderConfigurationEntity = function(containerId) {
|
|
506
|
-
return {
|
|
507
|
-
id: `${containerId}/valueProvider`,
|
|
508
|
-
variable: containerId
|
|
509
|
-
};
|
|
510
|
-
};
|
|
511
|
-
const getDashboardExtension = (dashboard, releaseId)=>{
|
|
512
|
-
const dashboardExtension = {
|
|
513
|
-
id: `${releaseId}/summary`,
|
|
514
|
-
type: DASHBOARD_TYPE,
|
|
515
|
-
tiles: []
|
|
516
|
-
};
|
|
517
|
-
if (dashboard.tiles) (0, $hOLA6$lodashforEach)(dashboard.tiles, function(tile, index) {
|
|
518
|
-
dashboardExtension.tiles.push(getTileEntity(tile, `${releaseId}/summary`, index));
|
|
519
|
-
});
|
|
520
|
-
return dashboardExtension;
|
|
521
|
-
};
|
|
522
|
-
function getTileEntity(tile, containerId, index) {
|
|
523
|
-
tile.id = tile.id || `${containerId}/Tile${index}`;
|
|
524
|
-
return tile;
|
|
525
|
-
}
|
|
526
|
-
return function(release) {
|
|
527
|
-
release.type = RELEASE_TYPE;
|
|
528
|
-
if (release.id.indexOf("Applications/") === -1) release.id = `Applications/${release.id}`;
|
|
529
|
-
if (release.startDate) release.queryableStartDate = release.startDate;
|
|
530
|
-
else if (release.scheduledStartDate) release.queryableStartDate = release.scheduledStartDate;
|
|
531
|
-
if (release.endDate) release.queryableEndDate = release.endDate;
|
|
532
|
-
else if (release.dueDate) release.queryableEndDate = release.dueDate;
|
|
533
|
-
if ((0, $hOLA6$lodashisUndefined)(release.owner)) release.owner = "Itchy"; // default release manager
|
|
534
|
-
(0, $hOLA6$lodashforEach)(release.phases, function(phase, index) {
|
|
535
|
-
processPhases(phase, release, index);
|
|
536
|
-
});
|
|
537
|
-
(0, $hOLA6$lodashforEach)(release.teams, function(team, index) {
|
|
538
|
-
team.type = TEAM_TYPE;
|
|
539
|
-
team.id = `${release.id}/Team${index}`;
|
|
540
|
-
});
|
|
541
|
-
(0, $hOLA6$lodashforEach)(release.attachments, function(attachment, index) {
|
|
542
|
-
attachment.type = ATTACHMENT_TYPE;
|
|
543
|
-
attachment.id = `${release.id}/Attachment${index}`;
|
|
544
|
-
});
|
|
545
|
-
(0, $hOLA6$lodashforEach)(release.variables, function(variable, index) {
|
|
546
|
-
(0, $hOLA6$lodashdefaults)(variable, getVariableEntity(variable.value, variable.key, release.id, index));
|
|
547
|
-
if (variable.valueProvider) (0, $hOLA6$lodashdefaults)(variable.valueProvider, getValueProviderConfigurationEntity(variable.id));
|
|
548
|
-
});
|
|
549
|
-
(0, $hOLA6$lodashforEach)((0, $hOLA6$lodashtoPairs)(release.variableValues), function(keyValue, index) {
|
|
550
|
-
if (!release.variables) release.variables = [];
|
|
551
|
-
release.variables.push(getVariableEntity(keyValue[1], keyValue[0], release.id, 1000 + index));
|
|
552
|
-
release.variableValues = undefined;
|
|
553
|
-
});
|
|
554
|
-
(0, $hOLA6$lodashforEach)((0, $hOLA6$lodashtoPairs)(release.passwordVariableValues), function(keyValue, index) {
|
|
555
|
-
if (!release.variables) release.variables = [];
|
|
556
|
-
release.variables.push(getVariableEntity(keyValue[1], keyValue[0], release.id, 1500 + index, true));
|
|
557
|
-
release.passwordVariableValues = undefined;
|
|
558
|
-
});
|
|
559
|
-
if (release.summary) {
|
|
560
|
-
release.extensions = [
|
|
561
|
-
getDashboardExtension(release.summary, release.id)
|
|
562
|
-
];
|
|
563
|
-
release.summary = undefined;
|
|
564
|
-
}
|
|
565
|
-
};
|
|
566
|
-
}();
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
820
|
const $80c3ae34677b4324$var$adminHeaders = {
|
|
571
821
|
Authorization: "Basic YWRtaW46YWRtaW4=",
|
|
572
822
|
Cookie: "XSRF-TOKEN=1;",
|
|
@@ -579,7 +829,7 @@ const $80c3ae34677b4324$export$e0969da9b8fb378d = (0, $hOLA6$test).extend({
|
|
|
579
829
|
return fixtures;
|
|
580
830
|
},
|
|
581
831
|
loginPage: async ({ page: page }, use)=>{
|
|
582
|
-
const loginPage = new (0, $
|
|
832
|
+
const loginPage = new (0, $4444bee76761dfb1$export$f14c0e3f98d164c0)(page);
|
|
583
833
|
await use(loginPage);
|
|
584
834
|
return loginPage;
|
|
585
835
|
},
|
|
@@ -593,6 +843,8 @@ class $80c3ae34677b4324$var$Fixtures {
|
|
|
593
843
|
releaseIds = [];
|
|
594
844
|
triggerIds = [];
|
|
595
845
|
configurationIds = [];
|
|
846
|
+
usernames = [];
|
|
847
|
+
userProfiles = [];
|
|
596
848
|
constructor(request, page){
|
|
597
849
|
this.request = request;
|
|
598
850
|
this.page = page;
|
|
@@ -638,9 +890,13 @@ class $80c3ae34677b4324$var$Fixtures {
|
|
|
638
890
|
for (const releaseId of this.releaseIds.reverse())promises.push(this.deleteRelease(releaseId));
|
|
639
891
|
for (const triggerId of this.triggerIds)promises.push(this.deleteTrigger(triggerId));
|
|
640
892
|
for (const confId of this.configurationIds)promises.push(this.deleteConfiguration(confId));
|
|
893
|
+
for (const usernames of this.usernames)promises.push(this.deleteUser(usernames));
|
|
894
|
+
for (const userProfiles of this.userProfiles)promises.push(this.deleteUserProfile(userProfiles));
|
|
641
895
|
this.releaseIds = [];
|
|
642
896
|
this.triggerIds = [];
|
|
643
897
|
this.configurationIds = [];
|
|
898
|
+
this.usernames = [];
|
|
899
|
+
this.userProfiles = [];
|
|
644
900
|
return Promise.all(promises);
|
|
645
901
|
}
|
|
646
902
|
async waitForReleaseStarted(releaseTitle) {
|
|
@@ -690,6 +946,27 @@ class $80c3ae34677b4324$var$Fixtures {
|
|
|
690
946
|
}
|
|
691
947
|
]);
|
|
692
948
|
}
|
|
949
|
+
async addUser(username, password) {
|
|
950
|
+
this.usernames.push(username);
|
|
951
|
+
return await this.doPost("fixtures/user", {
|
|
952
|
+
username: username,
|
|
953
|
+
password: password
|
|
954
|
+
});
|
|
955
|
+
}
|
|
956
|
+
async addUserProfile(username, profile) {
|
|
957
|
+
if (!profile) profile = {};
|
|
958
|
+
profile.id = username;
|
|
959
|
+
profile.type = "xlrelease.UserProfile";
|
|
960
|
+
profile.canonicalId = username.toLowerCase();
|
|
961
|
+
this.userProfiles.push(profile.canonicalId);
|
|
962
|
+
return await this.doPost("fixtures/userProfile", profile);
|
|
963
|
+
}
|
|
964
|
+
async deleteUser(username) {
|
|
965
|
+
return await this.request.delete(`fixtures/user/${username}`);
|
|
966
|
+
}
|
|
967
|
+
async deleteUserProfile(username) {
|
|
968
|
+
return await this.request.delete(`fixtures/userProfile/${username}`);
|
|
969
|
+
}
|
|
693
970
|
doPost(url, body) {
|
|
694
971
|
return this.request.post(url, {
|
|
695
972
|
data: body,
|