@digital-ai/devops-page-object-release 0.0.1 → 0.0.2
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 +6 -0
- package/package.json +3 -3
- package/.eslintignore +0 -5
- package/.eslintrc.js +0 -7
- package/.turbo/turbo-build.log +0 -12
- package/.turbo/turbo-lint.log +0 -11
- package/.turbo/turbo-tsc.log +0 -4
- package/fixtures/helper.ts +0 -168
- package/fixtures/index.ts +0 -191
- package/index.ts +0 -1
- package/pages/ApplicationsPage.ts +0 -32
- package/pages/EnvironmentsPage.ts +0 -25
- package/pages/FolderPage.ts +0 -58
- package/pages/LoginPage.ts +0 -18
- package/pages/PersonalAccessTokenPage.ts +0 -20
- package/pages/ReleasePage.ts +0 -74
- package/pages/ReleaseVariablesPage.ts +0 -19
- package/pages/ReleasesListPage.ts +0 -18
- package/pages/TriggersPage.ts +0 -18
- package/pages/WithPage.ts +0 -9
- package/pages/index.ts +0 -25
- package/pages/task-modal/CustomScriptTaskModal.ts +0 -45
- package/pages/task-modal/TaskModal.ts +0 -19
- package/tsconfig.json +0 -32
- package/types/index.ts +0 -141
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digital-ai/devops-page-object-release",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"source": "index.ts",
|
|
5
5
|
"main": "dist/main.js",
|
|
6
6
|
"module": "dist/module.js",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"@types/lodash": "4.14.192",
|
|
22
22
|
"parcel": "2.8.3",
|
|
23
23
|
"typescript": "4.5.3",
|
|
24
|
-
"
|
|
25
|
-
"
|
|
24
|
+
"tsconfig": "0.0.0",
|
|
25
|
+
"eslint-config-custom": "0.0.0"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@playwright/test": "^1.32.3"
|
package/.eslintignore
DELETED
package/.eslintrc.js
DELETED
package/.turbo/turbo-build.log
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> @digital-ai/devops-page-object-release@0.0.1 build /home/runner/work/devops-page-objects/devops-page-objects/apps/release
|
|
3
|
-
> parcel build --cache-dir .parcel-cache --dist-dir .dist
|
|
4
|
-
|
|
5
|
-
Building...
|
|
6
|
-
Bundling...
|
|
7
|
-
Packaging & Optimizing...
|
|
8
|
-
✨ Built in 5.21s
|
|
9
|
-
|
|
10
|
-
dist/main.js 81.08 KB 110ms
|
|
11
|
-
dist/module.js 22.55 KB 110ms
|
|
12
|
-
dist/types.d.ts 7.42 KB 96ms
|
package/.turbo/turbo-lint.log
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> @digital-ai/devops-page-object-release@0.0.1 lint /home/runner/work/devops-page-objects/devops-page-objects/apps/release
|
|
3
|
-
> eslint . --ext .js,.jsx,.ts,.tsx
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/home/runner/work/devops-page-objects/devops-page-objects/apps/release/types/index.ts
|
|
7
|
-
34:18 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
8
|
-
41:10 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
|
|
9
|
-
|
|
10
|
-
✖ 2 problems (0 errors, 2 warnings)
|
|
11
|
-
|
package/.turbo/turbo-tsc.log
DELETED
package/fixtures/helper.ts
DELETED
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
import isUndefined from 'lodash/isUndefined';
|
|
2
|
-
import each from 'lodash/each';
|
|
3
|
-
import forEach from 'lodash/forEach';
|
|
4
|
-
import defaults from 'lodash/defaults';
|
|
5
|
-
import toPairs from 'lodash/toPairs';
|
|
6
|
-
|
|
7
|
-
import { Container, Dashboard, Phase, Release, Task, Tile, Variable, VariableValueProvider } from '../types';
|
|
8
|
-
|
|
9
|
-
export const initReleaseDefaults = (function () {
|
|
10
|
-
const RELEASE_TYPE = 'xlrelease.Release';
|
|
11
|
-
const PHASE_TYPE = 'xlrelease.Phase';
|
|
12
|
-
const TEAM_TYPE = 'xlrelease.Team';
|
|
13
|
-
const TASK_TYPE = 'xlrelease.Task';
|
|
14
|
-
const COMMENT_TYPE = 'xlrelease.Comment';
|
|
15
|
-
const CONDITION_TYPE = 'xlrelease.GateCondition';
|
|
16
|
-
const DEPENDENCY_TYPE = 'xlrelease.Dependency';
|
|
17
|
-
const LINK_TYPE = 'xlrelease.Link';
|
|
18
|
-
const ATTACHMENT_TYPE = 'xlrelease.Attachment';
|
|
19
|
-
const DASHBOARD_TYPE = 'xlrelease.Dashboard';
|
|
20
|
-
const _TRIGGER_TYPE = 'xlrelease.ReleaseTrigger';
|
|
21
|
-
const JIRA_TYPE = 'jira.CreateIssue';
|
|
22
|
-
const DEFAULT_TASK_OWNER = 'Itchy';
|
|
23
|
-
|
|
24
|
-
const processTasks = (task: Task, container: Container, index: number): void => {
|
|
25
|
-
if (isUndefined(task.type)) task.type = TASK_TYPE;
|
|
26
|
-
task.id = task.id || `${container.id}/Task${index}`;
|
|
27
|
-
if (isUndefined(task.owner) && task.type !== JIRA_TYPE) task.owner = DEFAULT_TASK_OWNER;
|
|
28
|
-
if (task.owner === null) delete task.owner;
|
|
29
|
-
|
|
30
|
-
each(task.conditions, function (condition, idx) {
|
|
31
|
-
condition.type = CONDITION_TYPE;
|
|
32
|
-
condition.id = `${task.id}/GateCondition${idx}`;
|
|
33
|
-
});
|
|
34
|
-
each(task.dependencies, function (dependency, idx) {
|
|
35
|
-
dependency.type = DEPENDENCY_TYPE;
|
|
36
|
-
dependency.id = `${task.id}/Dependency${idx}`;
|
|
37
|
-
});
|
|
38
|
-
each(task.links, function (link, idx) {
|
|
39
|
-
link.type = LINK_TYPE;
|
|
40
|
-
link.id = `${task.id}/Link${idx}`;
|
|
41
|
-
});
|
|
42
|
-
each(task.comments, function (comment, idx) {
|
|
43
|
-
comment.type = COMMENT_TYPE;
|
|
44
|
-
comment.id = `${task.id}/Comment${idx}`;
|
|
45
|
-
});
|
|
46
|
-
each(task.tasks, function (subTask, idx) {
|
|
47
|
-
processTasks(subTask, task, idx);
|
|
48
|
-
});
|
|
49
|
-
each(task.templateVariables, function (variable, idx) {
|
|
50
|
-
defaults(variable, getVariableEntity(variable.value, variable.key, task.id, idx));
|
|
51
|
-
});
|
|
52
|
-
each(task.attachments, function (attachment, idx) {
|
|
53
|
-
attachment.type = ATTACHMENT_TYPE;
|
|
54
|
-
attachment.id = `${task.id}/Attachment${idx}`;
|
|
55
|
-
});
|
|
56
|
-
if (task.pythonScript) {
|
|
57
|
-
const pythonScript = task.pythonScript;
|
|
58
|
-
pythonScript.id = `${task.id}/PythonScript`;
|
|
59
|
-
pythonScript.customScriptTask = task.id;
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
const processPhases = (phase: Phase, release: Release, index: number): void => {
|
|
64
|
-
phase.type = PHASE_TYPE;
|
|
65
|
-
phase.id = `${release.id}/Phase${index}`;
|
|
66
|
-
|
|
67
|
-
forEach(phase.tasks, (task, idx): void => {
|
|
68
|
-
processTasks(task, phase, idx);
|
|
69
|
-
});
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
const getVariableEntity = (
|
|
73
|
-
value: string,
|
|
74
|
-
key: string,
|
|
75
|
-
containerId: string,
|
|
76
|
-
index: number,
|
|
77
|
-
password?: boolean,
|
|
78
|
-
// eslint-disable-next-line max-params
|
|
79
|
-
): Variable => {
|
|
80
|
-
const keyNoSyntax = key.replace('${', '').replace('}', '');
|
|
81
|
-
return {
|
|
82
|
-
title: '',
|
|
83
|
-
id: `${containerId}/Variable${index}`,
|
|
84
|
-
key: keyNoSyntax,
|
|
85
|
-
requiresValue: true,
|
|
86
|
-
showOnReleaseStart: true,
|
|
87
|
-
type: password ? 'xlrelease.PasswordStringVariable' : 'xlrelease.StringVariable',
|
|
88
|
-
value: value,
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
const getValueProviderConfigurationEntity = function (containerId: string): VariableValueProvider {
|
|
93
|
-
return {
|
|
94
|
-
id: `${containerId}/valueProvider`,
|
|
95
|
-
variable: containerId,
|
|
96
|
-
};
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
const getDashboardExtension = (dashboard: Dashboard, releaseId: string): Dashboard => {
|
|
100
|
-
const dashboardExtension: Dashboard = {
|
|
101
|
-
id: `${releaseId}/summary`,
|
|
102
|
-
type: DASHBOARD_TYPE,
|
|
103
|
-
tiles: [],
|
|
104
|
-
};
|
|
105
|
-
if (dashboard.tiles) {
|
|
106
|
-
forEach(dashboard.tiles, function (tile, index) {
|
|
107
|
-
dashboardExtension.tiles.push(getTileEntity(tile, `${releaseId}/summary`, index));
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
return dashboardExtension;
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
function getTileEntity(tile: Tile, containerId: string, index: number): Tile {
|
|
114
|
-
tile.id = tile.id || `${containerId}/Tile${index}`;
|
|
115
|
-
return tile;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
return function (release: Release) {
|
|
119
|
-
release.type = RELEASE_TYPE;
|
|
120
|
-
if (release.id.indexOf('Applications/') === -1) {
|
|
121
|
-
release.id = `Applications/${release.id}`;
|
|
122
|
-
}
|
|
123
|
-
if (release.startDate) {
|
|
124
|
-
release.queryableStartDate = release.startDate;
|
|
125
|
-
} else if (release.scheduledStartDate) {
|
|
126
|
-
release.queryableStartDate = release.scheduledStartDate;
|
|
127
|
-
}
|
|
128
|
-
if (release.endDate) {
|
|
129
|
-
release.queryableEndDate = release.endDate;
|
|
130
|
-
} else if (release.dueDate) {
|
|
131
|
-
release.queryableEndDate = release.dueDate;
|
|
132
|
-
}
|
|
133
|
-
if (isUndefined(release.owner)) release.owner = 'Itchy'; // default release manager
|
|
134
|
-
|
|
135
|
-
forEach(release.phases, function (phase, index) {
|
|
136
|
-
processPhases(phase, release, index);
|
|
137
|
-
});
|
|
138
|
-
forEach(release.teams, function (team, index) {
|
|
139
|
-
team.type = TEAM_TYPE;
|
|
140
|
-
team.id = `${release.id}/Team${index}`;
|
|
141
|
-
});
|
|
142
|
-
forEach(release.attachments, function (attachment, index) {
|
|
143
|
-
attachment.type = ATTACHMENT_TYPE;
|
|
144
|
-
attachment.id = `${release.id}/Attachment${index}`;
|
|
145
|
-
});
|
|
146
|
-
forEach(release.variables, function (variable: Variable, index) {
|
|
147
|
-
defaults(variable, getVariableEntity(variable.value, variable.key, release.id, index));
|
|
148
|
-
if (variable.valueProvider) {
|
|
149
|
-
defaults(variable.valueProvider, getValueProviderConfigurationEntity(variable.id));
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
forEach(toPairs(release.variableValues), function (keyValue, index) {
|
|
153
|
-
if (!release.variables) release.variables = [];
|
|
154
|
-
release.variables.push(getVariableEntity(keyValue[1], keyValue[0], release.id, 1000 + index));
|
|
155
|
-
release.variableValues = undefined;
|
|
156
|
-
});
|
|
157
|
-
forEach(toPairs(release.passwordVariableValues), function (keyValue, index) {
|
|
158
|
-
if (!release.variables) release.variables = [];
|
|
159
|
-
release.variables.push(getVariableEntity(keyValue[1], keyValue[0], release.id, 1500 + index, true));
|
|
160
|
-
release.passwordVariableValues = undefined;
|
|
161
|
-
});
|
|
162
|
-
|
|
163
|
-
if (release.summary) {
|
|
164
|
-
release.extensions = [getDashboardExtension(release.summary, release.id)];
|
|
165
|
-
release.summary = undefined;
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
})();
|
package/fixtures/index.ts
DELETED
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
import { test as base, expect, Page, APIResponse } from '@playwright/test';
|
|
2
|
-
import { execFile } from 'child_process';
|
|
3
|
-
import { APIRequestContext } from 'playwright-core';
|
|
4
|
-
import isNil from 'lodash/isNil';
|
|
5
|
-
import { Navigation } from '../pages';
|
|
6
|
-
import { LoginPage } from '../pages/LoginPage';
|
|
7
|
-
import { ApplicationsPage } from '../pages/ApplicationsPage';
|
|
8
|
-
import { PersonalAccessTokenPage } from '../pages/PersonalAccessTokenPage';
|
|
9
|
-
import { initReleaseDefaults } from './helper';
|
|
10
|
-
import * as process from 'process';
|
|
11
|
-
import { FixtureConfiguration, FixtureFeature, FixtureRelease, FixtureTrigger, Release } from '../types';
|
|
12
|
-
|
|
13
|
-
const adminHeaders = {
|
|
14
|
-
Authorization: 'Basic YWRtaW46YWRtaW4=',
|
|
15
|
-
Cookie: 'XSRF-TOKEN=1;',
|
|
16
|
-
'X-XSRF-TOKEN': '1',
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
type ReleaseFixtures = {
|
|
20
|
-
applicationPage: ApplicationsPage;
|
|
21
|
-
fixtures: Fixtures;
|
|
22
|
-
loginPage: LoginPage;
|
|
23
|
-
navigation: Navigation;
|
|
24
|
-
personalAccessTokenPage: PersonalAccessTokenPage;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export const test = base.extend<ReleaseFixtures>({
|
|
28
|
-
fixtures: async ({ request, page }, use) => {
|
|
29
|
-
const fixtures = new Fixtures(request, page);
|
|
30
|
-
await use(fixtures);
|
|
31
|
-
return fixtures;
|
|
32
|
-
},
|
|
33
|
-
loginPage: async ({ page }, use) => {
|
|
34
|
-
const loginPage = new LoginPage(page);
|
|
35
|
-
await use(loginPage);
|
|
36
|
-
return loginPage;
|
|
37
|
-
},
|
|
38
|
-
applicationPage: async ({ page }, use) => {
|
|
39
|
-
const applicationPage = new ApplicationsPage(page);
|
|
40
|
-
await use(applicationPage);
|
|
41
|
-
return applicationPage;
|
|
42
|
-
},
|
|
43
|
-
personalAccessTokenPage: async ({ page }, use) => {
|
|
44
|
-
const personalAccessTokenPage = new PersonalAccessTokenPage(page);
|
|
45
|
-
await use(personalAccessTokenPage);
|
|
46
|
-
return personalAccessTokenPage;
|
|
47
|
-
},
|
|
48
|
-
navigation: async ({ page }, use) => {
|
|
49
|
-
const navigationPage = new Navigation(page);
|
|
50
|
-
await use(navigationPage);
|
|
51
|
-
return navigationPage;
|
|
52
|
-
},
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
class Fixtures {
|
|
56
|
-
private readonly request: APIRequestContext;
|
|
57
|
-
private readonly page: Page;
|
|
58
|
-
|
|
59
|
-
private releaseIds: Array<string> = [];
|
|
60
|
-
private triggerIds: Array<string> = [];
|
|
61
|
-
private configurationIds: Array<string> = [];
|
|
62
|
-
|
|
63
|
-
constructor(request: APIRequestContext, page: Page) {
|
|
64
|
-
this.request = request;
|
|
65
|
-
this.page = page;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
release(release: FixtureRelease): Promise<APIResponse> {
|
|
69
|
-
this.initDefaults(release);
|
|
70
|
-
this.releaseIds.push(release.id);
|
|
71
|
-
return this.deleteRelease(release.id)
|
|
72
|
-
.then(() => this.deleteArchivedRelease(release.id))
|
|
73
|
-
.then(() => this.doPost('fixtures/release', release));
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
configuration(ci: FixtureConfiguration): Promise<APIResponse> {
|
|
77
|
-
this.configurationIds.push(ci.id);
|
|
78
|
-
return this.doPost('fixtures/shared', [ci]);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
trigger(trigger: FixtureTrigger): Promise<APIResponse> {
|
|
82
|
-
this.triggerIds.push(trigger.id);
|
|
83
|
-
return this.doPost('fixtures/trigger', trigger);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
deleteArchivedRelease(id: string): Promise<APIResponse> {
|
|
87
|
-
const releaseId = id.includes('Applications/') ? id : `Applications/${id}`;
|
|
88
|
-
return this.doDelete('fixtures/cis', [
|
|
89
|
-
{
|
|
90
|
-
id: releaseId,
|
|
91
|
-
type: 'xlrelease.Release',
|
|
92
|
-
},
|
|
93
|
-
]);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
deleteRelease(id: string): Promise<APIResponse> {
|
|
97
|
-
const releaseId = id.includes('Applications/') ? id : `Applications/${id}`;
|
|
98
|
-
return this.doDelete(`fixtures/${releaseId}`);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
deleteTrigger(id: string): Promise<APIResponse> {
|
|
102
|
-
return this.doDelete(`fixtures/trigger/${id}`);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
deleteConfiguration(id: string): Promise<APIResponse> {
|
|
106
|
-
return this.doDelete(`fixtures/shared`, [id]);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
cleanAll(): Promise<Awaited<APIResponse>[]> {
|
|
110
|
-
const promises = [];
|
|
111
|
-
for (const releaseId of this.releaseIds.reverse()) {
|
|
112
|
-
promises.push(this.deleteRelease(releaseId));
|
|
113
|
-
}
|
|
114
|
-
for (const triggerId of this.triggerIds) {
|
|
115
|
-
promises.push(this.deleteTrigger(triggerId));
|
|
116
|
-
}
|
|
117
|
-
for (const confId of this.configurationIds) {
|
|
118
|
-
promises.push(this.deleteConfiguration(confId));
|
|
119
|
-
}
|
|
120
|
-
this.releaseIds = [];
|
|
121
|
-
this.triggerIds = [];
|
|
122
|
-
this.configurationIds = [];
|
|
123
|
-
return Promise.all(promises);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
async waitForReleaseStarted(releaseTitle: string): Promise<void> {
|
|
127
|
-
await expect(async () => {
|
|
128
|
-
const resp = await this.doPost('releases/search', {
|
|
129
|
-
inProgress: true,
|
|
130
|
-
paused: true,
|
|
131
|
-
failing: true,
|
|
132
|
-
failed: true,
|
|
133
|
-
title: releaseTitle,
|
|
134
|
-
});
|
|
135
|
-
const page = await resp.json();
|
|
136
|
-
await expect(page.cis.length).toBeGreaterThan(0);
|
|
137
|
-
}).toPass();
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
async waitForFirstPoll(triggerId: string): Promise<void> {
|
|
141
|
-
await expect(async () => {
|
|
142
|
-
const resp = await this.doGet(`api/v1/triggers/${triggerId}`);
|
|
143
|
-
const trigger = await resp.json();
|
|
144
|
-
await expect(isNil(trigger.triggerState)).toBe(false);
|
|
145
|
-
}).toPass();
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
exec(path: string): Promise<void> {
|
|
149
|
-
return new Promise<void>((resolve, reject) => {
|
|
150
|
-
execFile(path, (error) => {
|
|
151
|
-
if (error === null) {
|
|
152
|
-
return resolve();
|
|
153
|
-
} else {
|
|
154
|
-
return reject();
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
getFakeApiUrl(): string {
|
|
161
|
-
return this.getEnvVariable('ENV_FAKE_API') || 'http://localhost:5517';
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
getEnvVariable(name: string): string | undefined {
|
|
165
|
-
return process.env[name];
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
async setFeatures(features: Array<FixtureFeature>): Promise<APIResponse> {
|
|
169
|
-
return this.doPut('/settings/features', features);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
private doPost(url: string, body: unknown): Promise<APIResponse> {
|
|
173
|
-
return this.request.post(url, { data: body, headers: adminHeaders });
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
private doPut(url: string, body: unknown): Promise<APIResponse> {
|
|
177
|
-
return this.request.put(url, { data: body, headers: adminHeaders });
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
private doGet(url: string): Promise<APIResponse> {
|
|
181
|
-
return this.request.get(url, { headers: adminHeaders });
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
private doDelete(url: string, body?: unknown): Promise<APIResponse> {
|
|
185
|
-
return this.request.delete(url, { data: body, headers: adminHeaders });
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
private initDefaults(ci: FixtureRelease): void {
|
|
189
|
-
initReleaseDefaults(ci as Release);
|
|
190
|
-
}
|
|
191
|
-
}
|
package/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { test } from './fixtures';
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { expect } from '@playwright/test';
|
|
2
|
-
import { WithPage } from './WithPage';
|
|
3
|
-
|
|
4
|
-
export class ApplicationsPage extends WithPage {
|
|
5
|
-
async goToApplicationsPage(): Promise<this> {
|
|
6
|
-
await this.page.goto('./#/applications');
|
|
7
|
-
await expect(this.page).toHaveTitle('Applications - Digital.ai Release');
|
|
8
|
-
return this;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
async addNewApplication(applicationName: string): Promise<this> {
|
|
12
|
-
await this.page.locator(`//button[normalize-space()='New application']`).click();
|
|
13
|
-
await this.page.locator(`input[placeholder='Add name...']`).type(applicationName);
|
|
14
|
-
await this.page.locator(`//button[normalize-space()='Save']`).click();
|
|
15
|
-
return this;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
async verifyApplicationisCreated(applicationName: string): Promise<this> {
|
|
19
|
-
await this.page.waitForSelector(`div[title='${applicationName}'] strong`);
|
|
20
|
-
return this;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
async createApplicationAndLinkEnvironment(environmentName: string, applicationName: string): Promise<this> {
|
|
24
|
-
await this.page.locator(`//button[normalize-space()='New application']`).click();
|
|
25
|
-
await this.page.locator(`input[placeholder='Add name...']`).type(applicationName);
|
|
26
|
-
await this.page.locator("input[placeholder='Filter environment name...']").type(environmentName);
|
|
27
|
-
await this.page.locator(`div[title='${environmentName}']`).click();
|
|
28
|
-
await this.page.locator(`//button[normalize-space()='Save']`).click();
|
|
29
|
-
await this.page.locator('i.xl-icon.close-icon').click();
|
|
30
|
-
return this;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { expect } from '@playwright/test';
|
|
2
|
-
import { WithPage } from './WithPage';
|
|
3
|
-
|
|
4
|
-
export class EnvironmentsPage extends WithPage {
|
|
5
|
-
async goToEnvironmentsPage(): Promise<this> {
|
|
6
|
-
await this.page.goto('./#/environments');
|
|
7
|
-
await expect(this.page).toHaveTitle('Environments list / Environments - Digital.ai Release');
|
|
8
|
-
return this;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
async addNewEnvironment(environmentName: string, stageName: string): Promise<this> {
|
|
12
|
-
await this.page.locator(`//button[normalize-space()='New environment']`).click();
|
|
13
|
-
await this.page.locator(`input[placeholder='Add...']`).type(environmentName);
|
|
14
|
-
await this.page.locator(`input[placeholder='Select stage...']`).click();
|
|
15
|
-
await this.page.locator(`.yt-option[title='${stageName}']`).click();
|
|
16
|
-
await this.page.locator(`//button[normalize-space()='Create']`).click();
|
|
17
|
-
await this.page.locator('i.xl-icon.close-icon').click();
|
|
18
|
-
return this;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
async verifyEnvironmentIsCreated(environmentName: string): Promise<this> {
|
|
22
|
-
await this.page.waitForSelector(`div[title='${environmentName}'] strong`);
|
|
23
|
-
return this;
|
|
24
|
-
}
|
|
25
|
-
}
|
package/pages/FolderPage.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { expect } from '@playwright/test';
|
|
2
|
-
import { WithPage } from './WithPage';
|
|
3
|
-
|
|
4
|
-
export class FolderPage extends WithPage {
|
|
5
|
-
async openFoldersPage(): Promise<this> {
|
|
6
|
-
await this.page.goto('./#/folders');
|
|
7
|
-
await expect(this.page).toHaveTitle('Folders - Digital.ai Release');
|
|
8
|
-
return this;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
async backToAllFolders(): Promise<this> {
|
|
12
|
-
await this.page.locator('.icon-back.dot-i').click();
|
|
13
|
-
await expect(this.page).toHaveTitle('Folders - Digital.ai Release');
|
|
14
|
-
await this.page.locator('button.btn-add-folder').isVisible();
|
|
15
|
-
return this;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
async createFolder(folderName: string): Promise<this> {
|
|
19
|
-
await this.page.locator('button.btn-add-folder').click();
|
|
20
|
-
await this.page.locator('div.xl-react-component-input-wrapper').type(folderName);
|
|
21
|
-
await this.page.locator('button.xl-react-button.button.primary').click();
|
|
22
|
-
await this.page.locator(`//button[normalize-space()='Add release']`).isVisible();
|
|
23
|
-
return this;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
async openFolder(folderName: string): Promise<this> {
|
|
27
|
-
await this.page.locator(`.folder-row-wrapper span:text-is('${folderName}')`).click();
|
|
28
|
-
return this;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
async openGroups(): Promise<this> {
|
|
32
|
-
//await this.page.locator(`//p[normalize-space()='${tabName}']`).click()
|
|
33
|
-
await this.page.getByTestId('sideNav-item-9').click();
|
|
34
|
-
return this;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
async createGroup(groupName: string): Promise<this> {
|
|
38
|
-
await this.page.locator("//button[normalize-space()='New release group']").click();
|
|
39
|
-
await this.page.locator('#title').type(groupName);
|
|
40
|
-
await this.page.locator("button[type='submit']").click();
|
|
41
|
-
return this;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
async selectPlannedStatus(): Promise<this> {
|
|
45
|
-
await this.page.locator('.remaining-tags').click();
|
|
46
|
-
await this.page.locator('.xl-react-link:text-is("Clear all")').click();
|
|
47
|
-
await this.page.locator('.react-tagsinput').click();
|
|
48
|
-
await this.page.locator(`.yt-option[title=Planned]`).click();
|
|
49
|
-
await this.page.locator("//span[normalize-space()='Status']").click();
|
|
50
|
-
return this;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
async expectReleaseGroupisDisplayed(title: string): Promise<this> {
|
|
54
|
-
//await this.page.locator(`.fc-list-item-title-wrapper .fc-list-item-title strong:text-is('${title}`).isVisible()
|
|
55
|
-
await this.page.waitForSelector(`.fc-list-item-title-wrapper .fc-list-item-title strong:text-is('${title}')`);
|
|
56
|
-
return this;
|
|
57
|
-
}
|
|
58
|
-
}
|
package/pages/LoginPage.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { expect } from '@playwright/test';
|
|
2
|
-
import { WithPage } from './WithPage';
|
|
3
|
-
|
|
4
|
-
export class LoginPage extends WithPage {
|
|
5
|
-
async login(userName: string, password: string): Promise<void> {
|
|
6
|
-
await this.page.goto('./');
|
|
7
|
-
await expect(this.page).toHaveTitle('Digital.ai Release');
|
|
8
|
-
await this.page.locator('#inputLogin').fill(userName);
|
|
9
|
-
await this.page.locator('#inputPassword').fill(password);
|
|
10
|
-
await this.page.locator("button[type='submit']").click();
|
|
11
|
-
await expect(this.page.locator('#releases-content')).toBeVisible();
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
async logout(): Promise<void> {
|
|
15
|
-
await this.page.locator('button.dot-avatar').click();
|
|
16
|
-
await this.page.getByText('Log out').click();
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { expect } from '@playwright/test';
|
|
2
|
-
import { WithPage } from './WithPage';
|
|
3
|
-
|
|
4
|
-
export class PersonalAccessTokenPage extends WithPage {
|
|
5
|
-
async openPersonalAccessTokenPage(): Promise<this> {
|
|
6
|
-
// await this.page.locator("button.dot-avatar").click()
|
|
7
|
-
// await this.page.locator("//div[normalize-space()='Access tokens']").click()
|
|
8
|
-
await this.page.goto('./#/personal-access-token');
|
|
9
|
-
await expect(this.page).toHaveTitle('Access tokens / Personal settings - Digital.ai Release');
|
|
10
|
-
return this;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
async addNewToken(tokenName: string): Promise<this> {
|
|
14
|
-
//await expect(this.page).toHaveTitle('Access tokens / Personal settings - Digital.ai Release')
|
|
15
|
-
|
|
16
|
-
await this.page.locator('#tokenText').fill(tokenName);
|
|
17
|
-
await this.page.locator("button[type='submit']").click();
|
|
18
|
-
return this;
|
|
19
|
-
}
|
|
20
|
-
}
|
package/pages/ReleasePage.ts
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { Page, Locator, expect } from '@playwright/test';
|
|
2
|
-
import { TriggersPage } from './TriggersPage';
|
|
3
|
-
import { WithPage } from './WithPage';
|
|
4
|
-
import { CustomScriptTaskModal } from './task-modal/CustomScriptTaskModal';
|
|
5
|
-
import { ReleaseVariablesPage } from './ReleaseVariablesPage';
|
|
6
|
-
|
|
7
|
-
export class ReleasePage extends WithPage {
|
|
8
|
-
async openTriggers(): Promise<TriggersPage> {
|
|
9
|
-
await this.openSubPage('Triggers');
|
|
10
|
-
return new TriggersPage(this.page);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
async abort(comment = 'Abort for testing'): Promise<void> {
|
|
14
|
-
await this.page.locator('action-toolbar button', { hasText: 'Abort' }).click();
|
|
15
|
-
await this.page.locator('.modal textarea').fill(comment);
|
|
16
|
-
await this.page.locator('.modal .continue').click();
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
getPhase(phaseName: string): Phase {
|
|
20
|
-
return new Phase(this.page, phaseName);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
async start(): Promise<void> {
|
|
24
|
-
await this.page.locator('action-toolbar button', { hasText: 'Start' }).click();
|
|
25
|
-
await this.page.locator('.modal button.primary').click();
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
async waitForTaskCompleted(taskTitle: string): Promise<void> {
|
|
29
|
-
await expect(this.page.locator('.task.completed').getByText(taskTitle, { exact: true })).toBeVisible();
|
|
30
|
-
}
|
|
31
|
-
async waitForTaskFailed(taskTitle: string): Promise<void> {
|
|
32
|
-
await expect(this.page.locator('.task.failed').getByText(taskTitle, { exact: true })).toBeVisible();
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* @deprecated Don't use this, use new TaskDrawer
|
|
37
|
-
*/
|
|
38
|
-
async openCustomScriptTaskModal(taskName: string): Promise<CustomScriptTaskModal> {
|
|
39
|
-
await this.page.locator('.task-header').getByText(taskName).click();
|
|
40
|
-
return new CustomScriptTaskModal(this.page);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
async openVariables(): Promise<ReleaseVariablesPage> {
|
|
44
|
-
await this.openReleaseMenu('Variables');
|
|
45
|
-
return new ReleaseVariablesPage(this.page);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
async openReleaseMenu(menuItem: string): Promise<void> {
|
|
49
|
-
await this.page.locator(`navigation-sidebar ul li`).getByText(menuItem, { exact: true }).click();
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
private async openSubPage(subpage: string): Promise<void> {
|
|
53
|
-
await this.page.locator('ul.side-nav li', { hasText: subpage }).click();
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
class Phase extends WithPage {
|
|
58
|
-
private readonly phaseLocator: Locator;
|
|
59
|
-
|
|
60
|
-
constructor(page: Page, phaseName: string) {
|
|
61
|
-
super(page);
|
|
62
|
-
this.phaseLocator = page.locator('.phase', { hasText: phaseName });
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
async addTask(taskName: string, taskGroup: string, taskType: string): Promise<void> {
|
|
66
|
-
await this.phaseLocator.getByText('Add task').click();
|
|
67
|
-
await this.phaseLocator.locator('.quick-title').fill(taskName);
|
|
68
|
-
await this.phaseLocator.locator('.xlr-ctx-menu-toggle').click();
|
|
69
|
-
await this.page.locator(`.xlr-ctx-menu-item`).getByTitle(taskGroup, { exact: true }).scrollIntoViewIfNeeded();
|
|
70
|
-
await this.page.locator(`.xlr-ctx-menu-item`).getByTitle(taskGroup, { exact: true }).hover();
|
|
71
|
-
await this.page.locator(`.xlr-ctx-menu.active`).getByTitle(taskType, { exact: true }).click();
|
|
72
|
-
await this.phaseLocator.locator('.quick-controls-container a').getByText('Add', { exact: true }).click();
|
|
73
|
-
}
|
|
74
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { expect } from '@playwright/test';
|
|
2
|
-
import { WithPage } from './WithPage';
|
|
3
|
-
|
|
4
|
-
export class ReleaseVariablesPage extends WithPage {
|
|
5
|
-
async openVariable(variableKey: string): Promise<ReleaseVariableModal> {
|
|
6
|
-
await this.page.locator(`.variables-list .variable`).getByText(variableKey).click();
|
|
7
|
-
return new ReleaseVariableModal(this.page);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
class ReleaseVariableModal extends WithPage {
|
|
12
|
-
async expectValueToBe(value: string): Promise<void> {
|
|
13
|
-
await expect(this.page.locator('#modal .variable-value input')).toHaveValue(value);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
async close(): Promise<void> {
|
|
17
|
-
await this.page.locator('#modal .modal-header button.close').click();
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { expect } from '@playwright/test';
|
|
2
|
-
import { ReleasePage } from './ReleasePage';
|
|
3
|
-
import { WithPage } from './WithPage';
|
|
4
|
-
|
|
5
|
-
export class ReleasesListPage extends WithPage {
|
|
6
|
-
async expectNumberOfReleases(releaseTitle: string, amount: number): Promise<void> {
|
|
7
|
-
if (amount === 1) {
|
|
8
|
-
await expect(this.page.locator('.release').getByText(releaseTitle)).toBeVisible();
|
|
9
|
-
} else {
|
|
10
|
-
await expect(this.page.locator('.release').getByText(releaseTitle).count()).toBe(amount);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
async openReleaseByName(releaseTitle: string): Promise<ReleasePage> {
|
|
15
|
-
await this.page.locator('.release-line .row-wrapper .release-title-wrapper a', { hasText: releaseTitle }).click();
|
|
16
|
-
return new ReleasePage(this.page);
|
|
17
|
-
}
|
|
18
|
-
}
|
package/pages/TriggersPage.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { expect } from '@playwright/test';
|
|
2
|
-
import { ReleasesListPage } from './ReleasesListPage';
|
|
3
|
-
import { WithPage } from './WithPage';
|
|
4
|
-
|
|
5
|
-
export class TriggersPage extends WithPage {
|
|
6
|
-
async openRelatedReleasesOf(title: string): Promise<ReleasesListPage> {
|
|
7
|
-
await this.openContextMenu(title);
|
|
8
|
-
await this.page.locator('.popover-content xlr-context-menu a', { hasText: 'View releases' }).click();
|
|
9
|
-
return new ReleasesListPage(this.page);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
private async openContextMenu(title: string): Promise<void> {
|
|
13
|
-
await expect(async () => {
|
|
14
|
-
await this.page.locator('.trigger-row-content', { hasText: title }).locator('.context-menu-button').click();
|
|
15
|
-
await expect(this.page.locator('.popover-content')).toBeVisible();
|
|
16
|
-
}).toPass();
|
|
17
|
-
}
|
|
18
|
-
}
|
package/pages/WithPage.ts
DELETED
package/pages/index.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Page } from '@playwright/test';
|
|
2
|
-
import { ReleasePage } from './ReleasePage';
|
|
3
|
-
|
|
4
|
-
export class Navigation {
|
|
5
|
-
private readonly page: Page;
|
|
6
|
-
|
|
7
|
-
constructor(page: Page) {
|
|
8
|
-
this.page = page;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
async openTemplate(id: string): Promise<ReleasePage> {
|
|
12
|
-
return this.openReleaseOrTemplate(id, false);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
async openRelease(id: string): Promise<ReleasePage> {
|
|
16
|
-
return this.openReleaseOrTemplate(id, true);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
private async openReleaseOrTemplate(id: string, release: boolean): Promise<ReleasePage> {
|
|
20
|
-
const url = release ? 'releases' : 'templates';
|
|
21
|
-
await this.page.goto(`./#/${url}/${id}`);
|
|
22
|
-
await this.page.waitForSelector('#release');
|
|
23
|
-
return new ReleasePage(this.page);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { expect } from '@playwright/test';
|
|
2
|
-
import { TaskModal } from './TaskModal';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated Don't use this, use new TaskDrawer
|
|
6
|
-
*/
|
|
7
|
-
export class CustomScriptTaskModal extends TaskModal {
|
|
8
|
-
async expectFieldNotEmpty(field: string): Promise<void> {
|
|
9
|
-
await expect(this.taskModalLocator.locator(`#${field} .display`).textContent).toBeDefined();
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
async setSelectField(propertyName: string, value: string): Promise<void> {
|
|
13
|
-
await this.focusOnField(propertyName);
|
|
14
|
-
await this.taskModalLocator.locator(`select[name="${propertyName}"]`).selectOption(value);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
async setTextField(propertyName: string, value: string): Promise<void> {
|
|
18
|
-
await this.focusOnField(propertyName);
|
|
19
|
-
await this.taskModalLocator.locator(`input[name="${propertyName}"]`).fill(value);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
async setAutocompleteField(propertyName: string, value: string): Promise<void> {
|
|
23
|
-
await this.focusOnAutocompleteField(propertyName);
|
|
24
|
-
await this.taskModalLocator.locator(`#${propertyName} ul li`).getByText(value).click();
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
async expectOutputValueToBe(propertyName: string, value: string): Promise<void> {
|
|
28
|
-
await expect(this.taskModalLocator.locator(`#${propertyName} .field-readonly span`)).toContainText(value);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// TODO move this to a new inline-editor
|
|
32
|
-
private async focusOnField(propertyName: string): Promise<void> {
|
|
33
|
-
await expect(async () => {
|
|
34
|
-
await this.taskModalLocator.locator(`#${propertyName} .display`).click({ force: true });
|
|
35
|
-
await expect(this.taskModalLocator.locator(`#${propertyName} label.edit`)).toBeVisible();
|
|
36
|
-
}).toPass();
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
private async focusOnAutocompleteField(propertyName: string): Promise<void> {
|
|
40
|
-
await expect(async () => {
|
|
41
|
-
await this.taskModalLocator.locator(`#${propertyName} input`).click({ force: true });
|
|
42
|
-
await expect(this.taskModalLocator.locator(`#${propertyName} ul`)).toBeVisible();
|
|
43
|
-
}).toPass();
|
|
44
|
-
}
|
|
45
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Page, Locator } from '@playwright/test';
|
|
2
|
-
|
|
3
|
-
import { WithPage } from '../WithPage';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated Don't use this, use new TaskDrawer
|
|
7
|
-
*/
|
|
8
|
-
export class TaskModal extends WithPage {
|
|
9
|
-
protected readonly taskModalLocator: Locator;
|
|
10
|
-
|
|
11
|
-
constructor(page: Page) {
|
|
12
|
-
super(page);
|
|
13
|
-
this.taskModalLocator = this.page.locator('.modal-content.task-details');
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
async close(): Promise<void> {
|
|
17
|
-
await this.taskModalLocator.locator('.modal-header button.close').click();
|
|
18
|
-
}
|
|
19
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "tsconfig/base.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"target": "ES2019",
|
|
5
|
-
/* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
|
|
6
|
-
"module": "ESNext",
|
|
7
|
-
/* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
|
|
8
|
-
"noImplicitAny": true,
|
|
9
|
-
/* Raise error on expressions and declarations with an implied 'any' type. */
|
|
10
|
-
"strictNullChecks": true,
|
|
11
|
-
/* Enable strict null checks. */
|
|
12
|
-
"strictPropertyInitialization": true,
|
|
13
|
-
/* Enable strict checking of property initialization in classes. */
|
|
14
|
-
"noImplicitThis": true,
|
|
15
|
-
/* Raise error on 'this' expressions with an implied 'any' type. */
|
|
16
|
-
"alwaysStrict": true,
|
|
17
|
-
/* Parse in strict mode and emit "use strict" for each source file. */
|
|
18
|
-
"moduleResolution": "node",
|
|
19
|
-
/* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
|
20
|
-
"types": ["lodash", "node"],
|
|
21
|
-
/* Type declaration files to be included in compilation. */
|
|
22
|
-
"esModuleInterop": true,
|
|
23
|
-
/* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
|
24
|
-
"resolveJsonModule": true,
|
|
25
|
-
"skipLibCheck": true,
|
|
26
|
-
/* Skip type checking of declaration files. */
|
|
27
|
-
"forceConsistentCasingInFileNames": true
|
|
28
|
-
/* Disallow inconsistently-cased references to the same file. */
|
|
29
|
-
},
|
|
30
|
-
"include": ["**/*.ts"],
|
|
31
|
-
"exclude": ["node_modules"]
|
|
32
|
-
}
|
package/types/index.ts
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
interface BaseConfigurationItem {
|
|
2
|
-
id: string;
|
|
3
|
-
type: string;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
interface PlanItem extends BaseConfigurationItem {
|
|
7
|
-
title: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface Release extends PlanItem {
|
|
11
|
-
allowConcurrentReleasesFromTrigger: boolean;
|
|
12
|
-
attachments: Array<Attachment>;
|
|
13
|
-
description: string;
|
|
14
|
-
dueDate?: Date;
|
|
15
|
-
endDate?: Date;
|
|
16
|
-
extensions: Array<ReleaseExtension>;
|
|
17
|
-
owner?: string;
|
|
18
|
-
passwordVariableValues?: VariableValues;
|
|
19
|
-
phases: Array<Phase>;
|
|
20
|
-
queryableEndDate?: Date;
|
|
21
|
-
queryableStartDate?: Date;
|
|
22
|
-
scheduledStartDate?: Date;
|
|
23
|
-
scriptUserPassword?: string;
|
|
24
|
-
scriptUsername?: string;
|
|
25
|
-
startDate?: Date;
|
|
26
|
-
status: ReleaseStatus;
|
|
27
|
-
summary?: Dashboard;
|
|
28
|
-
teams: Array<Team>;
|
|
29
|
-
variableValues?: VariableValues;
|
|
30
|
-
variables: Array<Variable>;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
interface VariableValues {
|
|
34
|
-
[key: string]: any;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export interface Variable extends PlanItem {
|
|
38
|
-
key: string;
|
|
39
|
-
requiresValue: boolean;
|
|
40
|
-
showOnReleaseStart: boolean;
|
|
41
|
-
value: any;
|
|
42
|
-
valueProvider?: VariableValueProvider;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export interface VariableValueProvider {
|
|
46
|
-
id: string;
|
|
47
|
-
variable: string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export interface Container extends PlanItem {
|
|
51
|
-
tasks: Array<Task>;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export interface Phase extends Container {
|
|
55
|
-
status: PhaseStatus;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export interface Task extends PlanItem {
|
|
59
|
-
attachments: Array<Attachment>;
|
|
60
|
-
comments: Array<Comment>;
|
|
61
|
-
conditions: Array<Condition>;
|
|
62
|
-
dependencies: Array<Dependency>;
|
|
63
|
-
links: Array<Link>;
|
|
64
|
-
owner?: string;
|
|
65
|
-
pythonScript?: PythonScript;
|
|
66
|
-
status: TaskStatus;
|
|
67
|
-
tasks: Array<Task>;
|
|
68
|
-
templateVariables: Array<Variable>;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
type Condition = PlanItem;
|
|
72
|
-
type Dependency = PlanItem;
|
|
73
|
-
type Link = PlanItem;
|
|
74
|
-
type Comment = PlanItem;
|
|
75
|
-
type Attachment = PlanItem;
|
|
76
|
-
|
|
77
|
-
export interface Dashboard extends ReleaseExtension {
|
|
78
|
-
tiles: Array<Tile>;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
type ReleaseExtension = BaseConfigurationItem;
|
|
82
|
-
export type Tile = BaseConfigurationItem;
|
|
83
|
-
|
|
84
|
-
interface PythonScript extends BaseConfigurationItem {
|
|
85
|
-
customScriptTask: string;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
type ReleaseStatus = 'TEMPLATE' | 'PLANNED' | 'IN_PROGRESS' | 'PAUSED' | 'FAILING' | 'FAILED' | 'COMPLETED' | 'ABORTED';
|
|
89
|
-
type PhaseStatus = 'PLANNED' | 'IN_PROGRESS' | 'COMPLETED' | 'FAILING' | 'FAILED' | 'SKIPPED' | 'ABORTED';
|
|
90
|
-
type TaskStatus =
|
|
91
|
-
| 'IN_PROGRESS'
|
|
92
|
-
| 'PLANNED'
|
|
93
|
-
| 'SKIPPED_IN_ADVANCE'
|
|
94
|
-
| 'COMPLETED_IN_ADVANCE'
|
|
95
|
-
| 'COMPLETED'
|
|
96
|
-
| 'SKIPPED'
|
|
97
|
-
| 'ABORTED'
|
|
98
|
-
| 'PENDING'
|
|
99
|
-
| 'FACET_CHECK_IN_PROGRESS'
|
|
100
|
-
| 'FAILED'
|
|
101
|
-
| 'FAILING'
|
|
102
|
-
| 'FAILURE_HANDLER_IN_PROGRESS'
|
|
103
|
-
| 'ABORT_SCRIPT_IN_PROGRESS'
|
|
104
|
-
| 'PRECONDITION_IN_PROGRESS'
|
|
105
|
-
| 'QUEUED'
|
|
106
|
-
| 'ABORT_SCRIPT_QUEUED'
|
|
107
|
-
| 'WAITING_FOR_INPUT'
|
|
108
|
-
| 'FAILURE_HANDLER_QUEUED';
|
|
109
|
-
|
|
110
|
-
type Team = BaseConfigurationItem;
|
|
111
|
-
|
|
112
|
-
type FeatureCategory = 'Stable' | 'Incubating';
|
|
113
|
-
type FeatureType = 'xlrelease.TaskDrawer'; // add more as needed
|
|
114
|
-
export interface FixtureFeature {
|
|
115
|
-
category: FeatureCategory;
|
|
116
|
-
enabled: boolean;
|
|
117
|
-
id: string;
|
|
118
|
-
type: FeatureType;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
type DeepPartial<T> = {
|
|
122
|
-
[P in keyof T]?: DeepPartial<T[P]>;
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
// for fixtures we allow releases with everything optional expect the `id`
|
|
126
|
-
export type FixtureRelease = DeepPartial<Release> & Pick<Release, 'id'>;
|
|
127
|
-
|
|
128
|
-
export interface FixtureConfiguration extends PlanItem {
|
|
129
|
-
password?: string;
|
|
130
|
-
url: string;
|
|
131
|
-
username?: string;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
export interface FixtureTrigger extends PlanItem {
|
|
135
|
-
folderId?: string;
|
|
136
|
-
gitRepository?: string;
|
|
137
|
-
periodicity?: number | string;
|
|
138
|
-
pollType?: string;
|
|
139
|
-
releaseTitle: string;
|
|
140
|
-
template: string;
|
|
141
|
-
}
|