@digital-ai/devops-page-object-release 0.0.7 → 0.0.9
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 +17 -0
- package/dist/main.js +1387 -1032
- package/dist/main.js.map +1 -1
- package/dist/module.js +599 -244
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +209 -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,49 @@ 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.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) {
|
|
26
203
|
async expectNumberOfReleases(releaseTitle, amount) {
|
|
27
204
|
if (amount === 1) await (0, $hOLA6$expect)(this.page.locator(".release").getByText(releaseTitle)).toBeVisible();
|
|
28
205
|
else await (0, $hOLA6$expect)(this.page.locator(".release").getByText(releaseTitle).count()).toBe(amount);
|
|
@@ -31,7 +208,7 @@ class $5359280e98d97ff9$export$a678525e79c4ccc4 extends (0, $9626bc9256ce31f7$ex
|
|
|
31
208
|
await this.page.locator(".release-line .row-wrapper .release-title-wrapper a", {
|
|
32
209
|
hasText: releaseTitle
|
|
33
210
|
}).click();
|
|
34
|
-
return new (0, $
|
|
211
|
+
return new (0, $43cbcdfccb6c2a76$export$f43492e8ac3c566)(this.page);
|
|
35
212
|
}
|
|
36
213
|
}
|
|
37
214
|
|
|
@@ -43,7 +220,7 @@ class $862f65268e488e83$export$fb932093f944abe4 extends (0, $9626bc9256ce31f7$ex
|
|
|
43
220
|
await this.page.locator(".popover-content xlr-context-menu a", {
|
|
44
221
|
hasText: "View releases"
|
|
45
222
|
}).click();
|
|
46
|
-
return new (0, $
|
|
223
|
+
return new (0, $d2ac4753e13169c7$export$a678525e79c4ccc4)(this.page);
|
|
47
224
|
}
|
|
48
225
|
async openContextMenu(title) {
|
|
49
226
|
await (0, $hOLA6$expect)(async ()=>{
|
|
@@ -59,58 +236,6 @@ class $862f65268e488e83$export$fb932093f944abe4 extends (0, $9626bc9256ce31f7$ex
|
|
|
59
236
|
|
|
60
237
|
|
|
61
238
|
|
|
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
239
|
async function $251ce8153733e46f$export$a0f926f04148e5d2(locators) {
|
|
115
240
|
const res = await Promise.all([
|
|
116
241
|
...locators.map(async (locator, index)=>{
|
|
@@ -134,13 +259,13 @@ async function $251ce8153733e46f$export$a0f926f04148e5d2(locators) {
|
|
|
134
259
|
}
|
|
135
260
|
|
|
136
261
|
|
|
137
|
-
class $
|
|
262
|
+
class $f48771b486a3eb8f$export$a87f0ae8695e74be extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
138
263
|
async openVariable(variableKey) {
|
|
139
264
|
await this.page.locator(`.variables-list .variable`).getByText(variableKey).click();
|
|
140
|
-
return new $
|
|
265
|
+
return new $f48771b486a3eb8f$var$ReleaseVariableModal(this.page);
|
|
141
266
|
}
|
|
142
267
|
}
|
|
143
|
-
class $
|
|
268
|
+
class $f48771b486a3eb8f$var$ReleaseVariableModal extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
144
269
|
async expectValue(locators, expectFn) {
|
|
145
270
|
const [index, locator] = await (0, $251ce8153733e46f$export$a0f926f04148e5d2)(locators);
|
|
146
271
|
await expectFn[index](locator);
|
|
@@ -175,26 +300,10 @@ class $2d8ab26bb7c4ceb5$var$ReleaseVariableModal extends (0, $9626bc9256ce31f7$e
|
|
|
175
300
|
|
|
176
301
|
|
|
177
302
|
|
|
178
|
-
class $
|
|
303
|
+
class $e44e9af564fb00f7$export$64c93bc7fb9ca44e extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
179
304
|
constructor(page){
|
|
180
305
|
super(page);
|
|
181
|
-
this.
|
|
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 {
|
|
195
|
-
constructor(page){
|
|
196
|
-
super(page);
|
|
197
|
-
this.railLocator = this.taskDrawerLocator.locator(".task-config");
|
|
306
|
+
this.railLocator = this.page.locator("task-drawer .dot-drawer .task-config");
|
|
198
307
|
}
|
|
199
308
|
async openInputProperties() {
|
|
200
309
|
await this.railLocator.locator(".task-config-header").getByText("Input properties").click();
|
|
@@ -248,7 +357,99 @@ class $e50eb8e8657a3113$var$ConfigRail extends $e50eb8e8657a3113$export$e946776e
|
|
|
248
357
|
}
|
|
249
358
|
|
|
250
359
|
|
|
251
|
-
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
class $3fa741329d8067d5$export$d4865631ba74f3e2 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
364
|
+
constructor(page){
|
|
365
|
+
super(page);
|
|
366
|
+
this.railLocator = this.page.locator("task-drawer .dot-drawer .task-conditions");
|
|
367
|
+
this.preconditionToggle = page.getByLabel("Enable precondition");
|
|
368
|
+
this.textEditor = page.getByRole("textbox");
|
|
369
|
+
this.saveButton = page.getByTestId("save-btn");
|
|
370
|
+
}
|
|
371
|
+
async enablePrecondition() {
|
|
372
|
+
(0, $hOLA6$expect)(await this.preconditionToggle.isChecked()).toBe(false);
|
|
373
|
+
await this.preconditionToggle.check();
|
|
374
|
+
}
|
|
375
|
+
async disablePrecondition() {
|
|
376
|
+
(0, $hOLA6$expect)(await this.preconditionToggle.isChecked()).toBe(true);
|
|
377
|
+
await this.preconditionToggle.uncheck();
|
|
378
|
+
}
|
|
379
|
+
async setPrecondition(script) {
|
|
380
|
+
await this.enablePrecondition();
|
|
381
|
+
await this.textEditor.fill(script);
|
|
382
|
+
await this.saveButton.dblclick();
|
|
383
|
+
await this.page.waitForTimeout(1000);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
class $8e39246218b802fc$export$e946776eae644790 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
389
|
+
constructor(page){
|
|
390
|
+
super(page);
|
|
391
|
+
this.taskDrawerLocator = this.page.locator("task-drawer .dot-drawer");
|
|
392
|
+
this.retryButton = this.page.getByRole("button", {
|
|
393
|
+
name: "Retry"
|
|
394
|
+
});
|
|
395
|
+
this.cancelButton = this.page.getByTestId("task-action-cancel");
|
|
396
|
+
this.commentBox = this.page.getByTestId("task-action-comment");
|
|
397
|
+
this.confirm = this.page.getByTestId("task-action-confirm");
|
|
398
|
+
this.config = new (0, $e44e9af564fb00f7$export$64c93bc7fb9ca44e)(page);
|
|
399
|
+
this.condition = new (0, $3fa741329d8067d5$export$d4865631ba74f3e2)(page);
|
|
400
|
+
this.skipMenu = this.page.getByRole("menuitem", {
|
|
401
|
+
name: "Skip"
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
async openOverviewRail() {
|
|
405
|
+
await this.openRail("Overview");
|
|
406
|
+
}
|
|
407
|
+
async openActivityRail() {
|
|
408
|
+
await this.openRail("Activity");
|
|
409
|
+
}
|
|
410
|
+
async openSchedulingRail() {
|
|
411
|
+
await this.openRail("Scheduling");
|
|
412
|
+
}
|
|
413
|
+
async openConditionRail() {
|
|
414
|
+
await this.openRail("Conditions");
|
|
415
|
+
}
|
|
416
|
+
async openAttributesRail() {
|
|
417
|
+
await this.openRail("Attributes");
|
|
418
|
+
}
|
|
419
|
+
async openAttachRail() {
|
|
420
|
+
await this.openRail("Attach");
|
|
421
|
+
}
|
|
422
|
+
async openTagsRail() {
|
|
423
|
+
await this.openRail("Tags");
|
|
424
|
+
}
|
|
425
|
+
async openRail(rail) {
|
|
426
|
+
await this.taskDrawerLocator.locator(".task-navigation-rail").getByText(rail).click();
|
|
427
|
+
}
|
|
428
|
+
async close() {
|
|
429
|
+
await this.taskDrawerLocator.locator(".task-drawer-header").getByTestId("close-btn").click();
|
|
430
|
+
}
|
|
431
|
+
async retryTask(comment) {
|
|
432
|
+
await this.retryButton.click();
|
|
433
|
+
await this.commentBox.fill(comment);
|
|
434
|
+
await this.confirm.click();
|
|
435
|
+
}
|
|
436
|
+
async skipTask(comment) {
|
|
437
|
+
await this.page.getByRole("button", {
|
|
438
|
+
name: "arrow-down icon",
|
|
439
|
+
exact: true
|
|
440
|
+
}).click();
|
|
441
|
+
await this.skipMenu.click();
|
|
442
|
+
await this.commentBox.fill(comment);
|
|
443
|
+
await this.confirm.click();
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
class $43cbcdfccb6c2a76$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
449
|
+
constructor(page){
|
|
450
|
+
super(page);
|
|
451
|
+
this.taskDrawer = new (0, $8e39246218b802fc$export$e946776eae644790)(page);
|
|
452
|
+
}
|
|
252
453
|
async openTriggers() {
|
|
253
454
|
await this.openSubPage("Triggers");
|
|
254
455
|
return new (0, $862f65268e488e83$export$fb932093f944abe4)(this.page);
|
|
@@ -261,13 +462,13 @@ class $6100b25ffc426db0$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
|
|
|
261
462
|
await this.page.locator(".modal .continue").click();
|
|
262
463
|
}
|
|
263
464
|
getPhase(phaseName) {
|
|
264
|
-
return new $
|
|
465
|
+
return new $43cbcdfccb6c2a76$var$Phase(this.page, phaseName);
|
|
265
466
|
}
|
|
266
467
|
async start() {
|
|
267
|
-
await this.page.
|
|
268
|
-
|
|
468
|
+
await this.page.getByTestId("start-btn").click();
|
|
469
|
+
await this.page.getByRole("button", {
|
|
470
|
+
name: "Start"
|
|
269
471
|
}).click();
|
|
270
|
-
await this.page.locator(".modal button.primary").click();
|
|
271
472
|
}
|
|
272
473
|
async waitForTaskCompleted(taskTitle) {
|
|
273
474
|
await (0, $hOLA6$expect)(this.page.locator(".task.completed").getByText(taskTitle, {
|
|
@@ -279,24 +480,33 @@ class $6100b25ffc426db0$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
|
|
|
279
480
|
exact: true
|
|
280
481
|
})).toBeVisible();
|
|
281
482
|
}
|
|
483
|
+
async waitForTaskSkipped(taskTitle) {
|
|
484
|
+
await (0, $hOLA6$expect)(this.page.locator(".task.skipped").getByText(taskTitle, {
|
|
485
|
+
exact: true
|
|
486
|
+
})).toBeVisible();
|
|
487
|
+
}
|
|
488
|
+
async waitForTaskAborted(taskTitle) {
|
|
489
|
+
await (0, $hOLA6$expect)(this.page.locator(".task.aborted").getByText(taskTitle, {
|
|
490
|
+
exact: true
|
|
491
|
+
})).toBeVisible();
|
|
492
|
+
}
|
|
282
493
|
async waitForStatusLine(statusLine) {
|
|
283
494
|
await (0, $hOLA6$expect)(this.page.locator(".task .status-line").getByText(statusLine, {
|
|
284
495
|
exact: true
|
|
285
496
|
})).toBeVisible();
|
|
286
497
|
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
return new (0, $aaf14e80ae835616$export$b66cc3708c7bd4a4)(this.page);
|
|
498
|
+
async waitForTaskStarted(taskTitle) {
|
|
499
|
+
await (0, $hOLA6$expect)(this.page.locator(".task.in_progress").getByTitle(taskTitle, {
|
|
500
|
+
exact: true
|
|
501
|
+
})).toBeVisible();
|
|
292
502
|
}
|
|
293
503
|
async openTaskDrawer(taskName) {
|
|
294
504
|
await this.page.locator(".task-header").getByText(taskName).click();
|
|
295
|
-
return
|
|
505
|
+
return this.taskDrawer;
|
|
296
506
|
}
|
|
297
507
|
async openVariables() {
|
|
298
508
|
await this.openReleaseMenu("Variables");
|
|
299
|
-
return new (0, $
|
|
509
|
+
return new (0, $f48771b486a3eb8f$export$a87f0ae8695e74be)(this.page);
|
|
300
510
|
}
|
|
301
511
|
async openReleaseMenu(menuItem) {
|
|
302
512
|
await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, {
|
|
@@ -308,8 +518,33 @@ class $6100b25ffc426db0$export$f43492e8ac3c566 extends (0, $9626bc9256ce31f7$exp
|
|
|
308
518
|
hasText: subpage
|
|
309
519
|
}).click();
|
|
310
520
|
}
|
|
521
|
+
async openTask(taskName) {
|
|
522
|
+
await this.page.getByTitle(taskName, {
|
|
523
|
+
exact: true
|
|
524
|
+
}).click();
|
|
525
|
+
}
|
|
526
|
+
async collapseAllTaskView() {
|
|
527
|
+
const icCollapseTreeview1 = this.page.locator("div.pull-left.expander.ng-scope i.xl-icon.arrow-down-icon");
|
|
528
|
+
for (const element of (await icCollapseTreeview1.all())){
|
|
529
|
+
const blnVal = await element.isVisible();
|
|
530
|
+
if (blnVal) {
|
|
531
|
+
await element.click();
|
|
532
|
+
await this.collapseAllTaskView();
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
async expandAllTaskView() {
|
|
537
|
+
const icExpandTreeview1 = this.page.locator("div.pull-left.expander.ng-scope i.xl-icon.arrow-right-icon");
|
|
538
|
+
for (const element of (await icExpandTreeview1.all())){
|
|
539
|
+
const blnVal = await element.isVisible();
|
|
540
|
+
if (blnVal) {
|
|
541
|
+
await element.click();
|
|
542
|
+
await this.expandAllTaskView();
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
}
|
|
311
546
|
}
|
|
312
|
-
class $
|
|
547
|
+
class $43cbcdfccb6c2a76$var$Phase extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
313
548
|
constructor(page, phaseName){
|
|
314
549
|
super(page);
|
|
315
550
|
this.phaseLocator = page.locator(".phase", {
|
|
@@ -385,185 +620,278 @@ class $6720a523bcb1cce0$export$3cac5fd37ae64b91 extends (0, $9626bc9256ce31f7$ex
|
|
|
385
620
|
}
|
|
386
621
|
|
|
387
622
|
|
|
388
|
-
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
class $21185a378c23589e$export$e2e2e1ffdce20c30 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
389
627
|
constructor(page){
|
|
390
|
-
|
|
628
|
+
super(page);
|
|
629
|
+
this.userName = page.locator("#username");
|
|
630
|
+
this.name = page.locator("#full-name");
|
|
631
|
+
this.email = page.locator("#email");
|
|
632
|
+
this.password = page.locator('[data-test="password-input"]');
|
|
633
|
+
this.cnfPassword = page.locator("#passwordConfirmation");
|
|
634
|
+
this.saveButton = page.getByRole("button", {
|
|
635
|
+
name: "Save"
|
|
636
|
+
});
|
|
637
|
+
this.cancelButton = page.getByRole("button", {
|
|
638
|
+
name: "Cancel"
|
|
639
|
+
});
|
|
640
|
+
this.deleteButton = page.getByRole("button", {
|
|
641
|
+
name: "Delete"
|
|
642
|
+
});
|
|
391
643
|
}
|
|
392
|
-
async
|
|
393
|
-
return this.
|
|
644
|
+
async setUserName(username) {
|
|
645
|
+
return await this.userName.fill(username);
|
|
394
646
|
}
|
|
395
|
-
async
|
|
396
|
-
return this.
|
|
647
|
+
async setFullName(fullName) {
|
|
648
|
+
return await this.name.fill(fullName);
|
|
397
649
|
}
|
|
398
|
-
async
|
|
399
|
-
return
|
|
650
|
+
async setEmail(email) {
|
|
651
|
+
return await this.email.fill(email);
|
|
400
652
|
}
|
|
401
|
-
async
|
|
402
|
-
return
|
|
653
|
+
async setPassword(password) {
|
|
654
|
+
return await this.password.fill(password);
|
|
403
655
|
}
|
|
404
|
-
async
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
656
|
+
async setConfirmPassword(cnfPassword) {
|
|
657
|
+
return await this.cnfPassword.fill(cnfPassword);
|
|
658
|
+
}
|
|
659
|
+
async save() {
|
|
660
|
+
await this.saveButton.click();
|
|
661
|
+
}
|
|
662
|
+
async cancel() {
|
|
663
|
+
await this.cancelButton.click();
|
|
664
|
+
}
|
|
665
|
+
async delete() {
|
|
666
|
+
await this.deleteButton.click();
|
|
409
667
|
}
|
|
410
668
|
}
|
|
411
669
|
|
|
412
670
|
|
|
671
|
+
class $2cb6a6ac6b17e85f$export$107317390f5aa598 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
672
|
+
constructor(page){
|
|
673
|
+
super(page);
|
|
674
|
+
this.page = page;
|
|
675
|
+
this.newUserButton = this.page.getByTestId("new-user-btn");
|
|
676
|
+
this.modal = new (0, $21185a378c23589e$export$e2e2e1ffdce20c30)(page);
|
|
677
|
+
}
|
|
678
|
+
async openUsersPage() {
|
|
679
|
+
this.page.goto("/#/users", {
|
|
680
|
+
timeout: 1000
|
|
681
|
+
});
|
|
682
|
+
}
|
|
683
|
+
async toggleLoginPermission(username) {
|
|
684
|
+
await this.page.getByRole("row", {
|
|
685
|
+
name: "" + username + ""
|
|
686
|
+
}).getByRole("checkbox").check();
|
|
687
|
+
//await this.page.locator(`tr:contains('${username}') .login-permission input`).click();
|
|
688
|
+
}
|
|
689
|
+
async addUser() {
|
|
690
|
+
await this.newUserButton.click();
|
|
691
|
+
}
|
|
692
|
+
async createUser(username, password) {
|
|
693
|
+
await this.modal.setUserName(username);
|
|
694
|
+
await this.modal.setFullName(username);
|
|
695
|
+
await this.modal.setEmail("testuser@company.com");
|
|
696
|
+
await this.modal.setPassword(password);
|
|
697
|
+
await this.modal.setConfirmPassword(password);
|
|
698
|
+
await this.modal.save();
|
|
699
|
+
}
|
|
700
|
+
async expectToHaveLoginPermission(username) {
|
|
701
|
+
return await (0, $hOLA6$expect)(this.page.getByRole("row", {
|
|
702
|
+
name: "" + username + ""
|
|
703
|
+
}).getByRole("checkbox")).toBeChecked();
|
|
704
|
+
}
|
|
705
|
+
async deleteUser(username) {
|
|
706
|
+
await this.page.getByRole("row", {
|
|
707
|
+
name: "" + username + ""
|
|
708
|
+
}).locator("i").nth(1).click();
|
|
709
|
+
await this.modal.delete();
|
|
710
|
+
}
|
|
711
|
+
}
|
|
413
712
|
|
|
414
713
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
714
|
+
|
|
715
|
+
class $f1bf370bb7f683ca$export$1d7840d5cdc861d5 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
716
|
+
constructor(page){
|
|
717
|
+
super(page);
|
|
718
|
+
this.settingsIcon = this.page.getByRole("button", {
|
|
719
|
+
name: "Settings"
|
|
720
|
+
});
|
|
721
|
+
this.usersAndPermissionMenu = this.page.getByTestId("undefined-menu").getByText("Users and permissions");
|
|
722
|
+
this.managePluginMenu = this.page.getByText("Manage plugins");
|
|
423
723
|
}
|
|
424
|
-
async
|
|
425
|
-
await this.
|
|
426
|
-
await this.page.getByText("
|
|
724
|
+
async openUsersAndPermissions() {
|
|
725
|
+
await this.settingsIcon.click();
|
|
726
|
+
await this.page.getByTestId("undefined-menu").getByText("Users and permissions").click();
|
|
727
|
+
}
|
|
728
|
+
async openManagePlugin() {
|
|
729
|
+
await this.settingsIcon.click();
|
|
730
|
+
await this.managePluginMenu.click();
|
|
427
731
|
}
|
|
428
732
|
}
|
|
429
733
|
|
|
430
734
|
|
|
431
735
|
|
|
736
|
+
class $9ca6e63d357957dd$export$922081b54f2ab994 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
737
|
+
constructor(page){
|
|
738
|
+
super(page);
|
|
739
|
+
}
|
|
740
|
+
}
|
|
432
741
|
|
|
433
742
|
|
|
434
743
|
|
|
435
744
|
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
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
|
|
745
|
+
class $3a340a3f4fd8f04d$export$43682cddead1dd78 extends (0, $9626bc9256ce31f7$export$2b65d1d97338f32b) {
|
|
746
|
+
async openReleaseCalendarPage() {
|
|
747
|
+
await this.page.goto("./#/calendar");
|
|
748
|
+
await (0, $hOLA6$expect)(this.page).toHaveTitle("Release calendar / Home - Digital.ai Release");
|
|
749
|
+
//Define date format to verify different calendar views
|
|
750
|
+
const today = new Date();
|
|
751
|
+
let options = {
|
|
752
|
+
weekday: "long",
|
|
753
|
+
year: "numeric",
|
|
754
|
+
month: "short",
|
|
755
|
+
day: "numeric"
|
|
509
756
|
};
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
757
|
+
this.dayFormat = today.toLocaleDateString("en-US", options); // Saturday, September 17, 2016
|
|
758
|
+
this.yearFormat = today.getFullYear();
|
|
759
|
+
this.yearFormatString = this.yearFormat.toString();
|
|
760
|
+
options = {
|
|
761
|
+
month: "long",
|
|
762
|
+
year: "numeric"
|
|
516
763
|
};
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
});
|
|
520
|
-
return dashboardExtension;
|
|
521
|
-
};
|
|
522
|
-
function getTileEntity(tile, containerId, index) {
|
|
523
|
-
tile.id = tile.id || `${containerId}/Tile${index}`;
|
|
524
|
-
return tile;
|
|
764
|
+
this.monthFormat = today.toLocaleDateString("en-US", options);
|
|
765
|
+
return this;
|
|
525
766
|
}
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
(
|
|
542
|
-
|
|
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;
|
|
767
|
+
async exportCalendar() {
|
|
768
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
769
|
+
this.page.on("download", ()=>{});
|
|
770
|
+
await this.page.getByRole("button", {
|
|
771
|
+
name: "download icon Export calendar"
|
|
772
|
+
}).click();
|
|
773
|
+
const downloadPromise = this.page.waitForEvent("download");
|
|
774
|
+
await this.page.getByRole("button", {
|
|
775
|
+
name: "Export"
|
|
776
|
+
}).click();
|
|
777
|
+
await downloadPromise;
|
|
778
|
+
}
|
|
779
|
+
async cancelCalendarExport() {
|
|
780
|
+
let downloadCount = 0;
|
|
781
|
+
// Listen to download events
|
|
782
|
+
this.page.on("download", (_download)=>{
|
|
783
|
+
downloadCount++;
|
|
558
784
|
});
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
}
|
|
785
|
+
await this.page.getByRole("button", {
|
|
786
|
+
name: "download icon Export calendar"
|
|
787
|
+
}).click();
|
|
788
|
+
await this.page.getByRole("button", {
|
|
789
|
+
name: "Cancel"
|
|
790
|
+
}).click();
|
|
791
|
+
return downloadCount;
|
|
792
|
+
}
|
|
793
|
+
async verifyDayView() {
|
|
794
|
+
await this.page.getByRole("combobox").click();
|
|
795
|
+
await this.page.getByRole("option", {
|
|
796
|
+
name: "Day"
|
|
797
|
+
}).click();
|
|
798
|
+
await this.page.getByRole("button", {
|
|
799
|
+
name: "Today"
|
|
800
|
+
}).click();
|
|
801
|
+
//Verify Page has correct day format displayed at the page bottom
|
|
802
|
+
await (0, $hOLA6$expect)(this.page.getByText(this.dayFormat)).toBeVisible();
|
|
803
|
+
}
|
|
804
|
+
async verifyYearView() {
|
|
805
|
+
await this.page.getByRole("combobox").click();
|
|
806
|
+
await this.page.getByRole("option", {
|
|
807
|
+
name: "Year"
|
|
808
|
+
}).click();
|
|
809
|
+
await this.page.getByRole("button", {
|
|
810
|
+
name: "Today"
|
|
811
|
+
}).click();
|
|
812
|
+
//Verify Page has correct Year format displayed at the page bottom
|
|
813
|
+
await (0, $hOLA6$expect)(this.page.getByText(this.yearFormatString)).toBeVisible();
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
|
|
818
|
+
class $e72552cbf941ecfa$export$b8a61e5c71402559 {
|
|
819
|
+
constructor(page){
|
|
820
|
+
this.page = page;
|
|
821
|
+
this.releasePage = new (0, $43cbcdfccb6c2a76$export$f43492e8ac3c566)(page);
|
|
822
|
+
this.settingsMenu = new (0, $f1bf370bb7f683ca$export$1d7840d5cdc861d5)(page);
|
|
823
|
+
this.usersPage = new (0, $2cb6a6ac6b17e85f$export$107317390f5aa598)(page);
|
|
824
|
+
this.applicationPage = new (0, $c313b10398604df2$export$1533b625ec0c75e2)(page);
|
|
825
|
+
this.taskDetailsPage = new (0, $9ca6e63d357957dd$export$922081b54f2ab994)(page);
|
|
826
|
+
this.releaseCalendarPage = new (0, $3a340a3f4fd8f04d$export$43682cddead1dd78)(page);
|
|
827
|
+
}
|
|
828
|
+
async openTemplate(id) {
|
|
829
|
+
return this.openReleaseOrTemplate(id, false);
|
|
830
|
+
}
|
|
831
|
+
async openRelease(id) {
|
|
832
|
+
return this.openReleaseOrTemplate(id, true);
|
|
833
|
+
}
|
|
834
|
+
async openApplicationsPage() {
|
|
835
|
+
return new (0, $c313b10398604df2$export$1533b625ec0c75e2)(this.page).goToApplicationsPage();
|
|
836
|
+
}
|
|
837
|
+
async openPersonalAccessTokenPage() {
|
|
838
|
+
return new (0, $6720a523bcb1cce0$export$3cac5fd37ae64b91)(this.page).openPersonalAccessTokenPage();
|
|
839
|
+
}
|
|
840
|
+
async gotoFolderPage() {
|
|
841
|
+
await this.page.getByText("Folders").click();
|
|
842
|
+
}
|
|
843
|
+
async gotoTaskPage() {
|
|
844
|
+
await this.page.getByTestId("sideNav-item-3").getByText("Tasks").click();
|
|
845
|
+
}
|
|
846
|
+
async gotoReleasePage() {
|
|
847
|
+
await this.page.getByText("Releases").click();
|
|
848
|
+
}
|
|
849
|
+
async gotoWorkflowCatalogPage() {
|
|
850
|
+
await this.page.getByText("Workflow catalog").click();
|
|
851
|
+
}
|
|
852
|
+
async gotoWorkflowsPage() {
|
|
853
|
+
await this.page.getByTestId("sideNav-item-6").getByText("Workflows").click();
|
|
854
|
+
}
|
|
855
|
+
async gotoGroupsPage() {
|
|
856
|
+
await this.page.getByText("Groups").click();
|
|
857
|
+
}
|
|
858
|
+
async gotoReleaseCalenderPage() {
|
|
859
|
+
await this.page.getByText("Release calendar").click();
|
|
860
|
+
}
|
|
861
|
+
async gotoDeliveriesPage() {
|
|
862
|
+
await this.page.getByText("Deliveries").click();
|
|
863
|
+
}
|
|
864
|
+
async gotoTriggersPage() {
|
|
865
|
+
await this.page.getByText("Triggers").click();
|
|
866
|
+
}
|
|
867
|
+
async gotoDigitalAnalyticsPage() {
|
|
868
|
+
await this.page.getByText("Digital.ai Analytics").click();
|
|
869
|
+
}
|
|
870
|
+
async gotoReportsPage() {
|
|
871
|
+
await this.page.getByText("Reports").click();
|
|
872
|
+
}
|
|
873
|
+
async gotoTemplatesPage() {
|
|
874
|
+
await this.page.getByText("Templates").click();
|
|
875
|
+
}
|
|
876
|
+
async gotoEnvironmentsPage() {
|
|
877
|
+
await this.page.getByText("Environments").click();
|
|
878
|
+
}
|
|
879
|
+
async gotoEnvironmentsCalenderPage() {
|
|
880
|
+
await this.page.getByText("Environments calendar").click();
|
|
881
|
+
}
|
|
882
|
+
async gotoGobalVariablesPage() {
|
|
883
|
+
await this.page.getByText("Global variables").click();
|
|
884
|
+
}
|
|
885
|
+
async gotoConnectionsPage() {
|
|
886
|
+
await this.page.getByText("Connections").click();
|
|
887
|
+
}
|
|
888
|
+
async openReleaseOrTemplate(id, release) {
|
|
889
|
+
const url = release ? "releases" : "templates";
|
|
890
|
+
await this.page.goto(`./#/${url}/${id}`);
|
|
891
|
+
await this.page.waitForSelector("#release");
|
|
892
|
+
return new (0, $43cbcdfccb6c2a76$export$f43492e8ac3c566)(this.page);
|
|
893
|
+
}
|
|
894
|
+
}
|
|
567
895
|
|
|
568
896
|
|
|
569
897
|
|
|
@@ -579,7 +907,7 @@ const $80c3ae34677b4324$export$e0969da9b8fb378d = (0, $hOLA6$test).extend({
|
|
|
579
907
|
return fixtures;
|
|
580
908
|
},
|
|
581
909
|
loginPage: async ({ page: page }, use)=>{
|
|
582
|
-
const loginPage = new (0, $
|
|
910
|
+
const loginPage = new (0, $4444bee76761dfb1$export$f14c0e3f98d164c0)(page);
|
|
583
911
|
await use(loginPage);
|
|
584
912
|
return loginPage;
|
|
585
913
|
},
|
|
@@ -593,11 +921,13 @@ class $80c3ae34677b4324$var$Fixtures {
|
|
|
593
921
|
releaseIds = [];
|
|
594
922
|
triggerIds = [];
|
|
595
923
|
configurationIds = [];
|
|
924
|
+
usernames = [];
|
|
925
|
+
userProfiles = [];
|
|
596
926
|
constructor(request, page){
|
|
597
927
|
this.request = request;
|
|
598
928
|
this.page = page;
|
|
599
929
|
}
|
|
600
|
-
release(release) {
|
|
930
|
+
async release(release) {
|
|
601
931
|
this.initDefaults(release);
|
|
602
932
|
this.releaseIds.push(release.id);
|
|
603
933
|
return this.deleteRelease(release.id).then(()=>this.deleteArchivedRelease(release.id)).then(()=>this.doPost("fixtures/release", release));
|
|
@@ -638,9 +968,13 @@ class $80c3ae34677b4324$var$Fixtures {
|
|
|
638
968
|
for (const releaseId of this.releaseIds.reverse())promises.push(this.deleteRelease(releaseId));
|
|
639
969
|
for (const triggerId of this.triggerIds)promises.push(this.deleteTrigger(triggerId));
|
|
640
970
|
for (const confId of this.configurationIds)promises.push(this.deleteConfiguration(confId));
|
|
971
|
+
for (const usernames of this.usernames)promises.push(this.deleteUser(usernames));
|
|
972
|
+
for (const userProfiles of this.userProfiles)promises.push(this.deleteUserProfile(userProfiles));
|
|
641
973
|
this.releaseIds = [];
|
|
642
974
|
this.triggerIds = [];
|
|
643
975
|
this.configurationIds = [];
|
|
976
|
+
this.usernames = [];
|
|
977
|
+
this.userProfiles = [];
|
|
644
978
|
return Promise.all(promises);
|
|
645
979
|
}
|
|
646
980
|
async waitForReleaseStarted(releaseTitle) {
|
|
@@ -690,6 +1024,27 @@ class $80c3ae34677b4324$var$Fixtures {
|
|
|
690
1024
|
}
|
|
691
1025
|
]);
|
|
692
1026
|
}
|
|
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
|
+
}
|
|
693
1048
|
doPost(url, body) {
|
|
694
1049
|
return this.request.post(url, {
|
|
695
1050
|
data: body,
|