@umbraco/playwright-testhelpers 16.0.23 → 16.0.25
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/dist/lib/helpers/ApiHelpers.d.ts +2 -0
- package/dist/lib/helpers/ApiHelpers.js +3 -0
- package/dist/lib/helpers/ApiHelpers.js.map +1 -1
- package/dist/lib/helpers/ConstantHelper.d.ts +5 -0
- package/dist/lib/helpers/ConstantHelper.js +27 -0
- package/dist/lib/helpers/ConstantHelper.js.map +1 -1
- package/dist/lib/helpers/ContentUiHelper.d.ts +1 -0
- package/dist/lib/helpers/ContentUiHelper.js +4 -1
- package/dist/lib/helpers/ContentUiHelper.js.map +1 -1
- package/dist/lib/helpers/MemberApiHelper.js +1 -0
- package/dist/lib/helpers/MemberApiHelper.js.map +1 -1
- package/dist/lib/helpers/RelationTypeUiHelper.d.ts +13 -0
- package/dist/lib/helpers/RelationTypeUiHelper.js +34 -0
- package/dist/lib/helpers/RelationTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/UiBaseLocators.d.ts +1 -0
- package/dist/lib/helpers/UiBaseLocators.js +4 -1
- package/dist/lib/helpers/UiBaseLocators.js.map +1 -1
- package/dist/lib/helpers/UiHelpers.d.ts +2 -0
- package/dist/lib/helpers/UiHelpers.js +3 -0
- package/dist/lib/helpers/UiHelpers.js.map +1 -1
- package/dist/lib/helpers/UserGroupApiHelper.d.ts +15 -0
- package/dist/lib/helpers/UserGroupApiHelper.js +283 -0
- package/dist/lib/helpers/UserGroupApiHelper.js.map +1 -1
- package/dist/lib/helpers/WebhookApiHelper.d.ts +29 -0
- package/dist/lib/helpers/WebhookApiHelper.js +169 -0
- package/dist/lib/helpers/WebhookApiHelper.js.map +1 -0
- package/dist/lib/helpers/WebhookUiHelper.d.ts +29 -0
- package/dist/lib/helpers/WebhookUiHelper.js +92 -0
- package/dist/lib/helpers/WebhookUiHelper.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -59,6 +59,7 @@ class MemberApiHelper {
|
|
|
59
59
|
return null;
|
|
60
60
|
}
|
|
61
61
|
async createDefaultMember(memberName, memberTypeId, email, username, password) {
|
|
62
|
+
await this.ensureNameNotExists(memberName);
|
|
62
63
|
const member = new json_models_builders_1.MemberBuilder()
|
|
63
64
|
.addVariant()
|
|
64
65
|
.withName(memberName)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MemberApiHelper.js","sourceRoot":"","sources":["../../../lib/helpers/MemberApiHelper.ts"],"names":[],"mappings":";;;AACA,wEAA4D;AAE5D,MAAa,eAAe;IAC1B,GAAG,CAAa;IAEhB,YAAY,GAAe;QACzB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,EAAU;QAClB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,GAAG,oCAAoC,GAAG,EAAE,CAAC,CAAC;QAClG,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;IAC/B,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,MAAM;QACjB,IAAI,MAAM,IAAI,IAAI,EAAE;YAClB,OAAO;SACR;QACD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,GAAG,mCAAmC,EAAE,MAAM,CAAC,CAAC;QACrG,OAAO,QAAQ,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,GAAG,EAAE,CAAC;IAC/D,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,IAAI,EAAE,IAAI,IAAI,EAAE;YACd,OAAO;SACR;QACD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CA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AAC,IAAI,KAAK,IAAI,EAAE;gBACpC,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;aACrC;SACF;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,mBAAmB,CAAC,UAAkB,EAAE,YAAoB,EAAE,KAAa,EAAE,QAAgB,EAAE,QAAgB;QACnH,MAAM,IAAI,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC;QAE3C,MAAM,MAAM,GAAG,IAAI,oCAAa,EAAE;aAC/B,UAAU,EAAE;aACV,QAAQ,CAAC,UAAU,CAAC;aACpB,IAAI,EAAE;aACR,SAAS,CAAC,KAAK,CAAC;aAChB,YAAY,CAAC,QAAQ,CAAC;aACtB,YAAY,CAAC,QAAQ,CAAC;aACtB,gBAAgB,CAAC,YAAY,CAAC;aAC9B,KAAK,EAAE,CAAC;QACX,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,2BAA2B,CAAC,UAAkB,EAAE,YAAoB,EAAE,KAAa,EAAE,QAAgB,EAAE,QAAgB,EAAE,aAAqB;QAClJ,MAAM,MAAM,GAAG,IAAI,oCAAa,EAAE;aAC/B,UAAU,EAAE;aACV,QAAQ,CAAC,UAAU,CAAC;aACpB,IAAI,EAAE;aACR,SAAS,CAAC,KAAK,CAAC;aAChB,YAAY,CAAC,QAAQ,CAAC;aACtB,YAAY,CAAC,QAAQ,CAAC;aACtB,gBAAgB,CAAC,YAAY,CAAC;aAC9B,QAAQ,CAAC,aAAa,CAAC;aACvB,KAAK,EAAE,CAAC;QACX,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;CACF;AAjGD,0CAiGC","sourcesContent":["import {ApiHelpers} from \"./ApiHelpers\";\nimport {MemberBuilder} from \"@umbraco/json-models-builders\";\n\nexport class MemberApiHelper {\n api: ApiHelpers;\n\n constructor(api: ApiHelpers) {\n this.api = api;\n }\n\n async get(id: string) {\n const response = await this.api.get(this.api.baseUrl + '/umbraco/management/api/v1/member/' + id);\n return await response.json();\n }\n\n async create(member) {\n if (member == null) {\n return;\n }\n const response = await this.api.post(this.api.baseUrl + '/umbraco/management/api/v1/member', member);\n return response.headers().location.split(\"v1/member/\").pop();\n }\n\n async delete(id: string) {\n if (id == null) {\n return;\n }\n const response = await this.api.delete(this.api.baseUrl + '/umbraco/management/api/v1/member/' + id);\n return response.status();\n }\n\n async getAll() {\n return await this.api.get(this.api.baseUrl + '/umbraco/management/api/v1/filter/member?skip=0&take=1000');\n }\n\n async filterByMemberTypeId(memberTypeId: string) {\n return await this.api.get(this.api.baseUrl + '/umbraco/management/api/v1/filter/member?memberTypeId='+ memberTypeId + '&orderBy=username&skip=0&take=100');\n }\n\n async doesExist(id: string) {\n const response = await this.api.get(this.api.baseUrl + '/umbraco/management/api/v1/member/' + id);\n return response.status() === 200;\n }\n\n async doesNameExist(name: string) {\n return await this.getByName(name);\n }\n\n async getByName(name: string) {\n const rootMembers = await this.getAll();\n const jsonMembers = await rootMembers.json();\n\n for (const member of jsonMembers.items) {\n if (member.variants[0].name === name) {\n return await this.get(member.id);\n }\n }\n return false;\n }\n\n async ensureNameNotExists(name: string) {\n const rootMembers = await this.getAll();\n const jsonMembers = await rootMembers.json();\n \n for (const member of jsonMembers.items) { \n if (member.variants[0].name === name) {\n return await this.delete(member.id);\n }\n }\n return null;\n }\n\n async createDefaultMember(memberName: string, memberTypeId: string, email: string, username: string, password: string) {\n await this.ensureNameNotExists(memberName);\n \n const member = new MemberBuilder()\n .addVariant()\n .withName(memberName)\n .done()\n .withEmail(email)\n .withUsername(username)\n .withPassword(password)\n .withMemberTypeId(memberTypeId)\n .build();\n return await this.create(member);\n }\n\n async createMemberWithMemberGroup(memberName: string, memberTypeId: string, email: string, username: string, password: string, memberGroupId: string) {\n const member = new MemberBuilder()\n .addVariant()\n .withName(memberName)\n .done()\n .withEmail(email)\n .withUsername(username)\n .withPassword(password)\n .withMemberTypeId(memberTypeId)\n .addGroup(memberGroupId)\n .build();\n return await this.create(member);\n }\n}"]}
|
|
@@ -7,13 +7,26 @@ export declare class RelationTypeUiHelper extends UiBaseLocators {
|
|
|
7
7
|
private readonly isDependencyToggle;
|
|
8
8
|
private readonly parentDropDownBox;
|
|
9
9
|
private readonly childDropDownBox;
|
|
10
|
+
private readonly relationTypeCollection;
|
|
11
|
+
private readonly relationTypeWorkspace;
|
|
12
|
+
private readonly relationTypeParentType;
|
|
13
|
+
private readonly relationTypeChildType;
|
|
14
|
+
private readonly relationTypeBidirectional;
|
|
15
|
+
private readonly relationTypeDependency;
|
|
16
|
+
private readonly relationsTableRow;
|
|
10
17
|
constructor(page: Page);
|
|
11
18
|
clickActionsMenuForRelationType(name: string): Promise<void>;
|
|
19
|
+
goToRelationTypeWithName(name: string): Promise<void>;
|
|
12
20
|
clickRootFolderCaretButton(): Promise<void>;
|
|
13
21
|
clickActionsMenuAtRoot(): Promise<void>;
|
|
14
22
|
openRelationTypeByNameAtRoot(relationTypeName: string): Promise<void>;
|
|
15
23
|
enterRelationTypeName(name: string): Promise<void>;
|
|
16
24
|
clickParentToChildRadioButton(): Promise<void>;
|
|
25
|
+
doesParentTypeContainValue(value: string): Promise<void>;
|
|
26
|
+
doesChildTypeContainValue(value: string): Promise<void>;
|
|
27
|
+
doesBidirectionalContainValue(value: string): Promise<void>;
|
|
28
|
+
doesDependencyContainValue(value: string): Promise<void>;
|
|
29
|
+
isRelationWithParentAndChildVisible(parent: string, child: string, isVisible?: boolean): Promise<void>;
|
|
17
30
|
clickBidirectionalRadioButton(): Promise<void>;
|
|
18
31
|
clickIsDependencyToggle(): Promise<void>;
|
|
19
32
|
selectParentOption(option: string): Promise<void>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RelationTypeUiHelper = void 0;
|
|
4
|
+
const test_1 = require("@playwright/test");
|
|
4
5
|
const UiBaseLocators_1 = require("./UiBaseLocators");
|
|
5
6
|
class RelationTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
6
7
|
relationTypeNameTxt;
|
|
@@ -9,6 +10,13 @@ class RelationTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
9
10
|
isDependencyToggle;
|
|
10
11
|
parentDropDownBox;
|
|
11
12
|
childDropDownBox;
|
|
13
|
+
relationTypeCollection;
|
|
14
|
+
relationTypeWorkspace;
|
|
15
|
+
relationTypeParentType;
|
|
16
|
+
relationTypeChildType;
|
|
17
|
+
relationTypeBidirectional;
|
|
18
|
+
relationTypeDependency;
|
|
19
|
+
relationsTableRow;
|
|
12
20
|
constructor(page) {
|
|
13
21
|
super(page);
|
|
14
22
|
this.relationTypeNameTxt = page.locator('#name #input');
|
|
@@ -17,10 +25,21 @@ class RelationTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
17
25
|
this.isDependencyToggle = page.locator("umb-property-layout[label='Is dependency'] #toggle");
|
|
18
26
|
this.parentDropDownBox = page.locator("umb-property-layout[label='Parent'] #native");
|
|
19
27
|
this.childDropDownBox = page.locator("umb-property-layout[label='Child'] #native");
|
|
28
|
+
this.relationTypeCollection = page.locator('umb-relation-type-table-collection-view');
|
|
29
|
+
this.relationTypeWorkspace = page.locator('umb-relation-type-detail-workspace-view');
|
|
30
|
+
this.relationTypeParentType = this.relationTypeWorkspace.locator('[label="Parent Type"]').locator('[slot="editor"]');
|
|
31
|
+
this.relationTypeChildType = this.relationTypeWorkspace.locator('[label="Child Type"]').locator('[slot="editor"]');
|
|
32
|
+
this.relationTypeBidirectional = this.relationTypeWorkspace.locator('[label="Bidirectional"]').locator('[slot="editor"]');
|
|
33
|
+
this.relationTypeDependency = this.relationTypeWorkspace.locator('[label="Dependency"]').locator('[slot="editor"]');
|
|
34
|
+
this.relationsTableRow = this.relationTypeWorkspace.locator('umb-table').locator('uui-table-row');
|
|
20
35
|
}
|
|
21
36
|
async clickActionsMenuForRelationType(name) {
|
|
22
37
|
await this.clickActionsMenuForName(name);
|
|
23
38
|
}
|
|
39
|
+
async goToRelationTypeWithName(name) {
|
|
40
|
+
await (0, test_1.expect)(this.relationTypeCollection.getByText(name)).toBeVisible();
|
|
41
|
+
await this.relationTypeCollection.getByText(name).click();
|
|
42
|
+
}
|
|
24
43
|
async clickRootFolderCaretButton() {
|
|
25
44
|
await this.clickCaretButtonForName("Relation Types");
|
|
26
45
|
}
|
|
@@ -38,6 +57,21 @@ class RelationTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
38
57
|
async clickParentToChildRadioButton() {
|
|
39
58
|
await this.parentToChildRadioBtn.click();
|
|
40
59
|
}
|
|
60
|
+
async doesParentTypeContainValue(value) {
|
|
61
|
+
await (0, test_1.expect)(this.relationTypeParentType).toContainText(value);
|
|
62
|
+
}
|
|
63
|
+
async doesChildTypeContainValue(value) {
|
|
64
|
+
await (0, test_1.expect)(this.relationTypeChildType).toContainText(value);
|
|
65
|
+
}
|
|
66
|
+
async doesBidirectionalContainValue(value) {
|
|
67
|
+
await (0, test_1.expect)(this.relationTypeBidirectional).toContainText(value);
|
|
68
|
+
}
|
|
69
|
+
async doesDependencyContainValue(value) {
|
|
70
|
+
await (0, test_1.expect)(this.relationTypeDependency).toContainText(value);
|
|
71
|
+
}
|
|
72
|
+
async isRelationWithParentAndChildVisible(parent, child, isVisible = true) {
|
|
73
|
+
await (0, test_1.expect)(this.relationsTableRow.filter({ has: this.page.locator('uui-table-cell').first().getByText(parent) }).filter({ has: this.page.locator('uui-table-cell').nth(1).getByText(child) })).toBeVisible({ visible: isVisible });
|
|
74
|
+
}
|
|
41
75
|
async clickBidirectionalRadioButton() {
|
|
42
76
|
await this.bidirectionalRadioBtn.click();
|
|
43
77
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RelationTypeUiHelper.js","sourceRoot":"","sources":["../../../lib/helpers/RelationTypeUiHelper.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"RelationTypeUiHelper.js","sourceRoot":"","sources":["../../../lib/helpers/RelationTypeUiHelper.ts"],"names":[],"mappings":";;;AAAA,2CAAsD;AACtD,qDAAgD;AAEhD,MAAa,oBAAqB,SAAQ,+BAAc;IACrC,mBAAmB,CAAU;IAC7B,qBAAqB,CAAU;IAC/B,qBAAqB,CAAU;IAC/B,kBAAkB,CAAU;IAC5B,iBAAiB,CAAU;IAC3B,gBAAgB,CAAU;IAC1B,sBAAsB,CAAU;IAChC,qBAAqB,CAAU;IAC/B,sBAAsB,CAAU;IAChC,qBAAqB,CAAU;IAC/B,yBAAyB,CAAU;IACnC,sBAAsB,CAAU;IAChC,iBAAiB,CAAU;IAE5C,YAAY,IAAU;QACpB,KAAK,CAAC,IAAI,CAAC,CAAC;QACZ,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;QACxD,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC,OAAO,CAAC,4CAA4C,CAAC,CAAC;QACxF,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC,OAAO,CAAC,0CAA0C,CAAC,CAAC;QACtF,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,OAAO,CAAC,oDAAoD,CAAC,CAAC;QAC7F,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,OAAO,CAAC,6CAA6C,CAAC,CAAC;QACrF,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,OAAO,CAAC,4CAA4C,CAAC,CAAC;QACnF,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,OAAO,CAAC,yCAAyC,CAAC,CAAA;QACrF,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC,OAAO,CAAC,yCAAyC,CAAC,CAAC;QACrF,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,uBAAuB,CAA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gB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,EAAC,CAAC,CAAC,CAAC,WAAW,CAAC,EAAC,OAAO,EAAE,SAAS,EAAC,CAAC,CAAC;IACjO,CAAC;IAED,KAAK,CAAC,6BAA6B;QACjC,MAAM,IAAI,CAAC,qBAAqB,CAAC,KAAK,EAAE,CAAC;IAC3C,CAAC;IAED,KAAK,CAAC,uBAAuB;QAC3B,MAAM,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE,CAAC;IACxC,CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC,MAAc;QACrC,MAAM,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED,KAAK,CAAC,iBAAiB,CAAC,MAAc;QACpC,MAAM,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;IAC9D,CAAC;CACF;AAlGD,oDAkGC","sourcesContent":["import {expect, Locator, Page} from \"@playwright/test\"\nimport {UiBaseLocators} from \"./UiBaseLocators\";\n\nexport class RelationTypeUiHelper extends UiBaseLocators{\n private readonly relationTypeNameTxt: Locator;\n private readonly parentToChildRadioBtn: Locator;\n private readonly bidirectionalRadioBtn: Locator;\n private readonly isDependencyToggle: Locator;\n private readonly parentDropDownBox: Locator;\n private readonly childDropDownBox: Locator;\n private readonly relationTypeCollection: Locator;\n private readonly relationTypeWorkspace: Locator;\n private readonly relationTypeParentType: Locator;\n private readonly relationTypeChildType: Locator;\n private readonly relationTypeBidirectional: Locator;\n private readonly relationTypeDependency: Locator;\n private readonly relationsTableRow: Locator;\n\n constructor(page: Page) {\n super(page);\n this.relationTypeNameTxt = page.locator('#name #input');\n this.parentToChildRadioBtn = page.locator(\"uui-radio[label='Parent to child'] #button\");\n this.bidirectionalRadioBtn = page.locator(\"uui-radio[label='Bidirectional'] #button\");\n this.isDependencyToggle = page.locator(\"umb-property-layout[label='Is dependency'] #toggle\");\n this.parentDropDownBox = page.locator(\"umb-property-layout[label='Parent'] #native\");\n this.childDropDownBox = page.locator(\"umb-property-layout[label='Child'] #native\");\n this.relationTypeCollection = page.locator('umb-relation-type-table-collection-view')\n this.relationTypeWorkspace = page.locator('umb-relation-type-detail-workspace-view');\n this.relationTypeParentType = this.relationTypeWorkspace.locator('[label=\"Parent Type\"]').locator('[slot=\"editor\"]');\n this.relationTypeChildType = this.relationTypeWorkspace.locator('[label=\"Child Type\"]').locator('[slot=\"editor\"]');\n this.relationTypeBidirectional =this.relationTypeWorkspace.locator('[label=\"Bidirectional\"]').locator('[slot=\"editor\"]');\n this.relationTypeDependency = this.relationTypeWorkspace.locator('[label=\"Dependency\"]').locator('[slot=\"editor\"]');\n this.relationsTableRow = this.relationTypeWorkspace.locator('umb-table').locator('uui-table-row');\n }\n\n async clickActionsMenuForRelationType(name: string) {\n await this.clickActionsMenuForName(name);\n }\n \n async goToRelationTypeWithName(name: string) {\n await expect(this.relationTypeCollection.getByText(name)).toBeVisible();\n await this.relationTypeCollection.getByText(name).click();\n }\n\n async clickRootFolderCaretButton() {\n await this.clickCaretButtonForName(\"Relation Types\");\n }\n\n async clickActionsMenuAtRoot() {\n await this.clickActionsMenuForRelationType(\"Relation Types\");\n }\n\n async openRelationTypeByNameAtRoot(relationTypeName: string) {\n await this.clickRootFolderCaretButton();\n await this.page.getByLabel(relationTypeName).click();\n }\n\n async enterRelationTypeName(name: string) {\n await this.relationTypeNameTxt.clear();\n await this.relationTypeNameTxt.fill(name);\n }\n\n async clickParentToChildRadioButton() {\n await this.parentToChildRadioBtn.click();\n }\n \n async doesParentTypeContainValue(value: string) {\n await expect(this.relationTypeParentType).toContainText(value);\n }\n\n async doesChildTypeContainValue(value: string) {\n await expect(this.relationTypeChildType).toContainText(value);\n }\n\n async doesBidirectionalContainValue(value: string) {\n await expect(this.relationTypeBidirectional).toContainText(value);\n }\n\n async doesDependencyContainValue(value: string) {\n await expect(this.relationTypeDependency).toContainText(value);\n }\n\n async isRelationWithParentAndChildVisible(parent: string, child: string, isVisible: boolean = true) {\n await expect(this.relationsTableRow.filter({has: this.page.locator('uui-table-cell').first().getByText(parent)}).filter({has: this.page.locator('uui-table-cell').nth(1).getByText(child)})).toBeVisible({visible: isVisible});\n }\n\n async clickBidirectionalRadioButton() {\n await this.bidirectionalRadioBtn.click();\n }\n\n async clickIsDependencyToggle() {\n await this.isDependencyToggle.click();\n }\n\n async selectParentOption(option: string) {\n await this.parentDropDownBox.selectOption({ label: option });\n }\n\n async selectChildOption(option: string) {\n await this.childDropDownBox.selectOption({ label: option });\n }\n}"]}
|
|
@@ -335,4 +335,5 @@ export declare class UiBaseLocators {
|
|
|
335
335
|
clickImportActionMenuOption(): Promise<void>;
|
|
336
336
|
clickUpdateActionMenuOption(): Promise<void>;
|
|
337
337
|
clickModalMenuItemWithName(name: string): Promise<void>;
|
|
338
|
+
isModalMenuItemWithNameDisabled(name: string): Promise<void>;
|
|
338
339
|
}
|
|
@@ -445,7 +445,7 @@ class UiBaseLocators {
|
|
|
445
445
|
await this.removeExactBtn.click();
|
|
446
446
|
}
|
|
447
447
|
async clickRemoveButtonForName(name) {
|
|
448
|
-
await this.page.locator('[name="' + name + '"] [
|
|
448
|
+
await this.page.locator('[name="' + name + '"] [label="Remove"]').click();
|
|
449
449
|
}
|
|
450
450
|
async clickTrashIconButtonForName(name) {
|
|
451
451
|
await this.page.locator('[name="' + name + '"] [name="icon-trash"]').click();
|
|
@@ -1135,6 +1135,9 @@ class UiBaseLocators {
|
|
|
1135
1135
|
await (0, test_1.expect)(this.sidebarModal.locator('uui-menu-item[label="' + name + '"]')).toBeVisible();
|
|
1136
1136
|
await this.sidebarModal.locator('uui-menu-item[label="' + name + '"]').click();
|
|
1137
1137
|
}
|
|
1138
|
+
async isModalMenuItemWithNameDisabled(name) {
|
|
1139
|
+
await (0, test_1.expect)(this.sidebarModal.locator('uui-menu-item[label="' + name + '"]')).toHaveAttribute('disabled');
|
|
1140
|
+
}
|
|
1138
1141
|
}
|
|
1139
1142
|
exports.UiBaseLocators = UiBaseLocators;
|
|
1140
1143
|
//# sourceMappingURL=UiBaseLocators.js.map
|