@digital-ai/devops-page-object-release 0.0.1 → 0.0.4
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 +18 -0
- package/dist/main.js +91 -0
- package/dist/main.js.map +1 -1
- package/dist/module.js +91 -0
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +26 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
- 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/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
|
-
}
|