@umbraco/playwright-testhelpers 17.1.0-beta.6 → 17.1.0-beta.7
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/BaseApiHelper.d.ts +19 -0
- package/dist/lib/helpers/BaseApiHelper.js +87 -0
- package/dist/lib/helpers/BaseApiHelper.js.map +1 -0
- package/dist/lib/helpers/ConstantHelper.d.ts +0 -17
- package/dist/lib/helpers/ConstantHelper.js +0 -17
- package/dist/lib/helpers/ConstantHelper.js.map +1 -1
- package/dist/lib/helpers/ContentRenderUiHelper.js +3 -3
- package/dist/lib/helpers/ContentRenderUiHelper.js.map +1 -1
- package/dist/lib/helpers/ContentUiHelper.js +487 -353
- package/dist/lib/helpers/ContentUiHelper.js.map +1 -1
- package/dist/lib/helpers/CurrentUserProfileUiHelper.js +10 -4
- package/dist/lib/helpers/CurrentUserProfileUiHelper.js.map +1 -1
- package/dist/lib/helpers/DataTypeApiHelper.d.ts +9 -21
- package/dist/lib/helpers/DataTypeApiHelper.js +32 -125
- package/dist/lib/helpers/DataTypeApiHelper.js.map +1 -1
- package/dist/lib/helpers/DataTypeUiHelper.js +332 -193
- package/dist/lib/helpers/DataTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/DictionaryApiHelper.d.ts +8 -15
- package/dist/lib/helpers/DictionaryApiHelper.js +49 -77
- package/dist/lib/helpers/DictionaryApiHelper.js.map +1 -1
- package/dist/lib/helpers/DictionaryUiHelper.js +23 -17
- package/dist/lib/helpers/DictionaryUiHelper.js.map +1 -1
- package/dist/lib/helpers/DocumentBlueprintApiHelper.d.ts +7 -13
- package/dist/lib/helpers/DocumentBlueprintApiHelper.js +44 -69
- package/dist/lib/helpers/DocumentBlueprintApiHelper.js.map +1 -1
- package/dist/lib/helpers/DocumentBlueprintUiHelper.js +10 -8
- package/dist/lib/helpers/DocumentBlueprintUiHelper.js.map +1 -1
- package/dist/lib/helpers/DocumentTypeApiHelper.d.ts +4 -18
- package/dist/lib/helpers/DocumentTypeApiHelper.js +4 -134
- package/dist/lib/helpers/DocumentTypeApiHelper.js.map +1 -1
- package/dist/lib/helpers/DocumentTypeUiHelper.js +34 -22
- package/dist/lib/helpers/DocumentTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/ExamineManagementUiHelper.js +6 -5
- package/dist/lib/helpers/ExamineManagementUiHelper.js.map +1 -1
- package/dist/lib/helpers/FormsUiHelper.js +159 -119
- package/dist/lib/helpers/FormsUiHelper.js.map +1 -1
- package/dist/lib/helpers/HealthCheckUiHelper.js +7 -7
- package/dist/lib/helpers/HealthCheckUiHelper.js.map +1 -1
- package/dist/lib/helpers/LanguageApiHelper.d.ts +10 -12
- package/dist/lib/helpers/LanguageApiHelper.js +34 -35
- package/dist/lib/helpers/LanguageApiHelper.js.map +1 -1
- package/dist/lib/helpers/LanguageUiHelper.js +19 -16
- package/dist/lib/helpers/LanguageUiHelper.js.map +1 -1
- package/dist/lib/helpers/LogViewerUiHelper.js +31 -22
- package/dist/lib/helpers/LogViewerUiHelper.js.map +1 -1
- package/dist/lib/helpers/LoginUiHelper.js +7 -4
- package/dist/lib/helpers/LoginUiHelper.js.map +1 -1
- package/dist/lib/helpers/MediaTypeApiHelper.d.ts +4 -18
- package/dist/lib/helpers/MediaTypeApiHelper.js +4 -134
- package/dist/lib/helpers/MediaTypeApiHelper.js.map +1 -1
- package/dist/lib/helpers/MediaTypeUiHelper.js +17 -11
- package/dist/lib/helpers/MediaTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/MediaUiHelper.js +45 -36
- package/dist/lib/helpers/MediaUiHelper.js.map +1 -1
- package/dist/lib/helpers/MemberApiHelper.d.ts +4 -12
- package/dist/lib/helpers/MemberApiHelper.js +6 -54
- package/dist/lib/helpers/MemberApiHelper.js.map +1 -1
- package/dist/lib/helpers/MemberGroupApiHelper.d.ts +6 -11
- package/dist/lib/helpers/MemberGroupApiHelper.js +20 -35
- package/dist/lib/helpers/MemberGroupApiHelper.js.map +1 -1
- package/dist/lib/helpers/MemberGroupUiHelper.js +16 -13
- package/dist/lib/helpers/MemberGroupUiHelper.js.map +1 -1
- package/dist/lib/helpers/MemberTypeApiHelper.d.ts +5 -12
- package/dist/lib/helpers/MemberTypeApiHelper.js +16 -49
- package/dist/lib/helpers/MemberTypeApiHelper.js.map +1 -1
- package/dist/lib/helpers/MemberTypeUiHelper.js +3 -2
- package/dist/lib/helpers/MemberTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/MemberUiHelper.js +43 -25
- package/dist/lib/helpers/MemberUiHelper.js.map +1 -1
- package/dist/lib/helpers/ModelsBuilderUiHelper.js +3 -2
- package/dist/lib/helpers/ModelsBuilderUiHelper.js.map +1 -1
- package/dist/lib/helpers/PackageApiHelper.d.ts +5 -4
- package/dist/lib/helpers/PackageApiHelper.js +47 -75
- package/dist/lib/helpers/PackageApiHelper.js.map +1 -1
- package/dist/lib/helpers/PackageUiHelper.js +36 -30
- package/dist/lib/helpers/PackageUiHelper.js.map +1 -1
- package/dist/lib/helpers/PartialViewApiHelper.d.ts +5 -20
- package/dist/lib/helpers/PartialViewApiHelper.js +12 -146
- package/dist/lib/helpers/PartialViewApiHelper.js.map +1 -1
- package/dist/lib/helpers/PartialViewUiHelper.js +17 -14
- package/dist/lib/helpers/PartialViewUiHelper.js.map +1 -1
- package/dist/lib/helpers/PathBasedTreeApiHelper.d.ts +32 -0
- package/dist/lib/helpers/PathBasedTreeApiHelper.js +164 -0
- package/dist/lib/helpers/PathBasedTreeApiHelper.js.map +1 -0
- package/dist/lib/helpers/ProfilingUiHelper.js +5 -3
- package/dist/lib/helpers/ProfilingUiHelper.js.map +1 -1
- package/dist/lib/helpers/PublishedStatusUiHelper.js +8 -7
- package/dist/lib/helpers/PublishedStatusUiHelper.js.map +1 -1
- package/dist/lib/helpers/RedirectManagementUiHelper.js +12 -7
- package/dist/lib/helpers/RedirectManagementUiHelper.js.map +1 -1
- package/dist/lib/helpers/RelationTypeApiHelper.d.ts +7 -12
- package/dist/lib/helpers/RelationTypeApiHelper.js +28 -49
- package/dist/lib/helpers/RelationTypeApiHelper.js.map +1 -1
- package/dist/lib/helpers/RelationTypeUiHelper.js +16 -13
- package/dist/lib/helpers/RelationTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/ScriptApiHelper.d.ts +6 -22
- package/dist/lib/helpers/ScriptApiHelper.js +12 -165
- package/dist/lib/helpers/ScriptApiHelper.js.map +1 -1
- package/dist/lib/helpers/ScriptUiHelper.js +13 -9
- package/dist/lib/helpers/ScriptUiHelper.js.map +1 -1
- package/dist/lib/helpers/StylesheetApiHelper.d.ts +5 -20
- package/dist/lib/helpers/StylesheetApiHelper.js +13 -154
- package/dist/lib/helpers/StylesheetApiHelper.js.map +1 -1
- package/dist/lib/helpers/StylesheetUiHelper.js +14 -9
- package/dist/lib/helpers/StylesheetUiHelper.js.map +1 -1
- package/dist/lib/helpers/TelemetryDataUiHelper.js +3 -2
- package/dist/lib/helpers/TelemetryDataUiHelper.js.map +1 -1
- package/dist/lib/helpers/TemplateApiHelper.d.ts +8 -15
- package/dist/lib/helpers/TemplateApiHelper.js +51 -83
- package/dist/lib/helpers/TemplateApiHelper.js.map +1 -1
- package/dist/lib/helpers/TemplateUiHelper.js +25 -19
- package/dist/lib/helpers/TemplateUiHelper.js.map +1 -1
- package/dist/lib/helpers/TreeApiHelper.d.ts +15 -0
- package/dist/lib/helpers/TreeApiHelper.js +116 -0
- package/dist/lib/helpers/TreeApiHelper.js.map +1 -0
- package/dist/lib/helpers/UiBaseLocators.d.ts +228 -230
- package/dist/lib/helpers/UiBaseLocators.js +871 -834
- package/dist/lib/helpers/UiBaseLocators.js.map +1 -1
- package/dist/lib/helpers/UserGroupApiHelper.d.ts +3 -13
- package/dist/lib/helpers/UserGroupApiHelper.js +3 -69
- package/dist/lib/helpers/UserGroupApiHelper.js.map +1 -1
- package/dist/lib/helpers/UserGroupUiHelper.js +49 -32
- package/dist/lib/helpers/UserGroupUiHelper.js.map +1 -1
- package/dist/lib/helpers/UserUiHelper.js +46 -43
- package/dist/lib/helpers/UserUiHelper.js.map +1 -1
- package/dist/lib/helpers/VariantBasedApiHelper.d.ts +23 -0
- package/dist/lib/helpers/VariantBasedApiHelper.js +81 -0
- package/dist/lib/helpers/VariantBasedApiHelper.js.map +1 -0
- package/dist/lib/helpers/WebhookApiHelper.d.ts +1 -0
- package/dist/lib/helpers/WebhookApiHelper.js +10 -11
- package/dist/lib/helpers/WebhookApiHelper.js.map +1 -1
- package/dist/lib/helpers/WebhookUiHelper.js +27 -11
- package/dist/lib/helpers/WebhookUiHelper.js.map +1 -1
- package/dist/lib/helpers/WelcomeDashboardUiHelper.js +1 -1
- package/dist/lib/helpers/WelcomeDashboardUiHelper.js.map +1 -1
- package/dist/lib/helpers/differentAppSettingsHelpers/ExternalLoginUiHelpers.js +9 -4
- package/dist/lib/helpers/differentAppSettingsHelpers/ExternalLoginUiHelpers.js.map +1 -1
- package/dist/lib/helpers/differentAppSettingsHelpers/InstallUiHelper.js +10 -5
- package/dist/lib/helpers/differentAppSettingsHelpers/InstallUiHelper.js.map +1 -1
- package/dist/lib/helpers/index.d.ts +4 -1
- package/dist/lib/helpers/index.js +9 -3
- package/dist/lib/helpers/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/lib/helpers/BasePage.d.ts +0 -449
- package/dist/lib/helpers/BasePage.js +0 -547
- package/dist/lib/helpers/BasePage.js.map +0 -1
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DataTypeUiHelper = void 0;
|
|
4
4
|
const test_1 = require("@playwright/test");
|
|
5
5
|
const UiBaseLocators_1 = require("./UiBaseLocators");
|
|
6
|
-
const ConstantHelper_1 = require("./ConstantHelper");
|
|
7
6
|
class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
8
7
|
moveToBtn;
|
|
9
8
|
duplicateToBtn;
|
|
@@ -321,46 +320,57 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
321
320
|
}
|
|
322
321
|
async goToDataType(dataTypeName) {
|
|
323
322
|
await this.clickRootFolderCaretButton();
|
|
324
|
-
await
|
|
323
|
+
await (0, test_1.expect)(this.sectionSidebar.getByLabel(dataTypeName, { exact: true })).toBeVisible();
|
|
324
|
+
await this.sectionSidebar.getByLabel(dataTypeName, { exact: true }).click();
|
|
325
325
|
}
|
|
326
326
|
async clickMoveToButton() {
|
|
327
|
-
await
|
|
327
|
+
await (0, test_1.expect)(this.moveToBtn).toBeVisible();
|
|
328
|
+
await this.moveToBtn.click();
|
|
328
329
|
}
|
|
329
330
|
async clickDuplicateToButton() {
|
|
330
|
-
await
|
|
331
|
+
await (0, test_1.expect)(this.duplicateToBtn).toBeVisible();
|
|
332
|
+
await this.duplicateToBtn.click();
|
|
331
333
|
}
|
|
332
334
|
async waitForDataTypeToBeCreated() {
|
|
333
|
-
await this.waitForLoadState();
|
|
335
|
+
await this.page.waitForLoadState();
|
|
334
336
|
}
|
|
335
337
|
async isDataTypeTreeItemVisible(name, isVisible = true) {
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
338
|
+
{
|
|
339
|
+
const hasShowChildren = await this.dataTypeTreeRoot.getAttribute('show-children') !== null;
|
|
340
|
+
if (!hasShowChildren) {
|
|
341
|
+
await this.dataTypeTreeRoot.locator(this.caretBtn).first().click();
|
|
342
|
+
}
|
|
343
|
+
await this.isTreeItemVisible(name, isVisible);
|
|
339
344
|
}
|
|
340
|
-
await this.isTreeItemVisible(name, isVisible);
|
|
341
345
|
}
|
|
342
346
|
async waitForDataTypeToBeDeleted() {
|
|
343
|
-
await this.waitForLoadState();
|
|
347
|
+
await this.page.waitForLoadState();
|
|
344
348
|
}
|
|
345
349
|
async waitForDataTypeToBeRenamed() {
|
|
346
|
-
await this.waitForLoadState();
|
|
350
|
+
await this.page.waitForLoadState();
|
|
347
351
|
}
|
|
348
352
|
async clickNewDataTypeButton() {
|
|
349
|
-
await
|
|
353
|
+
await (0, test_1.expect)(this.newDataTypeBtn).toBeVisible();
|
|
354
|
+
await this.newDataTypeBtn.click();
|
|
350
355
|
}
|
|
351
356
|
async clickNewDataTypeFolderButton() {
|
|
352
|
-
await
|
|
357
|
+
await (0, test_1.expect)(this.newFolderBtn).toBeVisible();
|
|
358
|
+
await this.newFolderBtn.click();
|
|
353
359
|
}
|
|
354
360
|
async enterDataTypeName(name) {
|
|
355
|
-
await
|
|
356
|
-
await this.
|
|
361
|
+
await (0, test_1.expect)(this.dataTypeNameTxt).toBeVisible();
|
|
362
|
+
await this.dataTypeNameTxt.click();
|
|
363
|
+
await this.dataTypeNameTxt.clear();
|
|
364
|
+
await this.dataTypeNameTxt.fill(name);
|
|
357
365
|
}
|
|
358
366
|
async clickCreateFolderButton() {
|
|
359
|
-
await
|
|
360
|
-
await this.
|
|
367
|
+
await (0, test_1.expect)(this.createFolderBtn).toBeVisible();
|
|
368
|
+
await this.createDataTypeFolderBtn.click();
|
|
369
|
+
await this.page.waitForTimeout(500); // Wait for the action to complete
|
|
361
370
|
}
|
|
362
371
|
async clickUpdateFolderButton() {
|
|
363
|
-
await
|
|
372
|
+
await (0, test_1.expect)(this.updateDataTypeFolderBtn).toBeVisible();
|
|
373
|
+
await this.updateDataTypeFolderBtn.click();
|
|
364
374
|
}
|
|
365
375
|
async deleteDataType(name) {
|
|
366
376
|
await this.clickActionsMenuForDataType(name);
|
|
@@ -372,24 +382,27 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
372
382
|
}
|
|
373
383
|
async moveDataTypeToFolder(folderName) {
|
|
374
384
|
await this.clickMoveToActionMenuOption();
|
|
375
|
-
await
|
|
376
|
-
await this.click(
|
|
385
|
+
await (0, test_1.expect)(this.sidebarModal.getByText(folderName, { exact: true })).toBeVisible();
|
|
386
|
+
await this.sidebarModal.getByText(folderName, { exact: true }).click();
|
|
387
|
+
await this.chooseModalBtn.click();
|
|
377
388
|
}
|
|
378
389
|
async duplicateDataTypeToFolder(folderName) {
|
|
379
390
|
await this.clickDuplicateToActionMenuOption();
|
|
380
|
-
await
|
|
381
|
-
await this.click(
|
|
391
|
+
await (0, test_1.expect)(this.sidebarModal.getByText(folderName, { exact: true })).toBeVisible();
|
|
392
|
+
await this.sidebarModal.getByText(folderName, { exact: true }).click();
|
|
393
|
+
await this.duplicateBtn.click();
|
|
382
394
|
}
|
|
383
395
|
async addMediaStartNode(mediaName) {
|
|
384
|
-
await
|
|
396
|
+
await (0, test_1.expect)(this.mediaCardItems.filter({ hasText: mediaName })).toBeVisible();
|
|
397
|
+
await this.mediaCardItems.filter({ hasText: mediaName }).click();
|
|
385
398
|
await this.clickChooseModalButton();
|
|
386
399
|
}
|
|
387
400
|
async addContentStartNode(contentName) {
|
|
388
401
|
await this.clickTextButtonWithName(contentName);
|
|
389
|
-
await this.click(
|
|
402
|
+
await this.chooseModalBtn.click();
|
|
390
403
|
}
|
|
391
404
|
async clickSelectAPropertyEditorButton() {
|
|
392
|
-
await this.click(
|
|
405
|
+
await this.selectAPropertyEditorBtn.click();
|
|
393
406
|
}
|
|
394
407
|
async selectAPropertyEditor(propertyName, filterKeyword) {
|
|
395
408
|
await this.typeToFilterTxt.fill(filterKeyword ? filterKeyword : propertyName);
|
|
@@ -397,215 +410,260 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
397
410
|
}
|
|
398
411
|
// Approved Color
|
|
399
412
|
async clickIncludeLabelsToggle() {
|
|
400
|
-
await this.click(
|
|
413
|
+
await this.includeLabelsToggle.click();
|
|
401
414
|
}
|
|
402
415
|
async removeColorByValue(value) {
|
|
403
|
-
await this.
|
|
404
|
-
await this.click(
|
|
416
|
+
await this.page.locator('[value="' + value + '"] uui-button svg').click();
|
|
417
|
+
await this.confirmToDeleteBtn.click();
|
|
405
418
|
}
|
|
406
419
|
async addColor(value) {
|
|
407
|
-
await this.click(
|
|
408
|
-
await this.
|
|
420
|
+
await this.addColorBtn.click();
|
|
421
|
+
await this.colorValueTxt.clear();
|
|
422
|
+
await this.colorValueTxt.fill(value);
|
|
409
423
|
}
|
|
410
424
|
// Label
|
|
411
425
|
async changeValueType(valueType) {
|
|
412
|
-
await this.
|
|
426
|
+
await this.page.getByLabel('Select a value type').selectOption({ label: valueType });
|
|
413
427
|
}
|
|
414
428
|
// Date Picker
|
|
415
429
|
async clickOffsetTimeToggle() {
|
|
416
|
-
await this.click(
|
|
430
|
+
await this.offsetTimeToggle.click();
|
|
417
431
|
}
|
|
418
432
|
async enterDateFormatValue(value) {
|
|
419
|
-
await this.
|
|
433
|
+
await this.dateFormatTxt.clear();
|
|
434
|
+
await this.dateFormatTxt.fill(value);
|
|
420
435
|
}
|
|
421
436
|
// List View
|
|
422
437
|
async enterPageSizeValue(value) {
|
|
423
|
-
await this.
|
|
438
|
+
await this.pageSizeTxt.clear();
|
|
439
|
+
await this.pageSizeTxt.fill(value);
|
|
424
440
|
}
|
|
425
441
|
async chooseOrderDirection(isAscending) {
|
|
426
442
|
if (isAscending) {
|
|
427
|
-
await this.click(
|
|
443
|
+
await this.ascendingRadioBtn.click();
|
|
428
444
|
}
|
|
429
445
|
else {
|
|
430
|
-
await this.click(
|
|
446
|
+
await this.descendingRadioBtn.click();
|
|
431
447
|
}
|
|
432
448
|
}
|
|
433
449
|
async addColumnDisplayed(contentType, contentName, propertyAlias) {
|
|
434
|
-
await this.click(
|
|
450
|
+
await this.chooseColumnsDisplayedBtn.click();
|
|
435
451
|
await this.clickTextButtonWithName(contentType);
|
|
436
452
|
await this.clickTextButtonWithName(contentName);
|
|
437
453
|
await this.clickChooseContainerButton();
|
|
438
454
|
await this.clickTextButtonWithName(propertyAlias);
|
|
439
455
|
}
|
|
440
456
|
async removeColumnDisplayed(propertyAlias) {
|
|
441
|
-
await this.
|
|
457
|
+
await this.columnsDisplayedItems.filter({ has: this.page.getByText(propertyAlias, { exact: true }) }).getByText('Remove').click();
|
|
442
458
|
}
|
|
443
459
|
async addLayouts(layoutName) {
|
|
444
|
-
await
|
|
445
|
-
await this.click(
|
|
460
|
+
await (0, test_1.expect)(this.chooseLayoutsBtn).toBeVisible();
|
|
461
|
+
await this.chooseLayoutsBtn.click();
|
|
462
|
+
await (0, test_1.expect)(this.page.locator('[name="' + layoutName + '"]')).toBeVisible();
|
|
463
|
+
await this.page.locator('[name="' + layoutName + '"]').click();
|
|
446
464
|
}
|
|
447
465
|
async removeLayouts(layoutAlias) {
|
|
448
|
-
await this.
|
|
466
|
+
await this.layoutsItems.filter({ has: this.page.getByText(layoutAlias, { exact: true }) }).getByText('Remove').click();
|
|
449
467
|
}
|
|
450
468
|
async chooseOrderByValue(value) {
|
|
451
|
-
await this.
|
|
469
|
+
await this.orderByDropDownBox.selectOption({ label: value });
|
|
452
470
|
}
|
|
453
471
|
async enterWorkspaceViewName(name) {
|
|
454
|
-
await this.
|
|
472
|
+
await this.workspaceViewName.clear();
|
|
473
|
+
await this.workspaceViewName.fill(name);
|
|
455
474
|
}
|
|
456
475
|
async clickShowContentWorkspaceViewFirstToggle() {
|
|
457
|
-
await this.click(
|
|
476
|
+
await this.showWorkspaceViewFirstToggle.click();
|
|
458
477
|
}
|
|
459
478
|
async clickEditInInfiniteEditorToggle() {
|
|
460
|
-
await this.click(
|
|
479
|
+
await this.editInInfiniteEditorToggle.click();
|
|
461
480
|
}
|
|
462
481
|
async clickBulkActionPermissionsToggleByValue(value) {
|
|
463
|
-
await this.
|
|
482
|
+
await this.page.locator("uui-toggle[label='" + value + "'] #toggle").click();
|
|
464
483
|
}
|
|
465
484
|
async clickSelectIconButton() {
|
|
485
|
+
await (0, test_1.expect)(this.selectIconBtn).toBeVisible();
|
|
466
486
|
// Force click is needed
|
|
467
|
-
await this.click(
|
|
487
|
+
await this.selectIconBtn.click({ force: true });
|
|
468
488
|
}
|
|
469
489
|
async chooseWorkspaceViewIconByValue(value) {
|
|
470
|
-
await this.
|
|
471
|
-
await this.click(
|
|
490
|
+
await this.page.locator('[label="' + value + '"] svg').click();
|
|
491
|
+
await this.submitBtn.click();
|
|
472
492
|
}
|
|
473
493
|
// Image Cropper
|
|
474
494
|
async enterCropValues(label, alias, width, height) {
|
|
475
|
-
await
|
|
476
|
-
await this.
|
|
477
|
-
await this.
|
|
478
|
-
await
|
|
495
|
+
await (0, test_1.expect)(this.labelTxt).toBeVisible();
|
|
496
|
+
await this.labelTxt.clear();
|
|
497
|
+
await this.labelTxt.fill(label);
|
|
498
|
+
await (0, test_1.expect)(this.aliasTxt).toBeVisible();
|
|
499
|
+
await this.aliasTxt.clear();
|
|
500
|
+
await this.aliasTxt.fill(alias);
|
|
501
|
+
await (0, test_1.expect)(this.widthTxt).toBeVisible();
|
|
502
|
+
await this.widthTxt.clear();
|
|
503
|
+
await this.widthTxt.fill(width);
|
|
504
|
+
await this.heightTxt.clear();
|
|
505
|
+
await this.heightTxt.fill(height);
|
|
479
506
|
}
|
|
480
507
|
async clickCreateCropButton() {
|
|
481
|
-
await
|
|
508
|
+
await (0, test_1.expect)(this.createCropBtn).toBeVisible();
|
|
509
|
+
await this.createCropBtn.click();
|
|
482
510
|
}
|
|
483
511
|
async clickEditCropButton() {
|
|
484
|
-
await
|
|
512
|
+
await (0, test_1.expect)(this.editCropBtn).toBeVisible();
|
|
513
|
+
await this.editCropBtn.click();
|
|
485
514
|
}
|
|
486
515
|
async editCropByAlias(alias) {
|
|
487
|
-
await
|
|
516
|
+
await (0, test_1.expect)(this.page.locator('.crop').filter({ has: this.page.getByText(alias) }).getByText('Edit')).toBeVisible();
|
|
517
|
+
await this.page.locator('.crop').filter({ has: this.page.getByText(alias) }).getByText('Edit').click();
|
|
488
518
|
}
|
|
489
519
|
async removeCropByAlias(alias) {
|
|
490
|
-
await
|
|
520
|
+
await (0, test_1.expect)(this.page.locator('.crop').filter({ has: this.page.getByText(alias) }).getByText('Remove')).toBeVisible();
|
|
521
|
+
await this.page.locator('.crop').filter({ has: this.page.getByText(alias) }).getByText('Remove').click();
|
|
491
522
|
}
|
|
492
523
|
// Numeric
|
|
493
524
|
async enterMinimumValue(value) {
|
|
494
|
-
await
|
|
525
|
+
await (0, test_1.expect)(this.minimumTxt).toBeVisible();
|
|
526
|
+
await this.minimumTxt.clear();
|
|
527
|
+
await this.minimumTxt.fill(value);
|
|
495
528
|
}
|
|
496
529
|
async enterMaximumValue(value) {
|
|
497
|
-
await
|
|
530
|
+
await (0, test_1.expect)(this.maximumTxt).toBeVisible();
|
|
531
|
+
await this.maximumTxt.clear();
|
|
532
|
+
await this.maximumTxt.fill(value);
|
|
498
533
|
}
|
|
499
534
|
async enterStepSizeValue(value) {
|
|
500
|
-
await
|
|
535
|
+
await (0, test_1.expect)(this.stepSizeTxt).toBeVisible();
|
|
536
|
+
await this.stepSizeTxt.clear();
|
|
537
|
+
await this.stepSizeTxt.fill(value);
|
|
501
538
|
}
|
|
502
539
|
async clickAllowDecimalsToggle() {
|
|
503
|
-
await
|
|
540
|
+
await (0, test_1.expect)(this.allowDecimalsToggle).toBeVisible();
|
|
541
|
+
await this.allowDecimalsToggle.click();
|
|
504
542
|
}
|
|
505
543
|
// Radiobox
|
|
506
544
|
async removeOptionByName(name) {
|
|
507
|
-
await
|
|
508
|
-
await this.click(
|
|
545
|
+
await (0, test_1.expect)(this.page.locator("uui-button[label='Remove " + name + "'] svg")).toBeVisible();
|
|
546
|
+
await this.page.locator("uui-button[label='Remove " + name + "'] svg").click();
|
|
547
|
+
await this.confirmToDeleteBtn.click();
|
|
509
548
|
}
|
|
510
549
|
async enterOptionName(name) {
|
|
511
|
-
await
|
|
550
|
+
await (0, test_1.expect)(this.optionTxt.last()).toBeVisible();
|
|
551
|
+
await this.optionTxt.last().clear();
|
|
552
|
+
await this.optionTxt.last().fill(name);
|
|
512
553
|
}
|
|
513
554
|
async clickAddOptionButton() {
|
|
514
|
-
await
|
|
555
|
+
await (0, test_1.expect)(this.addOptionBtn).toBeVisible();
|
|
556
|
+
await this.addOptionBtn.click();
|
|
515
557
|
}
|
|
516
558
|
// Textarea - Textstring
|
|
517
559
|
async enterMaximumAllowedCharactersValue(value) {
|
|
518
|
-
await
|
|
560
|
+
await (0, test_1.expect)(this.maximumAllowedCharsTxt).toBeVisible();
|
|
561
|
+
await this.maximumAllowedCharsTxt.clear();
|
|
562
|
+
await this.maximumAllowedCharsTxt.fill(value);
|
|
519
563
|
}
|
|
520
564
|
async enterNumberOfRowsValue(value) {
|
|
521
|
-
await
|
|
565
|
+
await (0, test_1.expect)(this.numberOfRowsTxt).toBeVisible();
|
|
566
|
+
await this.numberOfRowsTxt.clear();
|
|
567
|
+
await this.numberOfRowsTxt.fill(value);
|
|
522
568
|
}
|
|
523
569
|
async enterMaxHeightValue(value) {
|
|
524
|
-
await
|
|
570
|
+
await (0, test_1.expect)(this.maxHeightTxt).toBeVisible();
|
|
571
|
+
await this.maxHeightTxt.clear();
|
|
572
|
+
await this.maxHeightTxt.fill(value);
|
|
525
573
|
}
|
|
526
574
|
async enterMinHeightValue(value) {
|
|
527
|
-
await this.
|
|
575
|
+
await this.minHeightTxt.clear();
|
|
576
|
+
await this.minHeightTxt.fill(value);
|
|
528
577
|
}
|
|
529
578
|
// Upload
|
|
530
579
|
async enterAcceptedFileExtensions(value) {
|
|
531
|
-
await this.
|
|
580
|
+
await this.acceptedFileExtensionsTxt.last().clear();
|
|
581
|
+
await this.acceptedFileExtensionsTxt.last().fill(value);
|
|
532
582
|
}
|
|
533
583
|
async removeAcceptedFileExtensionsByValue(value) {
|
|
534
|
-
await this.
|
|
535
|
-
await this.click(
|
|
584
|
+
await this.page.locator("uui-button[label='Remove " + value + "'] svg").click();
|
|
585
|
+
await this.confirmToDeleteBtn.click();
|
|
536
586
|
}
|
|
537
587
|
async clickAddAcceptedFileExtensionsButton() {
|
|
538
|
-
await this.click(
|
|
588
|
+
await this.addAcceptedFileExtensionsBtn.click();
|
|
539
589
|
}
|
|
540
590
|
// Multi URL Picker
|
|
541
591
|
async enterMinimumNumberOfItemsValue(value) {
|
|
542
|
-
await this.
|
|
592
|
+
await this.minimumNumberOfItemsTxt.clear();
|
|
593
|
+
await this.minimumNumberOfItemsTxt.fill(value);
|
|
543
594
|
}
|
|
544
595
|
async enterMaximumNumberOfItemsValue(value) {
|
|
545
|
-
await this.
|
|
596
|
+
await this.maximumNumberOfItemsTxt.clear();
|
|
597
|
+
await this.maximumNumberOfItemsTxt.fill(value);
|
|
546
598
|
}
|
|
547
599
|
async clickIgnoreUserStartNodesToggle() {
|
|
548
|
-
await this.click(
|
|
600
|
+
await this.ignoreUserStartNodesToggle.click();
|
|
549
601
|
}
|
|
550
602
|
async chooseOverlaySizeByValue(value) {
|
|
551
|
-
await this.
|
|
603
|
+
await this.overlaySizeDropDownBox.selectOption({ value: value });
|
|
552
604
|
}
|
|
553
605
|
async clickHideAnchorQueryStringInputToggle() {
|
|
554
|
-
await this.click(
|
|
606
|
+
await this.hideAnchorQueryStringInputToggle.click();
|
|
555
607
|
}
|
|
556
608
|
// Media Picker
|
|
557
609
|
async clickPickMultipleItemsToggle() {
|
|
558
|
-
await this.click(
|
|
610
|
+
await this.pickMultipleItemsToggle.click();
|
|
559
611
|
}
|
|
560
612
|
async clickEnableFocalPointToggle() {
|
|
561
|
-
await
|
|
613
|
+
await (0, test_1.expect)(this.enableFocalPointToggle).toBeVisible();
|
|
614
|
+
await this.enableFocalPointToggle.click();
|
|
562
615
|
}
|
|
563
616
|
async enterAmountValue(lowValue, highValue) {
|
|
564
|
-
await this.
|
|
565
|
-
await this.
|
|
617
|
+
await this.amountLowValueTxt.clear();
|
|
618
|
+
await this.amountLowValueTxt.fill(lowValue);
|
|
619
|
+
await this.amountHighValueTxt.clear();
|
|
620
|
+
await this.amountHighValueTxt.fill(highValue);
|
|
566
621
|
}
|
|
567
622
|
async addAcceptedType(mediaTypeName) {
|
|
568
|
-
await this.click(
|
|
623
|
+
await this.chooseAcceptedTypesBtn.click();
|
|
569
624
|
await this.clickTextButtonWithName(mediaTypeName);
|
|
570
|
-
await this.click(
|
|
625
|
+
await this.chooseModalBtn.click();
|
|
571
626
|
}
|
|
572
627
|
async removeAcceptedType(mediaTypeName) {
|
|
573
|
-
await this.
|
|
574
|
-
await this.click(
|
|
628
|
+
await this.page.locator('uui-ref-node-document-type[name="' + mediaTypeName + '"]').getByLabel('Remove').click();
|
|
629
|
+
await this.confirmToRemoveBtn.click();
|
|
575
630
|
}
|
|
576
631
|
async removeMediaStartNode(mediaName) {
|
|
577
|
-
await this.
|
|
578
|
-
await this.click(
|
|
632
|
+
await this.page.locator('uui-card-media[name="' + mediaName + '"]').locator('[label="Remove"]').click();
|
|
633
|
+
await this.confirmToRemoveBtn.click();
|
|
579
634
|
}
|
|
580
635
|
async clickChooseStartNodeButton() {
|
|
581
|
-
await this.click(
|
|
636
|
+
await this.chooseStartNodeBtn.click();
|
|
582
637
|
}
|
|
583
638
|
// Richtext Editor
|
|
584
639
|
async clickToolbarOptionByValue(values) {
|
|
585
640
|
for (var index in values) {
|
|
586
|
-
await this.
|
|
641
|
+
await this.toolbarCheckboxes.filter({ has: this.page.getByLabel(values[index]) }).locator('#ticker svg').click();
|
|
587
642
|
}
|
|
588
643
|
}
|
|
589
644
|
async addStylesheet(stylesheetName) {
|
|
590
|
-
await this.click(
|
|
591
|
-
await this.
|
|
592
|
-
await this.click(
|
|
645
|
+
await this.addStylesheetBtn.click();
|
|
646
|
+
await this.page.getByLabel(stylesheetName).click();
|
|
647
|
+
await this.chooseModalBtn.click();
|
|
593
648
|
}
|
|
594
649
|
async enterDimensionsValue(width, height) {
|
|
595
|
-
await this.
|
|
596
|
-
await this.
|
|
650
|
+
await this.dimensionsWidthTxt.clear();
|
|
651
|
+
await this.dimensionsWidthTxt.fill(width);
|
|
652
|
+
await this.dimensionsHeightTxt.clear();
|
|
653
|
+
await this.dimensionsHeightTxt.fill(height);
|
|
597
654
|
}
|
|
598
655
|
async enterMaximumSizeForImages(value) {
|
|
599
|
-
await this.
|
|
656
|
+
await this.maxImageSizeTxt.clear();
|
|
657
|
+
await this.maxImageSizeTxt.fill(value);
|
|
600
658
|
}
|
|
601
659
|
async clickHideLabelToggle() {
|
|
602
|
-
await this.click(
|
|
660
|
+
await this.hideLabelToggle.click();
|
|
603
661
|
}
|
|
604
662
|
async clickInlineRadioButton() {
|
|
605
|
-
await this.click(
|
|
663
|
+
await this.inlineRadioBtn.click();
|
|
606
664
|
}
|
|
607
665
|
async clickChooseWithPlusButton() {
|
|
608
|
-
await this.click(
|
|
666
|
+
await this.chooseWithPlusBtn.click();
|
|
609
667
|
}
|
|
610
668
|
async addImageUploadFolder(mediaFolderName) {
|
|
611
669
|
await this.clickChooseWithPlusButton();
|
|
@@ -613,7 +671,8 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
613
671
|
await this.clickChooseModalButton();
|
|
614
672
|
}
|
|
615
673
|
async clickAddWithPlusButton() {
|
|
616
|
-
await
|
|
674
|
+
await (0, test_1.expect)(this.addWithPlusBtn).toBeVisible();
|
|
675
|
+
await this.addWithPlusBtn.click();
|
|
617
676
|
}
|
|
618
677
|
async addAvailableBlocks(blockName) {
|
|
619
678
|
await this.clickAddWithPlusButton();
|
|
@@ -623,136 +682,187 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
623
682
|
}
|
|
624
683
|
// Tags
|
|
625
684
|
async enterDefineTagGroupValue(value) {
|
|
626
|
-
await
|
|
685
|
+
await (0, test_1.expect)(this.defineTagGroupTxt).toBeVisible();
|
|
686
|
+
await this.defineTagGroupTxt.clear();
|
|
687
|
+
await this.defineTagGroupTxt.fill(value);
|
|
627
688
|
}
|
|
628
689
|
async selectStorageTypeOption(option) {
|
|
629
|
-
await
|
|
690
|
+
await (0, test_1.expect)(this.storageTypeDropDownBox).toBeVisible();
|
|
691
|
+
await this.storageTypeDropDownBox.selectOption({ label: option });
|
|
630
692
|
}
|
|
631
693
|
// Content Picker
|
|
632
694
|
async clickShowOpenButtonToggle() {
|
|
633
|
-
await
|
|
695
|
+
await (0, test_1.expect)(this.showOpenButtonToggle).toBeVisible();
|
|
696
|
+
await this.showOpenButtonToggle.click();
|
|
634
697
|
}
|
|
635
698
|
async removeContentStartNode(contentName) {
|
|
636
|
-
const startNodeLocator = this.entityItem.filter({ has: this.page.locator(
|
|
637
|
-
await
|
|
699
|
+
const startNodeLocator = this.entityItem.filter({ has: this.page.locator('[name="' + contentName + '"]') });
|
|
700
|
+
await startNodeLocator.hover();
|
|
701
|
+
await startNodeLocator.getByLabel('Remove').click();
|
|
638
702
|
await this.clickConfirmRemoveButton();
|
|
639
703
|
}
|
|
640
704
|
// Dropdown
|
|
641
705
|
async clickEnableMultipleChoiceToggle() {
|
|
642
|
-
await
|
|
706
|
+
await (0, test_1.expect)(this.enableMultipleChoiceToggle).toBeVisible();
|
|
707
|
+
await this.enableMultipleChoiceToggle.click();
|
|
643
708
|
}
|
|
644
709
|
async clickAddOptionsButton() {
|
|
645
|
-
await
|
|
710
|
+
await (0, test_1.expect)(this.addOptionsBtn).toBeVisible();
|
|
711
|
+
await this.addOptionsBtn.click();
|
|
646
712
|
}
|
|
647
713
|
// True/false
|
|
648
714
|
async clickPresetValueToggle() {
|
|
649
|
-
await
|
|
715
|
+
await (0, test_1.expect)(this.presetValueToggle).toBeVisible();
|
|
716
|
+
await this.presetValueToggle.click();
|
|
650
717
|
}
|
|
651
718
|
async clickShowToggleLabelsToggle() {
|
|
652
|
-
await
|
|
719
|
+
await (0, test_1.expect)(this.showToggleLabelsToggle).toBeVisible();
|
|
720
|
+
await this.showToggleLabelsToggle.click();
|
|
653
721
|
}
|
|
654
722
|
async enterLabelOnValue(value) {
|
|
655
|
-
await
|
|
723
|
+
await (0, test_1.expect)(this.labelOnTxt).toBeVisible();
|
|
724
|
+
await this.labelOnTxt.clear();
|
|
725
|
+
await this.labelOnTxt.fill(value);
|
|
656
726
|
}
|
|
657
727
|
async enterLabelOffValue(value) {
|
|
658
|
-
await
|
|
728
|
+
await (0, test_1.expect)(this.labelOffTxt).toBeVisible();
|
|
729
|
+
await this.labelOffTxt.clear();
|
|
730
|
+
await this.labelOffTxt.fill(value);
|
|
659
731
|
}
|
|
660
732
|
// Block List Editor
|
|
661
733
|
async clickAddBlockButton(index = 0) {
|
|
662
|
-
await
|
|
734
|
+
await (0, test_1.expect)(this.addBlockBtn.nth(index)).toBeVisible();
|
|
735
|
+
await this.addBlockBtn.nth(index).click();
|
|
663
736
|
}
|
|
664
737
|
async clickRemoveBlockWithName(name) {
|
|
665
738
|
const blockWithNameLocator = this.page.locator('umb-block-type-card', { hasText: name });
|
|
666
|
-
|
|
667
|
-
|
|
739
|
+
await (0, test_1.expect)(blockWithNameLocator).toBeVisible();
|
|
740
|
+
// The force click is necessary.
|
|
741
|
+
await blockWithNameLocator.getByLabel('Remove block').click({ force: true });
|
|
668
742
|
}
|
|
669
743
|
async enterMinAmount(value) {
|
|
670
|
-
await
|
|
744
|
+
await (0, test_1.expect)(this.minAmountTxt).toBeVisible();
|
|
745
|
+
await this.minAmountTxt.clear();
|
|
746
|
+
await this.minAmountTxt.fill(value);
|
|
671
747
|
}
|
|
672
748
|
async enterMaxAmount(value) {
|
|
673
|
-
await
|
|
749
|
+
await (0, test_1.expect)(this.maxAmountTxt).toBeVisible();
|
|
750
|
+
await this.maxAmountTxt.clear();
|
|
751
|
+
await this.maxAmountTxt.fill(value);
|
|
674
752
|
}
|
|
675
753
|
async doesAmountContainErrorMessageWithText(errorMessage) {
|
|
676
|
-
await
|
|
754
|
+
return await (0, test_1.expect)(this.page.getByText(errorMessage)).toBeVisible();
|
|
677
755
|
}
|
|
678
756
|
async clickSingleBlockMode() {
|
|
679
|
-
await
|
|
757
|
+
await (0, test_1.expect)(this.singleBlockModeBtn).toBeVisible();
|
|
758
|
+
await this.singleBlockModeBtn.click();
|
|
680
759
|
}
|
|
681
760
|
async clickLiveEditingMode() {
|
|
682
|
-
await
|
|
761
|
+
await (0, test_1.expect)(this.liveEditingModeBtn).toBeVisible();
|
|
762
|
+
await this.liveEditingModeBtn.click();
|
|
683
763
|
}
|
|
684
764
|
async clickInlineEditingMode() {
|
|
685
|
-
await
|
|
765
|
+
await (0, test_1.expect)(this.inlineEditingModeBtn).toBeVisible();
|
|
766
|
+
await this.inlineEditingModeBtn.click();
|
|
686
767
|
}
|
|
687
768
|
async enterPropertyEditorWidth(width) {
|
|
688
|
-
await
|
|
769
|
+
await (0, test_1.expect)(this.propertyEditorWidthTxt).toBeVisible();
|
|
770
|
+
await this.propertyEditorWidthTxt.clear();
|
|
771
|
+
await this.propertyEditorWidthTxt.fill(width);
|
|
689
772
|
}
|
|
690
773
|
async goToBlockWithName(name) {
|
|
691
|
-
await
|
|
774
|
+
await (0, test_1.expect)(this.page.getByRole('link', { name: name })).toBeVisible();
|
|
775
|
+
await this.page.getByRole('link', { name: name }).click();
|
|
692
776
|
}
|
|
693
777
|
async enterBlockLabelText(label) {
|
|
694
778
|
await this.removeBlockLabelText();
|
|
695
779
|
await this.labelTextTxt.fill(label);
|
|
696
780
|
}
|
|
697
781
|
async removeBlockLabelText() {
|
|
698
|
-
await
|
|
782
|
+
await (0, test_1.expect)(this.labelTextTxt).toBeVisible();
|
|
699
783
|
await this.labelTextTxt.clear();
|
|
700
784
|
}
|
|
701
785
|
async clickAllowInRootForBlock() {
|
|
702
|
-
await
|
|
786
|
+
await (0, test_1.expect)(this.allowBlockAtRootToggle).toBeVisible();
|
|
787
|
+
await this.allowBlockAtRootToggle.click();
|
|
703
788
|
}
|
|
704
789
|
async clickAllowInAreasForBlock() {
|
|
705
|
-
await
|
|
790
|
+
await (0, test_1.expect)(this.allowInAreasToggle).toBeVisible();
|
|
791
|
+
await this.allowInAreasToggle.click();
|
|
706
792
|
}
|
|
707
793
|
async updateBlockOverlaySize(size) {
|
|
708
|
-
await
|
|
794
|
+
await (0, test_1.expect)(this.overlaySizeOption).toBeVisible();
|
|
795
|
+
await this.overlaySizeOption.selectOption(size);
|
|
709
796
|
}
|
|
710
797
|
async addBlockContentModel(elementName) {
|
|
711
|
-
await
|
|
798
|
+
await (0, test_1.expect)(this.chooseContentModelBtn).toBeVisible();
|
|
799
|
+
await this.chooseContentModelBtn.click();
|
|
712
800
|
await this.clickButtonWithName(elementName);
|
|
713
801
|
await this.clickChooseButton();
|
|
714
802
|
}
|
|
715
803
|
async addBlockSettingsModel(elementName) {
|
|
716
|
-
await
|
|
804
|
+
await (0, test_1.expect)(this.chooseSettingsModelBtn).toBeVisible();
|
|
805
|
+
await this.chooseSettingsModelBtn.click();
|
|
717
806
|
await this.clickModalMenuItemWithName(elementName);
|
|
718
807
|
await this.clickChooseModalButton();
|
|
719
808
|
}
|
|
720
809
|
async removeBlockContentModel() {
|
|
721
|
-
await
|
|
810
|
+
await (0, test_1.expect)(this.contentModelNode).toBeVisible();
|
|
811
|
+
await this.contentModelNode.hover();
|
|
812
|
+
await (0, test_1.expect)(this.removeExactContentModelNodeBtn).toBeVisible();
|
|
813
|
+
await this.removeExactContentModelNodeBtn.click();
|
|
722
814
|
}
|
|
723
815
|
async removeBlockSettingsModel() {
|
|
724
|
-
await
|
|
816
|
+
await (0, test_1.expect)(this.settingsModelNode).toBeVisible();
|
|
817
|
+
await this.settingsModelNode.hover();
|
|
818
|
+
await (0, test_1.expect)(this.removeExactSettingsModelNodeBtn).toBeVisible();
|
|
819
|
+
await this.removeExactSettingsModelNodeBtn.click();
|
|
725
820
|
}
|
|
726
821
|
async openBlockContentModel() {
|
|
727
|
-
await
|
|
822
|
+
await (0, test_1.expect)(this.contentModelNode).toBeVisible();
|
|
823
|
+
await this.contentModelNode.hover();
|
|
824
|
+
await (0, test_1.expect)(this.openBtn).toBeVisible();
|
|
825
|
+
await this.openBtn.click();
|
|
728
826
|
}
|
|
729
827
|
async openBlockSettingsModel() {
|
|
730
|
-
await
|
|
828
|
+
await (0, test_1.expect)(this.settingsModelNode).toBeVisible();
|
|
829
|
+
await this.settingsModelNode.hover();
|
|
830
|
+
await (0, test_1.expect)(this.openBtn).toBeVisible();
|
|
831
|
+
await this.openBtn.click();
|
|
731
832
|
}
|
|
732
833
|
async isElementWorkspaceOpenInBlock(elementTypeName) {
|
|
733
|
-
await
|
|
834
|
+
return await (0, test_1.expect)(this.documentTypeWorkspace.filter({ hasText: elementTypeName })).toBeVisible();
|
|
734
835
|
}
|
|
735
836
|
async selectBlockBackgroundColor(color) {
|
|
736
|
-
await
|
|
737
|
-
await this.
|
|
837
|
+
await (0, test_1.expect)(this.backgroundColorBtn).toBeVisible();
|
|
838
|
+
await this.backgroundColorBtn.click();
|
|
839
|
+
await this.backgroundColorTxt.clear();
|
|
840
|
+
await this.backgroundColorTxt.fill(color);
|
|
738
841
|
}
|
|
739
842
|
async selectBlockIconColor(color) {
|
|
740
|
-
await
|
|
741
|
-
await this.
|
|
843
|
+
await (0, test_1.expect)(this.iconColorBtn).toBeVisible();
|
|
844
|
+
await this.iconColorBtn.click();
|
|
845
|
+
await this.iconColorTxt.clear();
|
|
846
|
+
await this.iconColorTxt.fill(color);
|
|
742
847
|
}
|
|
743
848
|
async clickExpandChildItemsForMediaButton() {
|
|
744
|
-
await
|
|
849
|
+
await (0, test_1.expect)(this.expandChildItemsForMediaBtn).toBeVisible();
|
|
850
|
+
await this.expandChildItemsForMediaBtn.click();
|
|
745
851
|
}
|
|
746
852
|
async clickRemoveCustomStylesheetWithName(name) {
|
|
747
|
-
await
|
|
748
|
-
await this.click(
|
|
853
|
+
await (0, test_1.expect)(this.customStylesheetLabel.locator('[name="' + name + '"]')).toBeVisible();
|
|
854
|
+
await this.customStylesheetLabel.locator('[name="' + name + '"]').click();
|
|
855
|
+
await (0, test_1.expect)(this.stylesheetRemoveBtn).toBeVisible();
|
|
856
|
+
await this.stylesheetRemoveBtn.click();
|
|
749
857
|
await this.clickConfirmRemoveButton();
|
|
750
858
|
}
|
|
751
859
|
async clickBlockGridHideContentEditorButton() {
|
|
752
|
-
await
|
|
860
|
+
await (0, test_1.expect)(this.hideContentEditorBlockGridBtn).toBeVisible();
|
|
861
|
+
await this.hideContentEditorBlockGridBtn.click();
|
|
753
862
|
}
|
|
754
863
|
async chooseBlockCustomStylesheetWithName(name) {
|
|
755
|
-
await
|
|
864
|
+
await (0, test_1.expect)(this.chooseCustomStylesheetBtn).toBeVisible();
|
|
865
|
+
await this.chooseCustomStylesheetBtn.click();
|
|
756
866
|
await this.openCaretButtonForName('wwwroot');
|
|
757
867
|
await this.openCaretButtonForName('css');
|
|
758
868
|
await this.clickLabelWithName(name, true);
|
|
@@ -760,7 +870,8 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
760
870
|
}
|
|
761
871
|
async chooseBlockThumbnailWithPath(mediaPath) {
|
|
762
872
|
const mediaItems = mediaPath.split('/media/')[1].split('/');
|
|
763
|
-
await
|
|
873
|
+
await (0, test_1.expect)(this.chooseThumbnailAlias).toBeVisible();
|
|
874
|
+
await this.chooseThumbnailAlias.click();
|
|
764
875
|
await this.openCaretButtonForName('wwwroot', true);
|
|
765
876
|
await this.clickExpandChildItemsForMediaButton();
|
|
766
877
|
for (let i = 0; i < mediaItems.length; i++) {
|
|
@@ -768,22 +879,27 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
768
879
|
await this.clickLabelWithName(mediaItems[i], true);
|
|
769
880
|
}
|
|
770
881
|
else {
|
|
771
|
-
await this.
|
|
882
|
+
await this.sidebarModal.locator('uui-menu-item[label="' + mediaItems[i] + '"] #caret-button').click();
|
|
772
883
|
}
|
|
773
884
|
}
|
|
774
885
|
await this.clickChooseModalButton();
|
|
775
886
|
}
|
|
776
887
|
async clickBlockListHideContentEditorButton() {
|
|
777
|
-
await
|
|
888
|
+
await (0, test_1.expect)(this.hideContentEditorBlockListBtn).toBeVisible();
|
|
889
|
+
await this.hideContentEditorBlockListBtn.click();
|
|
778
890
|
}
|
|
779
891
|
async enterEditorWidth(value) {
|
|
780
|
-
await
|
|
892
|
+
await (0, test_1.expect)(this.editorWidthTxt).toBeVisible();
|
|
893
|
+
await this.editorWidthTxt.clear();
|
|
894
|
+
await this.editorWidthTxt.fill(value);
|
|
781
895
|
}
|
|
782
896
|
async enterCreateButtonLabel(value) {
|
|
783
|
-
await
|
|
897
|
+
await (0, test_1.expect)(this.createButtonLabelTxt).toBeVisible();
|
|
898
|
+
await this.createButtonLabelTxt.clear();
|
|
899
|
+
await this.createButtonLabelTxt.fill(value);
|
|
784
900
|
}
|
|
785
901
|
async enterGridColumns(value) {
|
|
786
|
-
await
|
|
902
|
+
await (0, test_1.expect)(this.gridColumnsTxt).toBeVisible();
|
|
787
903
|
await this.gridColumnsTxt.clear();
|
|
788
904
|
if (value === undefined) {
|
|
789
905
|
return;
|
|
@@ -791,18 +907,21 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
791
907
|
await this.gridColumnsTxt.fill(value.toString());
|
|
792
908
|
}
|
|
793
909
|
async clickShowResizeOptions() {
|
|
794
|
-
await
|
|
910
|
+
await (0, test_1.expect)(this.showResizeOptionsBtn).toBeVisible();
|
|
911
|
+
await this.showResizeOptionsBtn.click();
|
|
795
912
|
}
|
|
796
913
|
async clickAvailableColumnSpans(columnSpans) {
|
|
797
914
|
for (let index in columnSpans) {
|
|
798
|
-
await
|
|
915
|
+
await (0, test_1.expect)(this.columnSpanOptions.getByLabel(columnSpans[index].toString(), { exact: true })).toBeVisible();
|
|
916
|
+
await this.columnSpanOptions.getByLabel(columnSpans[index].toString(), { exact: true }).click();
|
|
799
917
|
}
|
|
800
918
|
}
|
|
801
919
|
async goToBlockAreasTab() {
|
|
802
|
-
await
|
|
920
|
+
await (0, test_1.expect)(this.areasTabBtn).toBeVisible();
|
|
921
|
+
await this.areasTabBtn.click();
|
|
803
922
|
}
|
|
804
923
|
async enterMinRowSpan(value) {
|
|
805
|
-
await
|
|
924
|
+
await (0, test_1.expect)(this.availableRowSpansLowValueTxt).toBeVisible();
|
|
806
925
|
await this.availableRowSpansLowValueTxt.clear();
|
|
807
926
|
if (value === undefined) {
|
|
808
927
|
return;
|
|
@@ -810,7 +929,7 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
810
929
|
await this.availableRowSpansLowValueTxt.fill(value.toString());
|
|
811
930
|
}
|
|
812
931
|
async enterMaxRowSpan(value) {
|
|
813
|
-
await
|
|
932
|
+
await (0, test_1.expect)(this.availableRowSpansHighValueTxt).toBeVisible();
|
|
814
933
|
await this.availableRowSpansHighValueTxt.clear();
|
|
815
934
|
if (value === undefined) {
|
|
816
935
|
return;
|
|
@@ -818,7 +937,7 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
818
937
|
await this.availableRowSpansHighValueTxt.fill(value.toString());
|
|
819
938
|
}
|
|
820
939
|
async enterGridColumnsForArea(value) {
|
|
821
|
-
await
|
|
940
|
+
await (0, test_1.expect)(this.areaGridColumnsTxt).toBeVisible();
|
|
822
941
|
await this.areaGridColumnsTxt.clear();
|
|
823
942
|
if (value === undefined) {
|
|
824
943
|
return;
|
|
@@ -826,28 +945,32 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
826
945
|
await this.areaGridColumnsTxt.fill(value.toString());
|
|
827
946
|
}
|
|
828
947
|
async addAreaButton() {
|
|
829
|
-
await
|
|
948
|
+
await (0, test_1.expect)(this.addAreaBtn).toBeVisible();
|
|
949
|
+
await this.addAreaBtn.click();
|
|
830
950
|
}
|
|
831
951
|
async goToAreaByAlias(alias) {
|
|
832
952
|
const editAreaWithAliasLocator = this.blockAreaConfig.filter({ hasText: alias }).getByLabel('edit');
|
|
833
|
-
|
|
834
|
-
await
|
|
953
|
+
await (0, test_1.expect)(editAreaWithAliasLocator).toBeVisible();
|
|
954
|
+
await editAreaWithAliasLocator.click({ force: true });
|
|
835
955
|
}
|
|
836
956
|
async clickRemoveAreaByAlias(alias) {
|
|
837
957
|
const removeAreaWithAliasLocator = this.blockAreaConfig.filter({ hasText: alias }).getByLabel('delete');
|
|
838
|
-
|
|
839
|
-
await
|
|
958
|
+
await (0, test_1.expect)(removeAreaWithAliasLocator).toBeVisible();
|
|
959
|
+
await removeAreaWithAliasLocator.click({ force: true });
|
|
840
960
|
await this.clickConfirmToDeleteButton();
|
|
841
961
|
}
|
|
842
962
|
async enterAreaAlias(alias) {
|
|
843
|
-
await
|
|
963
|
+
await (0, test_1.expect)(this.aliasAliasTxt).toBeVisible();
|
|
964
|
+
await this.aliasAliasTxt.clear();
|
|
965
|
+
await this.aliasAliasTxt.fill(alias);
|
|
844
966
|
}
|
|
845
967
|
async clickAreaSubmitButton() {
|
|
846
|
-
await
|
|
847
|
-
await this.
|
|
968
|
+
await (0, test_1.expect)(this.blockGridAreaWorkspaceSubmitBtn).toBeVisible();
|
|
969
|
+
await this.blockGridAreaWorkspaceSubmitBtn.click();
|
|
970
|
+
await this.page.waitForTimeout(500);
|
|
848
971
|
}
|
|
849
972
|
async enterCreateButtonLabelInArea(value) {
|
|
850
|
-
await
|
|
973
|
+
await (0, test_1.expect)(this.createLabelTxt.nth(1)).toBeVisible();
|
|
851
974
|
await this.createLabelTxt.nth(1).clear();
|
|
852
975
|
if (value === undefined) {
|
|
853
976
|
return;
|
|
@@ -855,7 +978,7 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
855
978
|
await this.createLabelTxt.nth(1).fill(value);
|
|
856
979
|
}
|
|
857
980
|
async enterMinAllowedInArea(value) {
|
|
858
|
-
await
|
|
981
|
+
await (0, test_1.expect)(this.minAllowedTxt).toBeVisible();
|
|
859
982
|
await this.minAllowedTxt.clear();
|
|
860
983
|
if (value === undefined) {
|
|
861
984
|
return;
|
|
@@ -863,7 +986,7 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
863
986
|
await this.minAllowedTxt.fill(value.toString());
|
|
864
987
|
}
|
|
865
988
|
async enterMaxAllowedInArea(value) {
|
|
866
|
-
await
|
|
989
|
+
await (0, test_1.expect)(this.maxAllowedTxt).toBeVisible();
|
|
867
990
|
await this.maxAllowedTxt.clear();
|
|
868
991
|
if (value === undefined) {
|
|
869
992
|
return;
|
|
@@ -871,61 +994,72 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
871
994
|
await this.maxAllowedTxt.fill(value.toString());
|
|
872
995
|
}
|
|
873
996
|
async clickAddSpecifiedAllowanceButton() {
|
|
874
|
-
await
|
|
997
|
+
await (0, test_1.expect)(this.addSpecifiedAllowanceBtn).toBeVisible();
|
|
998
|
+
await this.addSpecifiedAllowanceBtn.click();
|
|
875
999
|
}
|
|
876
1000
|
async goToBlockAdvancedTab() {
|
|
877
|
-
await
|
|
1001
|
+
await (0, test_1.expect)(this.advancedTabBtn).toBeVisible();
|
|
1002
|
+
await this.advancedTabBtn.click();
|
|
878
1003
|
}
|
|
879
1004
|
async getLinkWithName(name) {
|
|
880
|
-
await
|
|
1005
|
+
await (0, test_1.expect)(this.page.getByRole('link', { name: name })).toBeVisible();
|
|
881
1006
|
return this.page.getByRole('link', { name: name });
|
|
882
1007
|
}
|
|
883
1008
|
async getAddButtonInGroupWithName(name) {
|
|
884
|
-
await
|
|
1009
|
+
await (0, test_1.expect)(this.page.locator('.group').filter({ hasText: name }).locator('#add-button')).toBeVisible();
|
|
885
1010
|
return this.page.locator('.group').filter({ hasText: name }).locator('#add-button');
|
|
886
1011
|
}
|
|
887
1012
|
async clickRemoveStylesheetButton(stylesheetName) {
|
|
888
1013
|
const removeButton = this.entityItem.filter({ hasText: stylesheetName }).getByLabel('Remove');
|
|
889
|
-
await
|
|
1014
|
+
await (0, test_1.expect)(removeButton).toBeVisible();
|
|
1015
|
+
await removeButton.click();
|
|
890
1016
|
}
|
|
891
1017
|
// TipTap
|
|
892
1018
|
async deleteToolbarGroup(groupIndex, rowIndex = 0) {
|
|
893
1019
|
const groupButton = this.tiptapToolbarConfiguration.locator('.row').nth(rowIndex).locator('.group').nth(groupIndex);
|
|
894
|
-
await
|
|
1020
|
+
await (0, test_1.expect)(groupButton).toBeVisible();
|
|
1021
|
+
await groupButton.hover();
|
|
895
1022
|
const actionsInGroup = groupButton.locator('.items').locator('uui-button');
|
|
896
1023
|
const actionsCount = await actionsInGroup.count();
|
|
897
1024
|
for (let i = 0; i < actionsCount; i++) {
|
|
898
|
-
await
|
|
1025
|
+
await actionsInGroup.first().click();
|
|
899
1026
|
}
|
|
900
|
-
await
|
|
1027
|
+
await groupButton.locator('[label="Remove group"]').click();
|
|
901
1028
|
}
|
|
902
1029
|
async deleteToolbarRow(rowIndex) {
|
|
903
1030
|
const rowButton = this.tiptapToolbarConfiguration.locator('.row').nth(rowIndex);
|
|
904
|
-
await
|
|
1031
|
+
await (0, test_1.expect)(rowButton).toBeVisible();
|
|
1032
|
+
await rowButton.hover();
|
|
1033
|
+
await rowButton.locator('[label="Remove row"]').click();
|
|
905
1034
|
}
|
|
906
1035
|
async clickAddRowToolbarButton() {
|
|
907
|
-
await
|
|
1036
|
+
await (0, test_1.expect)(this.addRowToolbarBtn).toBeVisible();
|
|
1037
|
+
await this.addRowToolbarBtn.click();
|
|
908
1038
|
}
|
|
909
1039
|
async clickAddGroupToolbarButton() {
|
|
910
|
-
await
|
|
1040
|
+
await (0, test_1.expect)(this.addGroupToolbarBtn).toBeVisible();
|
|
1041
|
+
await this.addGroupToolbarBtn.click();
|
|
911
1042
|
}
|
|
912
1043
|
async clickExtensionItemWithName(name) {
|
|
913
|
-
await
|
|
1044
|
+
await (0, test_1.expect)(this.tiptapExtensionsConfiguration.locator('uui-checkbox[label="' + name + '"]')).toBeVisible();
|
|
1045
|
+
await this.tiptapExtensionsConfiguration.locator('uui-checkbox[label="' + name + '"]').click();
|
|
914
1046
|
}
|
|
915
1047
|
async doesPropertyEditorHaveUiAlias(uiAlias) {
|
|
916
|
-
await
|
|
1048
|
+
await (0, test_1.expect)(this.propertyEditor).toHaveAttribute('alias', uiAlias);
|
|
917
1049
|
}
|
|
918
1050
|
async doesPropertyEditorHaveName(name) {
|
|
919
|
-
await
|
|
1051
|
+
await (0, test_1.expect)(this.propertyEditor).toHaveAttribute('name', name);
|
|
920
1052
|
}
|
|
921
1053
|
async doesPropertyEditorHaveAlias(alias) {
|
|
922
|
-
await
|
|
1054
|
+
await (0, test_1.expect)(this.propertyEditor).toHaveAttribute('property-editor-schema-alias', alias);
|
|
923
1055
|
}
|
|
924
1056
|
async clickDataTypeButton() {
|
|
925
|
-
await
|
|
1057
|
+
await (0, test_1.expect)(this.dataTypeBtn).toBeVisible();
|
|
1058
|
+
await this.dataTypeBtn.click();
|
|
926
1059
|
}
|
|
927
1060
|
async clickDataTypesMenu() {
|
|
928
|
-
await
|
|
1061
|
+
await (0, test_1.expect)(this.dataTypesMenu).toBeVisible();
|
|
1062
|
+
await this.dataTypesMenu.click();
|
|
929
1063
|
}
|
|
930
1064
|
async doesSettingHaveValue(settings) {
|
|
931
1065
|
for (let index = 0; index < Object.keys(settings).length; index++) {
|
|
@@ -936,37 +1070,42 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
936
1070
|
}
|
|
937
1071
|
}
|
|
938
1072
|
async doesSettingItemsHaveCount(settings) {
|
|
939
|
-
await
|
|
1073
|
+
await (0, test_1.expect)(this.propertyEditorConfigItems).toHaveCount(Object.keys(settings).length);
|
|
940
1074
|
}
|
|
941
1075
|
async doesSettingsContainText(text) {
|
|
942
|
-
await
|
|
1076
|
+
await (0, test_1.expect)(this.propertyEditorConfig).toContainText(text);
|
|
943
1077
|
}
|
|
944
1078
|
async clickStatusbarItemInToolboxWithName(name) {
|
|
945
1079
|
const statusbarItemLocator = this.tiptapStatusbarConfiguration.locator('#toolbox uui-button').filter({ hasText: name });
|
|
946
|
-
await
|
|
1080
|
+
await (0, test_1.expect)(statusbarItemLocator).toBeVisible();
|
|
1081
|
+
await statusbarItemLocator.click();
|
|
947
1082
|
}
|
|
948
1083
|
async clickStatusbarItemWithName(name) {
|
|
949
1084
|
const statusbarItemLocator = this.tiptapStatusbarConfiguration.locator('#statusbar uui-button').filter({ hasText: name });
|
|
950
|
-
await
|
|
1085
|
+
await (0, test_1.expect)(statusbarItemLocator).toBeVisible();
|
|
1086
|
+
await statusbarItemLocator.click();
|
|
951
1087
|
}
|
|
952
1088
|
async isExtensionItemChecked(itemName, isChecked = true) {
|
|
953
|
-
await (0, test_1.expect)(this.tiptapExtensionsConfiguration.locator(
|
|
1089
|
+
await (0, test_1.expect)(this.tiptapExtensionsConfiguration.locator('uui-checkbox[label="' + itemName + '"] input')).toBeChecked({ checked: isChecked });
|
|
954
1090
|
}
|
|
955
1091
|
async doesBlockHaveThumbnailImage(thumbnailImageUrl) {
|
|
956
|
-
await
|
|
1092
|
+
await (0, test_1.expect)(this.blockThumbnailImage).toHaveAttribute('src', thumbnailImageUrl);
|
|
957
1093
|
}
|
|
958
1094
|
async addTimeZones(timeZones) {
|
|
959
1095
|
for (let i = 0; i < timeZones.length; i++) {
|
|
960
|
-
|
|
961
|
-
await this.
|
|
962
|
-
await this.click(
|
|
1096
|
+
(0, test_1.expect)(this.timeZoneDropDown).toBeVisible();
|
|
1097
|
+
await this.timeZoneDropDown.click();
|
|
1098
|
+
await this.timeZoneDropDown.getByText(timeZones[i]).click();
|
|
1099
|
+
await this.addTimeZoneBtn.click();
|
|
963
1100
|
}
|
|
964
1101
|
}
|
|
965
1102
|
async clickChooseDataSourceButton() {
|
|
966
|
-
await
|
|
1103
|
+
await (0, test_1.expect)(this.dataSourceChooseBtn).toBeVisible();
|
|
1104
|
+
await this.dataSourceChooseBtn.click();
|
|
967
1105
|
}
|
|
968
1106
|
async clickChooseThumbnailButton() {
|
|
969
|
-
await
|
|
1107
|
+
await (0, test_1.expect)(this.chooseThumbnailAlias).toBeVisible();
|
|
1108
|
+
await this.chooseThumbnailAlias.click();
|
|
970
1109
|
}
|
|
971
1110
|
}
|
|
972
1111
|
exports.DataTypeUiHelper = DataTypeUiHelper;
|