@umbraco/playwright-testhelpers 17.0.18 → 17.1.0-beta
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/README.md +139 -29
- package/dist/lib/helpers/BasePage.d.ts +447 -0
- package/dist/lib/helpers/BasePage.js +543 -0
- package/dist/lib/helpers/BasePage.js.map +1 -0
- package/dist/lib/helpers/ConstantHelper.d.ts +17 -0
- package/dist/lib/helpers/ConstantHelper.js +17 -0
- 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 +312 -442
- package/dist/lib/helpers/ContentUiHelper.js.map +1 -1
- package/dist/lib/helpers/CurrentUserProfileUiHelper.js +4 -10
- package/dist/lib/helpers/CurrentUserProfileUiHelper.js.map +1 -1
- package/dist/lib/helpers/DataTypeUiHelper.js +189 -328
- package/dist/lib/helpers/DataTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/DictionaryUiHelper.js +16 -21
- package/dist/lib/helpers/DictionaryUiHelper.js.map +1 -1
- package/dist/lib/helpers/DocumentBlueprintUiHelper.js +7 -8
- package/dist/lib/helpers/DocumentBlueprintUiHelper.js.map +1 -1
- package/dist/lib/helpers/DocumentTypeUiHelper.js +18 -33
- package/dist/lib/helpers/DocumentTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/ExamineManagementUiHelper.js +4 -4
- package/dist/lib/helpers/ExamineManagementUiHelper.js.map +1 -1
- package/dist/lib/helpers/FormsUiHelper.js +119 -158
- package/dist/lib/helpers/FormsUiHelper.js.map +1 -1
- package/dist/lib/helpers/HealthCheckUiHelper.js +3 -3
- package/dist/lib/helpers/HealthCheckUiHelper.js.map +1 -1
- package/dist/lib/helpers/LanguageUiHelper.js +15 -17
- package/dist/lib/helpers/LanguageUiHelper.js.map +1 -1
- package/dist/lib/helpers/LogViewerUiHelper.js +20 -29
- package/dist/lib/helpers/LogViewerUiHelper.js.map +1 -1
- package/dist/lib/helpers/LoginUiHelper.js +5 -7
- package/dist/lib/helpers/LoginUiHelper.js.map +1 -1
- package/dist/lib/helpers/MediaTypeUiHelper.js +11 -17
- package/dist/lib/helpers/MediaTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/MediaUiHelper.js +34 -43
- package/dist/lib/helpers/MediaUiHelper.js.map +1 -1
- package/dist/lib/helpers/MemberGroupUiHelper.js +12 -15
- package/dist/lib/helpers/MemberGroupUiHelper.js.map +1 -1
- package/dist/lib/helpers/MemberTypeUiHelper.js +2 -3
- package/dist/lib/helpers/MemberTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/MemberUiHelper.js +24 -42
- package/dist/lib/helpers/MemberUiHelper.js.map +1 -1
- package/dist/lib/helpers/ModelsBuilderUiHelper.js +2 -3
- package/dist/lib/helpers/ModelsBuilderUiHelper.js.map +1 -1
- package/dist/lib/helpers/PackageUiHelper.js +29 -34
- package/dist/lib/helpers/PackageUiHelper.js.map +1 -1
- package/dist/lib/helpers/PartialViewUiHelper.js +13 -15
- package/dist/lib/helpers/PartialViewUiHelper.js.map +1 -1
- package/dist/lib/helpers/ProfilingUiHelper.js +2 -4
- package/dist/lib/helpers/ProfilingUiHelper.js.map +1 -1
- package/dist/lib/helpers/PublishedStatusUiHelper.js +6 -6
- package/dist/lib/helpers/PublishedStatusUiHelper.js.map +1 -1
- package/dist/lib/helpers/RedirectManagementUiHelper.js +7 -12
- package/dist/lib/helpers/RedirectManagementUiHelper.js.map +1 -1
- package/dist/lib/helpers/RelationTypeUiHelper.js +12 -14
- package/dist/lib/helpers/RelationTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/ScriptUiHelper.js +8 -11
- package/dist/lib/helpers/ScriptUiHelper.js.map +1 -1
- package/dist/lib/helpers/StylesheetUiHelper.js +8 -12
- package/dist/lib/helpers/StylesheetUiHelper.js.map +1 -1
- package/dist/lib/helpers/TelemetryDataUiHelper.js +2 -3
- package/dist/lib/helpers/TelemetryDataUiHelper.js.map +1 -1
- package/dist/lib/helpers/TemplateUiHelper.js +17 -22
- package/dist/lib/helpers/TemplateUiHelper.js.map +1 -1
- package/dist/lib/helpers/UiBaseLocators.d.ts +230 -228
- package/dist/lib/helpers/UiBaseLocators.js +832 -869
- package/dist/lib/helpers/UiBaseLocators.js.map +1 -1
- package/dist/lib/helpers/UserGroupUiHelper.js +27 -44
- package/dist/lib/helpers/UserGroupUiHelper.js.map +1 -1
- package/dist/lib/helpers/UserUiHelper.js +42 -45
- package/dist/lib/helpers/UserUiHelper.js.map +1 -1
- package/dist/lib/helpers/WebhookUiHelper.js +11 -27
- 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 +4 -9
- package/dist/lib/helpers/differentAppSettingsHelpers/ExternalLoginUiHelpers.js.map +1 -1
- package/dist/lib/helpers/differentAppSettingsHelpers/InstallUiHelper.js +6 -11
- package/dist/lib/helpers/differentAppSettingsHelpers/InstallUiHelper.js.map +1 -1
- package/dist/lib/helpers/index.d.ts +1 -0
- package/dist/lib/helpers/index.js +3 -1
- package/dist/lib/helpers/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -3
|
@@ -370,37 +370,32 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
370
370
|
this.blockProperty = page.locator('umb-block-workspace-view-edit-property');
|
|
371
371
|
}
|
|
372
372
|
async enterContentName(name) {
|
|
373
|
-
await
|
|
374
|
-
await this.contentNameTxt.clear();
|
|
375
|
-
await this.contentNameTxt.fill(name);
|
|
376
|
-
await (0, test_1.expect)(this.contentNameTxt).toHaveValue(name);
|
|
373
|
+
await this.enterText(this.contentNameTxt, name, { verify: true });
|
|
377
374
|
}
|
|
378
375
|
async clickSaveAndPublishButton() {
|
|
379
|
-
await
|
|
380
|
-
await this.
|
|
381
|
-
await this.page.waitForTimeout(500);
|
|
376
|
+
await this.click(this.saveAndPublishBtn);
|
|
377
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.short);
|
|
382
378
|
}
|
|
383
379
|
async isSuccessStateVisibleForSaveAndPublishButton(isVisible = true) {
|
|
384
380
|
const saveAndPublishBtn = this.workspaceAction.filter({ has: this.saveAndPublishBtn });
|
|
385
|
-
await (0, test_1.expect)(saveAndPublishBtn.locator(this.successState)).toBeVisible({ visible: isVisible, timeout:
|
|
381
|
+
await (0, test_1.expect)(saveAndPublishBtn.locator(this.successState)).toBeVisible({ visible: isVisible, timeout: ConstantHelper_1.ConstantHelper.timeout.long });
|
|
386
382
|
}
|
|
387
383
|
async clickPublishButton() {
|
|
388
|
-
await this.
|
|
389
|
-
await this.page.waitForTimeout(
|
|
384
|
+
await this.click(this.publishBtn);
|
|
385
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.short);
|
|
390
386
|
}
|
|
391
387
|
async clickUnpublishButton() {
|
|
392
|
-
await this.
|
|
388
|
+
await this.click(this.unpublishBtn);
|
|
393
389
|
}
|
|
394
390
|
async clickReloadChildrenThreeDotsButton() {
|
|
395
|
-
await this.
|
|
391
|
+
await this.click(this.reloadChildrenThreeDotsBtn);
|
|
396
392
|
}
|
|
397
393
|
async clickActionsMenuAtRoot() {
|
|
398
|
-
await this.
|
|
394
|
+
await this.click(this.actionMenuForContentBtn, { force: true });
|
|
399
395
|
}
|
|
400
396
|
async goToContentWithName(contentName) {
|
|
401
397
|
const contentWithNameLocator = this.menuItemTree.getByText(contentName, { exact: true });
|
|
402
|
-
await
|
|
403
|
-
await contentWithNameLocator.click();
|
|
398
|
+
await this.click(contentWithNameLocator);
|
|
404
399
|
}
|
|
405
400
|
async clickActionsMenuForContent(name) {
|
|
406
401
|
await this.clickActionsMenuForName(name);
|
|
@@ -413,8 +408,7 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
413
408
|
}
|
|
414
409
|
}
|
|
415
410
|
async clickCaretButtonForContentName(name) {
|
|
416
|
-
await
|
|
417
|
-
await this.menuItemTree.filter({ hasText: name }).last().locator('#caret-button').last().click();
|
|
411
|
+
await this.click(this.menuItemTree.filter({ hasText: name }).last().locator('#caret-button').last());
|
|
418
412
|
}
|
|
419
413
|
async waitForModalVisible() {
|
|
420
414
|
await this.openedModal.waitFor({ state: 'attached' });
|
|
@@ -423,86 +417,80 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
423
417
|
await this.openedModal.waitFor({ state: 'hidden' });
|
|
424
418
|
}
|
|
425
419
|
async clickSaveButtonForContent() {
|
|
426
|
-
await
|
|
427
|
-
await this.
|
|
428
|
-
await this.page.waitForTimeout(500);
|
|
420
|
+
await this.click(this.saveContentBtn);
|
|
421
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.short);
|
|
429
422
|
}
|
|
430
423
|
async enterTextstring(text) {
|
|
431
|
-
await
|
|
432
|
-
await this.textstringTxt.clear();
|
|
433
|
-
await this.textstringTxt.fill(text);
|
|
424
|
+
await this.enterText(this.textstringTxt, text);
|
|
434
425
|
}
|
|
435
426
|
async doesContentTreeHaveName(contentName) {
|
|
436
|
-
await
|
|
427
|
+
await this.containsText(this.contentTree, contentName);
|
|
437
428
|
}
|
|
438
429
|
async enterRichTextArea(value) {
|
|
439
|
-
await
|
|
430
|
+
await this.waitForVisible(this.richTextAreaTxt);
|
|
440
431
|
await this.richTextAreaTxt.fill(value);
|
|
441
432
|
}
|
|
442
433
|
async enterTextArea(value) {
|
|
443
|
-
await
|
|
444
|
-
await this.
|
|
445
|
-
await this.textAreaTxt.clear();
|
|
446
|
-
await this.textAreaTxt.fill(value);
|
|
434
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.minimal);
|
|
435
|
+
await this.enterText(this.textAreaTxt, value);
|
|
447
436
|
}
|
|
448
437
|
async clickConfirmToUnpublishButton() {
|
|
449
|
-
await this.
|
|
438
|
+
await this.click(this.confirmToUnpublishBtn);
|
|
450
439
|
}
|
|
451
440
|
async clickCreateDocumentBlueprintButton() {
|
|
452
|
-
await this.
|
|
441
|
+
await this.click(this.createDocumentBlueprintBtn);
|
|
453
442
|
}
|
|
454
443
|
// Info Tab
|
|
455
444
|
async clickInfoTab() {
|
|
456
|
-
await
|
|
457
|
-
await this.infoTab.click();
|
|
445
|
+
await this.click(this.infoTab);
|
|
458
446
|
}
|
|
459
447
|
async doesDocumentHaveLink(link) {
|
|
460
|
-
await
|
|
448
|
+
await this.containsText(this.linkContent, link);
|
|
461
449
|
}
|
|
462
450
|
async doesHistoryHaveText(text) {
|
|
463
|
-
await
|
|
451
|
+
await this.hasText(this.historyItems, text);
|
|
464
452
|
}
|
|
465
453
|
async doesDocumentStateHaveText(text) {
|
|
466
|
-
await
|
|
454
|
+
await this.hasText(this.documentState, text);
|
|
467
455
|
}
|
|
468
456
|
async doesCreatedDateHaveText(text) {
|
|
469
|
-
await
|
|
457
|
+
await this.hasText(this.createdDate, text);
|
|
470
458
|
}
|
|
471
459
|
async doesIdHaveText(text) {
|
|
472
|
-
await
|
|
460
|
+
await this.hasText(this.id, text);
|
|
473
461
|
}
|
|
474
462
|
async clickEditDocumentTypeButton() {
|
|
475
|
-
await this.
|
|
463
|
+
await this.click(this.editDocumentTypeBtn);
|
|
476
464
|
}
|
|
477
465
|
async clickAddTemplateButton() {
|
|
478
|
-
await this.
|
|
466
|
+
await this.click(this.addTemplateBtn);
|
|
479
467
|
}
|
|
480
468
|
async waitForContentToBeCreated() {
|
|
481
|
-
await this.
|
|
469
|
+
await this.waitForLoadState();
|
|
482
470
|
}
|
|
483
471
|
async waitForContentToBeDeleted() {
|
|
484
|
-
await this.
|
|
472
|
+
await this.waitForLoadState();
|
|
485
473
|
}
|
|
486
474
|
async waitForContentToBeRenamed() {
|
|
487
|
-
await this.
|
|
475
|
+
await this.waitForLoadState();
|
|
488
476
|
}
|
|
489
477
|
async waitForDomainToBeCreated() {
|
|
490
|
-
await this.
|
|
478
|
+
await this.waitForLoadState();
|
|
491
479
|
}
|
|
492
480
|
async waitForDomainToBeUpdated() {
|
|
493
|
-
await this.
|
|
481
|
+
await this.waitForLoadState();
|
|
494
482
|
}
|
|
495
483
|
async waitForDomainToBeDeleted() {
|
|
496
|
-
await this.
|
|
484
|
+
await this.waitForLoadState();
|
|
497
485
|
}
|
|
498
486
|
async waitForContentToBeTrashed() {
|
|
499
|
-
await this.
|
|
487
|
+
await this.waitForLoadState();
|
|
500
488
|
}
|
|
501
489
|
async clickDocumentTypeByName(documentTypeName) {
|
|
502
|
-
await this.page.locator(
|
|
490
|
+
await this.click(this.page.locator(`uui-ref-node-document-type[name="${documentTypeName}"]`));
|
|
503
491
|
}
|
|
504
492
|
async clickTemplateByName(templateName) {
|
|
505
|
-
await this.page.locator(
|
|
493
|
+
await this.click(this.page.locator(`uui-ref-node[name="${templateName}"]`));
|
|
506
494
|
}
|
|
507
495
|
async isDocumentTypeModalVisible(documentTypeName) {
|
|
508
496
|
await (0, test_1.expect)(this.documentTypeWorkspace.filter({ hasText: documentTypeName })).toBeVisible();
|
|
@@ -511,11 +499,11 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
511
499
|
await (0, test_1.expect)(this.breadcrumbsTemplateModal.getByText(templateName)).toBeVisible();
|
|
512
500
|
}
|
|
513
501
|
async clickEditTemplateByName(templateName) {
|
|
514
|
-
await this.page.locator(
|
|
502
|
+
await this.click(this.page.locator(`uui-ref-node[name="${templateName}"]`).getByLabel('Choose'));
|
|
515
503
|
}
|
|
516
504
|
async changeTemplate(oldTemplate, newTemplate) {
|
|
517
505
|
await this.clickEditTemplateByName(oldTemplate);
|
|
518
|
-
await this.sidebarModal.getByLabel(newTemplate)
|
|
506
|
+
await this.click(this.sidebarModal.getByLabel(newTemplate));
|
|
519
507
|
await this.clickChooseModalButton();
|
|
520
508
|
}
|
|
521
509
|
async isTemplateNameDisabled(templateName) {
|
|
@@ -524,57 +512,51 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
524
512
|
}
|
|
525
513
|
// Culture and Hostnames
|
|
526
514
|
async clickCultureAndHostnamesButton() {
|
|
527
|
-
await this.
|
|
515
|
+
await this.click(this.cultureAndHostnamesBtn);
|
|
528
516
|
}
|
|
529
517
|
async clickAddNewHostnameButton() {
|
|
530
|
-
await
|
|
531
|
-
await this.addNewHostnameBtn.click();
|
|
518
|
+
await this.click(this.addNewHostnameBtn);
|
|
532
519
|
}
|
|
533
520
|
async selectCultureLanguageOption(option) {
|
|
534
|
-
await
|
|
535
|
-
await this.
|
|
536
|
-
await (0, test_1.expect)(this.hostNameItem.getByText(option, { exact: true })).toBeVisible();
|
|
537
|
-
await this.hostNameItem.getByText(option, { exact: true }).click();
|
|
521
|
+
await this.click(this.cultureLanguageDropdownBox);
|
|
522
|
+
await this.click(this.hostNameItem.getByText(option, { exact: true }));
|
|
538
523
|
}
|
|
539
524
|
async selectHostnameLanguageOption(option, index = 0) {
|
|
540
|
-
await this.hostnameLanguageDropdownBox.nth(index)
|
|
541
|
-
await this.hostnameComboBox.getByText(option).nth(index)
|
|
525
|
+
await this.click(this.hostnameLanguageDropdownBox.nth(index));
|
|
526
|
+
await this.click(this.hostnameComboBox.getByText(option).nth(index));
|
|
542
527
|
}
|
|
543
528
|
async enterDomain(value, index = 0) {
|
|
544
|
-
await
|
|
545
|
-
await this.hostnameTxt.nth(index).clear();
|
|
546
|
-
await this.hostnameTxt.nth(index).fill(value);
|
|
547
|
-
await (0, test_1.expect)(this.hostnameTxt.nth(index)).toHaveValue(value);
|
|
529
|
+
await this.enterText(this.hostnameTxt.nth(index), value, { verify: true });
|
|
548
530
|
}
|
|
549
531
|
async clickDeleteHostnameButton() {
|
|
550
|
-
await this.deleteHostnameBtn.first()
|
|
532
|
+
await this.click(this.deleteHostnameBtn.first());
|
|
551
533
|
}
|
|
552
534
|
async clickSaveModalButton() {
|
|
553
|
-
await this.
|
|
554
|
-
await this.page.waitForTimeout(
|
|
535
|
+
await this.click(this.saveModalBtn);
|
|
536
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.short);
|
|
555
537
|
}
|
|
556
538
|
async chooseDocumentType(documentTypeName) {
|
|
557
|
-
await this.documentTypeNode.filter({ hasText: documentTypeName })
|
|
539
|
+
await this.click(this.documentTypeNode.filter({ hasText: documentTypeName }));
|
|
558
540
|
}
|
|
559
541
|
// Approved Color
|
|
560
542
|
async clickApprovedColorByValue(value) {
|
|
561
|
-
await this.page.locator(
|
|
543
|
+
await this.click(this.page.locator(`uui-color-swatch[value="#${value}"] #swatch`));
|
|
562
544
|
}
|
|
563
545
|
// Checkbox list
|
|
564
546
|
async chooseCheckboxListOption(optionValue) {
|
|
565
|
-
await this.page.locator(
|
|
547
|
+
await this.click(this.page.locator(`uui-checkbox[value="${optionValue}"] svg`));
|
|
566
548
|
}
|
|
567
549
|
// Content Picker
|
|
568
550
|
async addContentPicker(contentName) {
|
|
569
551
|
await this.clickChooseButton();
|
|
570
|
-
await this.sidebarModal.getByText(contentName)
|
|
571
|
-
await this.
|
|
552
|
+
await this.click(this.sidebarModal.getByText(contentName));
|
|
553
|
+
await this.click(this.chooseModalBtn);
|
|
572
554
|
}
|
|
573
555
|
async isOpenButtonVisibleInContentPicker(contentPickerName, isVisible = true) {
|
|
574
556
|
return (0, test_1.expect)(this.page.getByLabel('Open ' + contentPickerName)).toBeVisible({ visible: isVisible });
|
|
575
557
|
}
|
|
576
558
|
async clickContentPickerOpenButton(contentPickerName) {
|
|
577
|
-
await this.page.getByLabel('Open ' + contentPickerName)
|
|
559
|
+
await this.click(this.page.getByLabel('Open ' + contentPickerName));
|
|
578
560
|
}
|
|
579
561
|
async isNodeOpenForContentPicker(contentPickerName) {
|
|
580
562
|
return (0, test_1.expect)(this.openedModal.getByText(contentPickerName)).toBeVisible();
|
|
@@ -589,14 +571,13 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
589
571
|
await (0, test_1.expect)(this.documentTreeItem.locator('[label="' + parentName + '"]').getByLabel(childName)).toBeVisible({ visible: isVisible });
|
|
590
572
|
}
|
|
591
573
|
async removeContentPicker(contentPickerName) {
|
|
592
|
-
const contentPickerLocator = this.entityItem.filter({ has: this.page.locator(
|
|
593
|
-
await contentPickerLocator.
|
|
594
|
-
await contentPickerLocator.getByLabel('Remove').click();
|
|
574
|
+
const contentPickerLocator = this.entityItem.filter({ has: this.page.locator(`[name="${contentPickerName}"]`) });
|
|
575
|
+
await this.hoverAndClick(contentPickerLocator, contentPickerLocator.getByLabel('Remove'));
|
|
595
576
|
await this.clickConfirmRemoveButton();
|
|
596
577
|
}
|
|
597
578
|
// Dropdown
|
|
598
579
|
async chooseDropdownOption(optionValues) {
|
|
599
|
-
await this.dropdown
|
|
580
|
+
await this.selectMultiple(this.dropdown, optionValues);
|
|
600
581
|
}
|
|
601
582
|
// Date Picker
|
|
602
583
|
async enterADate(date) {
|
|
@@ -604,7 +585,7 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
604
585
|
}
|
|
605
586
|
// Media Picker
|
|
606
587
|
async clickChooseMediaPickerButton() {
|
|
607
|
-
await this.
|
|
588
|
+
await this.click(this.chooseMediaPickerBtn);
|
|
608
589
|
}
|
|
609
590
|
async clickChooseButtonAndSelectMediaWithName(mediaName) {
|
|
610
591
|
await this.clickChooseMediaPickerButton();
|
|
@@ -615,17 +596,17 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
615
596
|
await this.selectMediaWithTestId(mediaKey);
|
|
616
597
|
}
|
|
617
598
|
async removeMediaPickerByName(mediaPickerName) {
|
|
618
|
-
await this.page.locator(
|
|
599
|
+
await this.click(this.page.locator(`[name="${mediaPickerName}"] [label="Remove"] svg`));
|
|
619
600
|
await this.clickConfirmRemoveButton();
|
|
620
601
|
}
|
|
621
602
|
async isMediaNameVisible(mediaName, isVisible = true) {
|
|
622
603
|
return (0, test_1.expect)(this.mediaCardItems.filter({ hasText: mediaName })).toBeVisible({ visible: isVisible });
|
|
623
604
|
}
|
|
624
605
|
async clickResetFocalPointButton() {
|
|
625
|
-
await this.
|
|
606
|
+
await this.click(this.resetFocalPointBtn);
|
|
626
607
|
}
|
|
627
608
|
async setFocalPoint(widthPercentage = 50, heightPercentage = 50) {
|
|
628
|
-
await this.page.waitForTimeout(
|
|
609
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.medium);
|
|
629
610
|
const element = await this.page.locator('#image').boundingBox();
|
|
630
611
|
if (!element) {
|
|
631
612
|
throw new Error('Element not found');
|
|
@@ -634,111 +615,104 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
634
615
|
const centerY = element.y + element.height / 2;
|
|
635
616
|
const x = element.x + (element.width * widthPercentage) / 100;
|
|
636
617
|
const y = element.y + (element.height * heightPercentage) / 100;
|
|
637
|
-
await this.page.waitForTimeout(
|
|
618
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.minimal);
|
|
638
619
|
await this.page.mouse.move(centerX, centerY, { steps: 5 });
|
|
639
|
-
await this.page.waitForTimeout(
|
|
620
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.minimal);
|
|
640
621
|
await this.page.mouse.down();
|
|
641
|
-
await this.page.waitForTimeout(
|
|
622
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.minimal);
|
|
642
623
|
await this.page.mouse.move(x, y);
|
|
643
|
-
await this.page.waitForTimeout(
|
|
624
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.minimal);
|
|
644
625
|
await this.page.mouse.up();
|
|
645
626
|
}
|
|
646
627
|
// Member Picker
|
|
647
628
|
async clickChooseMemberPickerButton() {
|
|
648
|
-
await this.
|
|
629
|
+
await this.click(this.chooseMemberPickerBtn);
|
|
649
630
|
}
|
|
650
631
|
async selectMemberByName(memberName) {
|
|
651
|
-
await this.sidebarModal.getByText(memberName, { exact: true })
|
|
632
|
+
await this.click(this.sidebarModal.getByText(memberName, { exact: true }));
|
|
652
633
|
}
|
|
653
634
|
async removeMemberPickerByName(memberName) {
|
|
654
|
-
const mediaPickerLocator = this.entityItem.filter({ has: this.page.locator(
|
|
655
|
-
await mediaPickerLocator.
|
|
656
|
-
await mediaPickerLocator.getByLabel('Remove').click();
|
|
635
|
+
const mediaPickerLocator = this.entityItem.filter({ has: this.page.locator(`[name="${memberName}"]`) });
|
|
636
|
+
await this.hoverAndClick(mediaPickerLocator, mediaPickerLocator.getByLabel('Remove'));
|
|
657
637
|
await this.clickConfirmRemoveButton();
|
|
658
638
|
}
|
|
659
639
|
// Numeric
|
|
660
640
|
async enterNumeric(number) {
|
|
661
|
-
await this.numericTxt.
|
|
662
|
-
await this.numericTxt.fill(number.toString());
|
|
641
|
+
await this.enterText(this.numericTxt, number.toString());
|
|
663
642
|
}
|
|
664
643
|
// Radiobox
|
|
665
644
|
async chooseRadioboxOption(optionValue) {
|
|
666
|
-
await this.page.locator(
|
|
645
|
+
await this.click(this.page.locator(`uui-radio[value="${optionValue}"] #button`));
|
|
667
646
|
}
|
|
668
647
|
// Tags
|
|
669
648
|
async clickPlusIconButton() {
|
|
670
|
-
await this.
|
|
649
|
+
await this.click(this.plusIconBtn);
|
|
671
650
|
}
|
|
672
651
|
async enterTag(tagName) {
|
|
673
|
-
await this.enterTagTxt
|
|
674
|
-
await this.enterTagTxt
|
|
652
|
+
await this.enterText(this.enterTagTxt, tagName);
|
|
653
|
+
await this.pressKey(this.enterTagTxt, 'Enter');
|
|
675
654
|
}
|
|
676
655
|
async removeTagByName(tagName) {
|
|
677
|
-
await
|
|
678
|
-
await this.tagItems.filter({ hasText: tagName }).locator('svg').click();
|
|
656
|
+
await this.click(this.tagItems.filter({ hasText: tagName }).locator('svg'));
|
|
679
657
|
}
|
|
680
658
|
// Multi URL Picker
|
|
681
659
|
async clickAddMultiURLPickerButton() {
|
|
682
|
-
await this.
|
|
660
|
+
await this.click(this.addMultiURLPickerBtn);
|
|
683
661
|
}
|
|
684
662
|
async selectLinkByName(linkName) {
|
|
685
|
-
await
|
|
686
|
-
await this.sidebarModal.getByText(linkName, { exact: true }).click();
|
|
663
|
+
await this.click(this.sidebarModal.getByText(linkName, { exact: true }));
|
|
687
664
|
}
|
|
688
665
|
async enterLink(value, toPress = false) {
|
|
689
|
-
await this.linkTxt.clear();
|
|
690
666
|
if (toPress) {
|
|
691
|
-
await this.linkTxt
|
|
667
|
+
await this.enterText(this.linkTxt, '');
|
|
668
|
+
await this.pressKey(this.linkTxt, value);
|
|
692
669
|
}
|
|
693
670
|
else {
|
|
694
|
-
await this.linkTxt
|
|
671
|
+
await this.enterText(this.linkTxt, value);
|
|
695
672
|
}
|
|
696
673
|
}
|
|
697
674
|
async enterAnchorOrQuerystring(value, toPress = false) {
|
|
698
|
-
await this.anchorQuerystringTxt.clear();
|
|
699
675
|
if (toPress) {
|
|
700
|
-
await this.anchorQuerystringTxt
|
|
676
|
+
await this.enterText(this.anchorQuerystringTxt, '');
|
|
677
|
+
await this.pressKey(this.anchorQuerystringTxt, value);
|
|
701
678
|
}
|
|
702
679
|
else {
|
|
703
|
-
await this.anchorQuerystringTxt
|
|
680
|
+
await this.enterText(this.anchorQuerystringTxt, value);
|
|
704
681
|
}
|
|
705
682
|
}
|
|
706
683
|
async enterLinkTitle(value, toPress = false) {
|
|
707
|
-
await this.linkTitleTxt.clear();
|
|
708
684
|
if (toPress) {
|
|
709
|
-
await this.linkTitleTxt
|
|
685
|
+
await this.enterText(this.linkTitleTxt, '');
|
|
686
|
+
await this.pressKey(this.linkTitleTxt, value);
|
|
710
687
|
}
|
|
711
688
|
else {
|
|
712
|
-
await this.linkTitleTxt
|
|
689
|
+
await this.enterText(this.linkTitleTxt, value);
|
|
713
690
|
}
|
|
714
691
|
}
|
|
715
692
|
async removeUrlPickerByName(linkName) {
|
|
716
|
-
await this.page.locator(
|
|
693
|
+
await this.click(this.page.locator(`[name="${linkName}"]`).getByLabel('Remove'));
|
|
717
694
|
await this.clickConfirmRemoveButton();
|
|
718
695
|
}
|
|
719
696
|
async clickEditUrlPickerButtonByName(linkName) {
|
|
720
|
-
await this.page.locator(
|
|
697
|
+
await this.click(this.page.locator(`[name="${linkName}"]`).getByLabel('Edit'));
|
|
721
698
|
}
|
|
722
699
|
// Upload
|
|
723
700
|
async clickRemoveFilesButton() {
|
|
724
|
-
await
|
|
725
|
-
await this.removeFilesBtn.click();
|
|
701
|
+
await this.click(this.removeFilesBtn);
|
|
726
702
|
}
|
|
727
703
|
// True/false
|
|
728
704
|
async clickToggleButton() {
|
|
729
|
-
await
|
|
730
|
-
await this.toggleBtn.click({ force: true });
|
|
705
|
+
await this.click(this.toggleBtn, { force: true });
|
|
731
706
|
}
|
|
732
707
|
async doesToggleHaveLabel(label) {
|
|
733
|
-
|
|
708
|
+
await this.hasText(this.toggleInput, label);
|
|
734
709
|
}
|
|
735
710
|
// Multiple Text String
|
|
736
711
|
async clickAddMultipleTextStringButton() {
|
|
737
|
-
await this.
|
|
712
|
+
await this.click(this.addMultipleTextStringBtn);
|
|
738
713
|
}
|
|
739
714
|
async enterMultipleTextStringValue(value) {
|
|
740
|
-
await this.multipleTextStringValueTxt
|
|
741
|
-
await this.multipleTextStringValueTxt.fill(value);
|
|
715
|
+
await this.enterText(this.multipleTextStringValueTxt, value);
|
|
742
716
|
}
|
|
743
717
|
async addMultipleTextStringItem(value) {
|
|
744
718
|
await this.clickAddMultipleTextStringButton();
|
|
@@ -760,51 +734,46 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
760
734
|
return (0, test_1.expect)(this.sidebarModal.getByText(contentName)).toBeVisible({ visible: isVisible });
|
|
761
735
|
}
|
|
762
736
|
async doesModalHaveText(text) {
|
|
763
|
-
|
|
737
|
+
await this.containsText(this.openedModal, text);
|
|
764
738
|
}
|
|
765
739
|
// Collection tab
|
|
766
740
|
async isTabNameVisible(tabName) {
|
|
767
741
|
return (0, test_1.expect)(this.tabItems.filter({ hasText: tabName })).toBeVisible();
|
|
768
742
|
}
|
|
769
743
|
async doesDocumentHaveName(name) {
|
|
770
|
-
|
|
744
|
+
await this.hasValue(this.enterAName, name);
|
|
771
745
|
}
|
|
772
746
|
async doesDocumentTableColumnNameValuesMatch(expectedValues) {
|
|
773
|
-
await
|
|
747
|
+
await this.waitForVisible(this.documentListView);
|
|
774
748
|
return expectedValues.forEach((text, index) => {
|
|
775
749
|
(0, test_1.expect)(this.documentTableColumnName.nth(index)).toHaveText(text);
|
|
776
750
|
});
|
|
777
751
|
}
|
|
778
752
|
async searchByKeywordInCollection(keyword) {
|
|
779
|
-
await this.searchTxt
|
|
780
|
-
await this.searchTxt
|
|
781
|
-
await this.
|
|
782
|
-
await this.page.waitForTimeout(500);
|
|
753
|
+
await this.enterText(this.searchTxt, keyword);
|
|
754
|
+
await this.pressKey(this.searchTxt, 'Enter');
|
|
755
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.short);
|
|
783
756
|
}
|
|
784
757
|
async clickSelectVariantButton() {
|
|
785
|
-
await
|
|
786
|
-
await this.selectAVariantBtn.click();
|
|
758
|
+
await this.click(this.selectAVariantBtn);
|
|
787
759
|
}
|
|
788
760
|
async clickVariantAddModeButtonForLanguageName(language) {
|
|
789
|
-
await this.variantAddModeBtn.getByText(language)
|
|
790
|
-
await this.page.waitForTimeout(
|
|
761
|
+
await this.click(this.variantAddModeBtn.getByText(language));
|
|
762
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.short);
|
|
791
763
|
}
|
|
792
764
|
async clickSaveAndCloseButton() {
|
|
793
|
-
await this.
|
|
794
|
-
await this.page.waitForTimeout(
|
|
765
|
+
await this.click(this.saveAndCloseBtn);
|
|
766
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.short);
|
|
795
767
|
}
|
|
796
768
|
// List View
|
|
797
769
|
async clickCreateContentWithName(name) {
|
|
798
|
-
await
|
|
799
|
-
await this.page.getByLabel('Create ' + name).click();
|
|
770
|
+
await this.click(this.page.getByLabel(`Create ${name}`));
|
|
800
771
|
}
|
|
801
772
|
async enterNameInContainer(name) {
|
|
802
|
-
await
|
|
803
|
-
await this.enterNameInContainerTxt.clear();
|
|
804
|
-
await this.enterNameInContainerTxt.fill(name);
|
|
773
|
+
await this.enterText(this.enterNameInContainerTxt, name);
|
|
805
774
|
}
|
|
806
775
|
async goToContentInListViewWithName(contentName) {
|
|
807
|
-
await this.listView.getByLabel(contentName)
|
|
776
|
+
await this.click(this.listView.getByLabel(contentName));
|
|
808
777
|
}
|
|
809
778
|
async doesListViewHaveNoItemsInList() {
|
|
810
779
|
await (0, test_1.expect)(this.listView.filter({ hasText: 'There are no items to show in the list.' })).toBeVisible();
|
|
@@ -813,73 +782,64 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
813
782
|
await (0, test_1.expect)(this.umbDocumentCollection.filter({ hasText: 'No items' })).toBeVisible();
|
|
814
783
|
}
|
|
815
784
|
async clickNameButtonInListView() {
|
|
816
|
-
await this.
|
|
785
|
+
await this.click(this.nameBtn);
|
|
817
786
|
}
|
|
818
787
|
async doesFirstItemInListViewHaveName(name) {
|
|
819
788
|
await (0, test_1.expect)(this.listViewTableRow.first()).toContainText(name);
|
|
820
789
|
}
|
|
821
790
|
async doesListViewContainCount(count) {
|
|
822
|
-
await
|
|
791
|
+
await this.hasCount(this.listViewTableRow, count);
|
|
823
792
|
}
|
|
824
793
|
async selectContentWithNameInListView(name) {
|
|
825
|
-
|
|
826
|
-
await (0, test_1.expect)(contentInListViewLocator).toBeVisible();
|
|
827
|
-
await contentInListViewLocator.click();
|
|
794
|
+
await this.click(this.listViewTableRow.filter({ hasText: name }));
|
|
828
795
|
}
|
|
829
796
|
async clickPublishSelectedListItems() {
|
|
830
|
-
await this.
|
|
797
|
+
await this.click(this.publishSelectedListItems);
|
|
831
798
|
}
|
|
832
799
|
async clickUnpublishSelectedListItems() {
|
|
833
|
-
await this.
|
|
800
|
+
await this.click(this.unpublishSelectedListItems);
|
|
834
801
|
}
|
|
835
802
|
async clickDuplicateToSelectedListItems() {
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
await this.duplicateToSelectedListItems.click({ force: true });
|
|
803
|
+
// Force click is needed
|
|
804
|
+
await this.click(this.duplicateToSelectedListItems, { force: true });
|
|
839
805
|
}
|
|
840
806
|
async clickMoveToSelectedListItems() {
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
await this.moveToSelectedListItems.click({ force: true });
|
|
807
|
+
// Force click is needed
|
|
808
|
+
await this.click(this.moveToSelectedListItems, { force: true });
|
|
844
809
|
}
|
|
845
810
|
async clickTrashSelectedListItems() {
|
|
846
|
-
await this.
|
|
811
|
+
await this.click(this.trashSelectedListItems);
|
|
847
812
|
}
|
|
848
813
|
async selectDocumentWithNameAtRoot(name) {
|
|
849
814
|
await this.openCaretButtonForName('Content');
|
|
850
|
-
|
|
851
|
-
await (0, test_1.expect)(documentWithNameLocator).toBeVisible();
|
|
852
|
-
await documentWithNameLocator.click();
|
|
815
|
+
await this.click(this.modalContent.getByLabel(name));
|
|
853
816
|
await this.clickChooseButton();
|
|
854
817
|
}
|
|
855
818
|
async clickTrashButton() {
|
|
856
|
-
await
|
|
857
|
-
await this.trashBtn.click();
|
|
819
|
+
await this.click(this.trashBtn);
|
|
858
820
|
}
|
|
859
821
|
async clickExactTrashButton() {
|
|
860
|
-
await this.
|
|
822
|
+
await this.click(this.exactTrashBtn);
|
|
861
823
|
}
|
|
862
824
|
async isDocumentListViewVisible(isVisible = true) {
|
|
863
|
-
await
|
|
825
|
+
await this.isVisible(this.documentListView, isVisible);
|
|
864
826
|
}
|
|
865
827
|
async isDocumentGridViewVisible(isVisible = true) {
|
|
866
|
-
await
|
|
828
|
+
await this.isVisible(this.documentGridView, isVisible);
|
|
867
829
|
}
|
|
868
830
|
async changeDocumentSectionLanguage(newLanguageName) {
|
|
869
|
-
await this.
|
|
870
|
-
const documentSectionLanguageLocator = this.documentLanguageSelectPopover.getByText(newLanguageName);
|
|
871
|
-
await (0, test_1.expect)(documentSectionLanguageLocator).toBeVisible();
|
|
831
|
+
await this.click(this.documentLanguageSelect);
|
|
872
832
|
// Force click is needed
|
|
873
|
-
await
|
|
833
|
+
await this.click(this.documentLanguageSelectPopover.getByText(newLanguageName), { force: true });
|
|
874
834
|
}
|
|
875
835
|
async doesDocumentSectionHaveLanguageSelected(languageName) {
|
|
876
|
-
await
|
|
836
|
+
await this.hasText(this.documentLanguageSelect, languageName);
|
|
877
837
|
}
|
|
878
838
|
async isDocumentReadOnly(isVisible = true) {
|
|
879
|
-
await
|
|
839
|
+
await this.isVisible(this.documentReadOnly, isVisible);
|
|
880
840
|
}
|
|
881
841
|
async isDocumentNameInputEditable(isEditable = true) {
|
|
882
|
-
await
|
|
842
|
+
await this.waitForVisible(this.contentNameTxt);
|
|
883
843
|
await (0, test_1.expect)(this.contentNameTxt).toBeEditable({ editable: isEditable });
|
|
884
844
|
}
|
|
885
845
|
async isActionsMenuForRecycleBinVisible(isVisible = true) {
|
|
@@ -889,128 +849,117 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
889
849
|
await this.isActionsMenuForNameVisible('Content', isVisible);
|
|
890
850
|
}
|
|
891
851
|
async clickEmptyRecycleBinButton() {
|
|
892
|
-
await this.
|
|
893
|
-
await (0, test_1.expect)(this.emptyRecycleBinBtn).toBeVisible();
|
|
852
|
+
await this.hover(this.recycleBinMenuItem);
|
|
894
853
|
// Force click is needed
|
|
895
|
-
await this.
|
|
854
|
+
await this.click(this.emptyRecycleBinBtn, { force: true });
|
|
896
855
|
}
|
|
897
856
|
async clickConfirmEmptyRecycleBinButton() {
|
|
898
|
-
await this.
|
|
857
|
+
await this.click(this.confirmEmptyRecycleBinBtn);
|
|
899
858
|
}
|
|
900
859
|
async isDocumentPropertyEditable(propertyName, isEditable = true) {
|
|
901
860
|
const propertyLocator = this.documentWorkspace.locator(this.property).filter({ hasText: propertyName }).locator('#input');
|
|
902
|
-
await
|
|
861
|
+
await this.waitForVisible(propertyLocator);
|
|
903
862
|
await (0, test_1.expect)(propertyLocator).toBeEditable({ editable: isEditable });
|
|
904
863
|
}
|
|
905
864
|
async doesDocumentPropertyHaveValue(propertyName, value) {
|
|
906
865
|
const propertyLocator = this.documentWorkspace.locator(this.property).filter({ hasText: propertyName }).locator('#input');
|
|
907
|
-
await (
|
|
866
|
+
await this.hasValue(propertyLocator, value);
|
|
908
867
|
}
|
|
909
868
|
async clickContentTab() {
|
|
910
|
-
await this.splitView.getByRole('tab', { name: 'Content' })
|
|
869
|
+
await this.click(this.splitView.getByRole('tab', { name: 'Content' }));
|
|
911
870
|
}
|
|
912
871
|
async isDocumentTreeEmpty() {
|
|
913
|
-
await
|
|
872
|
+
await this.hasCount(this.documentTreeItem, 0);
|
|
914
873
|
}
|
|
915
874
|
async doesDocumentWorkspaceContainName(name) {
|
|
916
875
|
await (0, test_1.expect)(this.documentWorkspaceEditor.locator('#input')).toHaveValue(name);
|
|
917
876
|
}
|
|
918
877
|
async doesDocumentWorkspaceHaveText(text) {
|
|
919
|
-
|
|
878
|
+
await this.containsText(this.documentWorkspace, text);
|
|
920
879
|
}
|
|
921
880
|
async enterDocumentBlueprintName(name) {
|
|
922
|
-
await this.documentBlueprintModalEnterNameTxt
|
|
923
|
-
await this.documentBlueprintModalEnterNameTxt.fill(name);
|
|
881
|
+
await this.enterText(this.documentBlueprintModalEnterNameTxt, name);
|
|
924
882
|
}
|
|
925
883
|
async clickSaveDocumentBlueprintButton() {
|
|
926
|
-
await this.
|
|
884
|
+
await this.click(this.documentBlueprintSaveBtn);
|
|
927
885
|
}
|
|
928
886
|
async clickDuplicateToButton() {
|
|
929
|
-
await this.
|
|
887
|
+
await this.click(this.duplicateToBtn);
|
|
930
888
|
}
|
|
931
889
|
async clickDuplicateButton() {
|
|
932
|
-
await this.
|
|
890
|
+
await this.click(this.duplicateBtn);
|
|
933
891
|
}
|
|
934
892
|
async clickMoveToButton() {
|
|
935
|
-
await this.
|
|
893
|
+
await this.click(this.moveToBtn);
|
|
936
894
|
}
|
|
937
895
|
async moveToContentWithName(parentNames, moveTo) {
|
|
938
896
|
for (const contentName of parentNames) {
|
|
939
|
-
await this.container.getByLabel(
|
|
897
|
+
await this.click(this.container.getByLabel(`Expand child items for ${contentName}`));
|
|
940
898
|
}
|
|
941
|
-
await this.container.getByLabel(moveTo)
|
|
899
|
+
await this.click(this.container.getByLabel(moveTo));
|
|
942
900
|
await this.clickChooseContainerButton();
|
|
943
901
|
}
|
|
944
902
|
async isCaretButtonVisibleForContentName(contentName, isVisible = true) {
|
|
945
|
-
await (0, test_1.expect)(this.page.locator(
|
|
903
|
+
await (0, test_1.expect)(this.page.locator(`[label="${contentName}"]`).getByLabel('Expand child items for ')).toBeVisible({ visible: isVisible });
|
|
946
904
|
}
|
|
947
905
|
async reloadContentTree() {
|
|
948
|
-
await (0, test_1.expect)(this.contentTreeRefreshBtn).toBeVisible();
|
|
949
906
|
// Force click is needed
|
|
950
|
-
await this.
|
|
907
|
+
await this.click(this.contentTreeRefreshBtn, { force: true });
|
|
951
908
|
}
|
|
952
909
|
async clickSortChildrenButton() {
|
|
953
|
-
await
|
|
954
|
-
await this.sortChildrenBtn.click();
|
|
910
|
+
await this.click(this.sortChildrenBtn);
|
|
955
911
|
}
|
|
956
912
|
async clickRollbackButton() {
|
|
957
|
-
await
|
|
958
|
-
await this.rollbackBtn.click();
|
|
913
|
+
await this.click(this.rollbackBtn);
|
|
959
914
|
}
|
|
960
915
|
async clickRollbackContainerButton() {
|
|
961
|
-
await
|
|
962
|
-
await this.rollbackContainerBtn.click();
|
|
916
|
+
await this.click(this.rollbackContainerBtn);
|
|
963
917
|
}
|
|
964
918
|
async clickLatestRollBackItem() {
|
|
965
|
-
await
|
|
966
|
-
await this.rollbackItem.last().click();
|
|
919
|
+
await this.click(this.rollbackItem.last());
|
|
967
920
|
}
|
|
968
921
|
async clickPublicAccessButton() {
|
|
969
|
-
await
|
|
970
|
-
await this.publicAccessBtn.click();
|
|
922
|
+
await this.click(this.publicAccessBtn);
|
|
971
923
|
}
|
|
972
924
|
async addGroupBasedPublicAccess(memberGroupName, documentName) {
|
|
973
|
-
await
|
|
974
|
-
await this.groupBasedProtectionBtn.click();
|
|
925
|
+
await this.click(this.groupBasedProtectionBtn);
|
|
975
926
|
await this.clickNextButton();
|
|
976
|
-
await this.
|
|
977
|
-
await this.page.getByLabel(memberGroupName)
|
|
927
|
+
await this.click(this.chooseMemberGroupBtn);
|
|
928
|
+
await this.click(this.page.getByLabel(memberGroupName));
|
|
978
929
|
await this.clickChooseModalButton();
|
|
979
|
-
await this.
|
|
980
|
-
await this.container.getByLabel(documentName, { exact: true })
|
|
930
|
+
await this.click(this.selectLoginPageDocument);
|
|
931
|
+
await this.click(this.container.getByLabel(documentName, { exact: true }));
|
|
981
932
|
await this.clickChooseModalButton();
|
|
982
|
-
await this.
|
|
983
|
-
await this.container.getByLabel(documentName, { exact: true })
|
|
933
|
+
await this.click(this.selectErrorPageDocument);
|
|
934
|
+
await this.click(this.container.getByLabel(documentName, { exact: true }));
|
|
984
935
|
await this.clickChooseModalButton();
|
|
985
|
-
await this.
|
|
936
|
+
await this.click(this.containerSaveBtn);
|
|
986
937
|
}
|
|
987
938
|
async sortChildrenDragAndDrop(dragFromSelector, dragToSelector, verticalOffset = 0, horizontalOffset = 0, steps = 5) {
|
|
988
|
-
await
|
|
989
|
-
await
|
|
939
|
+
await this.waitForVisible(dragFromSelector);
|
|
940
|
+
await this.waitForVisible(dragToSelector);
|
|
990
941
|
const targetLocation = await dragToSelector.boundingBox();
|
|
991
942
|
const elementCenterX = targetLocation.x + targetLocation.width / 2;
|
|
992
943
|
const elementCenterY = targetLocation.y + targetLocation.height / 2;
|
|
993
|
-
await
|
|
944
|
+
await this.hover(dragFromSelector);
|
|
994
945
|
await this.page.mouse.move(10, 10);
|
|
995
|
-
await
|
|
946
|
+
await this.hover(dragFromSelector);
|
|
996
947
|
await this.page.mouse.down();
|
|
997
|
-
await this.page.waitForTimeout(
|
|
948
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.debounce);
|
|
998
949
|
await this.page.mouse.move(elementCenterX + horizontalOffset, elementCenterY + verticalOffset, { steps: steps });
|
|
999
|
-
await this.page.waitForTimeout(
|
|
950
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.debounce);
|
|
1000
951
|
// If we do not have this, the drag and drop will not work
|
|
1001
|
-
await
|
|
952
|
+
await this.hover(dragToSelector);
|
|
1002
953
|
await this.page.mouse.up();
|
|
1003
954
|
}
|
|
1004
955
|
async clickSortButton() {
|
|
1005
|
-
await
|
|
1006
|
-
await this.sortBtn.click();
|
|
956
|
+
await this.click(this.sortBtn);
|
|
1007
957
|
}
|
|
1008
958
|
async doesIndexDocumentInTreeContainName(parentName, childName, index) {
|
|
1009
|
-
await (0, test_1.expect)(this.documentTreeItem.locator(
|
|
959
|
+
await (0, test_1.expect)(this.documentTreeItem.locator(`[label="${parentName}"]`).locator('umb-tree-item').nth(index).locator('#label')).toHaveText(childName);
|
|
1010
960
|
}
|
|
1011
961
|
async selectMemberGroup(memberGroupName) {
|
|
1012
|
-
await
|
|
1013
|
-
await this.uuiCheckbox.getByLabel(memberGroupName).click();
|
|
962
|
+
await this.click(this.uuiCheckbox.getByLabel(memberGroupName));
|
|
1014
963
|
}
|
|
1015
964
|
async isPermissionInActionsMenuVisible(permissionName, isVisible = true) {
|
|
1016
965
|
await (0, test_1.expect)(this.actionsMenu.getByRole('button', {
|
|
@@ -1019,140 +968,106 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
1019
968
|
})).toBeVisible({ visible: isVisible });
|
|
1020
969
|
}
|
|
1021
970
|
async clickDocumentLinkButton() {
|
|
1022
|
-
await
|
|
1023
|
-
await this.linkToDocumentBtn.click();
|
|
971
|
+
await this.click(this.linkToDocumentBtn);
|
|
1024
972
|
}
|
|
1025
973
|
async clickMediaLinkButton() {
|
|
1026
|
-
await
|
|
1027
|
-
await this.linkToMediaBtn.click();
|
|
974
|
+
await this.click(this.linkToMediaBtn);
|
|
1028
975
|
}
|
|
1029
976
|
async clickManualLinkButton() {
|
|
1030
|
-
await
|
|
1031
|
-
await this.linkToManualBtn.click();
|
|
977
|
+
await this.click(this.linkToManualBtn);
|
|
1032
978
|
}
|
|
1033
979
|
// Block Grid - Block List
|
|
1034
980
|
async clickAddBlockElementButton() {
|
|
1035
|
-
await
|
|
1036
|
-
await this.addBlockElementBtn.click();
|
|
981
|
+
await this.click(this.addBlockElementBtn);
|
|
1037
982
|
}
|
|
1038
983
|
async clickAddBlockWithNameButton(name) {
|
|
1039
|
-
await
|
|
1040
|
-
await this.page.getByLabel('Add ' + name).click();
|
|
984
|
+
await this.click(this.page.getByLabel(`Add ${name}`));
|
|
1041
985
|
}
|
|
1042
986
|
async clickCreateForModalWithHeadline(headline) {
|
|
1043
|
-
await
|
|
1044
|
-
await this.page.locator('[headline="' + headline + '"]').getByLabel('Create').click();
|
|
987
|
+
await this.click(this.page.locator(`[headline="${headline}"]`).getByLabel('Create'));
|
|
1045
988
|
}
|
|
1046
989
|
async isAddBlockElementButtonVisible(isVisible = true) {
|
|
1047
|
-
await
|
|
990
|
+
await this.isVisible(this.addBlockElementBtn, isVisible);
|
|
1048
991
|
}
|
|
1049
992
|
async isAddBlockElementButtonWithLabelVisible(blockName, label, isVisible = true) {
|
|
1050
|
-
await
|
|
993
|
+
await this.isVisible(this.property.filter({ hasText: blockName }).locator(this.addBlockElementBtn).filter({ hasText: label }), isVisible);
|
|
1051
994
|
}
|
|
1052
995
|
async doesFormValidationMessageContainText(text) {
|
|
1053
|
-
await
|
|
996
|
+
await this.containsText(this.formValidationMessage, text);
|
|
1054
997
|
}
|
|
1055
998
|
async doesBlockElementHaveName(name) {
|
|
1056
|
-
await
|
|
999
|
+
await this.containsText(this.blockName, name);
|
|
1057
1000
|
}
|
|
1058
1001
|
async clickAddBlockSettingsTabButton() {
|
|
1059
|
-
await
|
|
1060
|
-
await this.addBlockSettingsTabBtn.click();
|
|
1002
|
+
await this.click(this.addBlockSettingsTabBtn);
|
|
1061
1003
|
}
|
|
1062
1004
|
async clickEditBlockGridBlockButton() {
|
|
1063
|
-
await
|
|
1064
|
-
await this.blockGridEntry.hover();
|
|
1065
|
-
await (0, test_1.expect)(this.editBlockEntryBtn).toBeVisible();
|
|
1066
|
-
await this.editBlockEntryBtn.click();
|
|
1005
|
+
await this.hoverAndClick(this.blockGridEntry, this.editBlockEntryBtn);
|
|
1067
1006
|
}
|
|
1068
1007
|
async clickDeleteBlockGridBlockButton() {
|
|
1069
|
-
await
|
|
1070
|
-
await this.blockGridEntry.hover();
|
|
1071
|
-
await (0, test_1.expect)(this.deleteBlockEntryBtn).toBeVisible();
|
|
1072
|
-
await this.deleteBlockEntryBtn.click();
|
|
1008
|
+
await this.hoverAndClick(this.blockGridEntry, this.deleteBlockEntryBtn);
|
|
1073
1009
|
}
|
|
1074
1010
|
async clickEditBlockListBlockButton() {
|
|
1075
|
-
await
|
|
1076
|
-
await this.blockListEntry.hover();
|
|
1077
|
-
await (0, test_1.expect)(this.editBlockEntryBtn).toBeVisible();
|
|
1078
|
-
await this.editBlockEntryBtn.click();
|
|
1011
|
+
await this.hoverAndClick(this.blockListEntry, this.editBlockEntryBtn);
|
|
1079
1012
|
}
|
|
1080
1013
|
async clickDeleteBlockListBlockButton() {
|
|
1081
|
-
await
|
|
1082
|
-
await this.blockListEntry.hover();
|
|
1083
|
-
await (0, test_1.expect)(this.deleteBlockEntryBtn).toBeVisible();
|
|
1084
|
-
await this.deleteBlockEntryBtn.click();
|
|
1014
|
+
await this.hoverAndClick(this.blockListEntry, this.deleteBlockEntryBtn);
|
|
1085
1015
|
}
|
|
1086
1016
|
async clickCopyBlockListBlockButton(groupName, propertyName, blockName, index = 0) {
|
|
1087
1017
|
const blockListBlock = this.workspaceEditTab.filter({ hasText: groupName }).locator(this.workspaceEditProperties).filter({ hasText: propertyName }).locator(this.blockListEntry).nth(index).filter({ hasText: blockName });
|
|
1088
|
-
await blockListBlock.
|
|
1089
|
-
await
|
|
1090
|
-
await blockListBlock.locator(this.copyBlockEntryBtn).click({ force: true });
|
|
1091
|
-
await this.page.waitForTimeout(500);
|
|
1018
|
+
await this.hoverAndClick(blockListBlock, blockListBlock.locator(this.copyBlockEntryBtn), { force: true });
|
|
1019
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.short);
|
|
1092
1020
|
}
|
|
1093
1021
|
async clickCopyBlockGridBlockButton(groupName, propertyName, blockName, index = 0) {
|
|
1094
1022
|
const blockGridBlock = this.workspaceEditTab.filter({ hasText: groupName }).locator(this.workspaceEditProperties).filter({ hasText: propertyName }).locator(this.blockGridEntry).nth(index).filter({ hasText: blockName });
|
|
1095
|
-
await blockGridBlock.
|
|
1096
|
-
await
|
|
1097
|
-
await blockGridBlock.locator(this.copyBlockEntryBtn).click({ force: true });
|
|
1098
|
-
await this.page.waitForTimeout(500);
|
|
1023
|
+
await this.hoverAndClick(blockGridBlock, blockGridBlock.locator(this.copyBlockEntryBtn), { force: true });
|
|
1024
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.short);
|
|
1099
1025
|
}
|
|
1100
1026
|
async clickPasteFromClipboardButtonForProperty(groupName, propertyName) {
|
|
1101
|
-
await this.page.waitForTimeout(
|
|
1027
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.short);
|
|
1102
1028
|
const property = this.workspaceEditTab.filter({ hasText: groupName }).locator(this.property).filter({ hasText: propertyName });
|
|
1103
|
-
await
|
|
1104
|
-
await (0, test_1.expect)(property.locator(this.pasteFromClipboardBtn)).toBeVisible();
|
|
1105
|
-
await property.locator(this.pasteFromClipboardBtn).click({ force: true });
|
|
1029
|
+
await this.click(property.locator(this.pasteFromClipboardBtn), { force: true });
|
|
1106
1030
|
}
|
|
1107
1031
|
async clickActionsMenuForProperty(groupName, propertyName) {
|
|
1108
1032
|
const property = this.workspaceEditTab.filter({ hasText: groupName }).locator(this.workspaceEditProperties).filter({ hasText: propertyName });
|
|
1109
|
-
await property.
|
|
1110
|
-
await (0, test_1.expect)(property.locator(this.openActionsMenu)).toBeVisible();
|
|
1111
|
-
await property.locator(this.openActionsMenu).click({ force: true });
|
|
1033
|
+
await this.hoverAndClick(property, property.locator(this.openActionsMenu), { force: true });
|
|
1112
1034
|
}
|
|
1113
1035
|
async clickAddBlockGridElementWithName(elementTypeName) {
|
|
1114
|
-
await
|
|
1115
|
-
await this.page.getByRole('link', { name: 'Add ' + elementTypeName, exact: true }).click();
|
|
1036
|
+
await this.click(this.page.getByRole('link', { name: `Add ${elementTypeName}`, exact: true }));
|
|
1116
1037
|
}
|
|
1117
1038
|
async clickEditBlockListEntryWithName(blockListElementName) {
|
|
1118
|
-
await
|
|
1119
|
-
await this.blockListEntry.filter({ hasText: blockListElementName }).getByLabel('edit').click({ force: true });
|
|
1039
|
+
await this.click(this.blockListEntry.filter({ hasText: blockListElementName }).getByLabel('edit'), { force: true });
|
|
1120
1040
|
}
|
|
1121
1041
|
async clickSelectBlockElementWithName(elementTypeName) {
|
|
1122
|
-
await
|
|
1123
|
-
await this.page.getByRole('button', { name: elementTypeName, exact: true }).click();
|
|
1042
|
+
await this.click(this.page.getByRole('button', { name: elementTypeName, exact: true }));
|
|
1124
1043
|
}
|
|
1125
1044
|
async clickSelectBlockElementInAreaWithName(elementTypeName) {
|
|
1126
|
-
await
|
|
1127
|
-
await this.container.getByRole('button', { name: elementTypeName, exact: true }).click();
|
|
1045
|
+
await this.click(this.container.getByRole('button', { name: elementTypeName, exact: true }));
|
|
1128
1046
|
}
|
|
1129
1047
|
async clickBlockElementWithName(elementTypeName) {
|
|
1130
|
-
await
|
|
1131
|
-
await this.page.getByRole('link', { name: elementTypeName, exact: true }).click({ force: true });
|
|
1048
|
+
await this.click(this.page.getByRole('link', { name: elementTypeName, exact: true }), { force: true });
|
|
1132
1049
|
}
|
|
1133
1050
|
async enterPropertyValue(propertyName, value) {
|
|
1134
1051
|
const property = this.property.filter({ hasText: propertyName });
|
|
1135
|
-
await
|
|
1136
|
-
await property.locator('input').clear();
|
|
1137
|
-
await property.locator('input').fill(value);
|
|
1052
|
+
await this.enterText(property.locator('input'), value);
|
|
1138
1053
|
}
|
|
1139
1054
|
async doesBlockContainBlockInAreaWithName(blockWithAreaName, areaName, blockInAreaName, index = 0) {
|
|
1140
1055
|
const blockWithArea = this.blockGridEntry.locator(this.blockGridBlock.filter({ hasText: blockWithAreaName })).nth(index);
|
|
1141
|
-
const area = blockWithArea.locator(this.blockGridAreasContainer).locator(
|
|
1056
|
+
const area = blockWithArea.locator(this.blockGridAreasContainer).locator(`[data-area-alias="${areaName}"]`);
|
|
1142
1057
|
const blockInArea = area.locator(this.blockGridEntry.filter({ hasText: blockInAreaName }));
|
|
1143
|
-
await
|
|
1058
|
+
await this.waitForVisible(blockInArea);
|
|
1144
1059
|
}
|
|
1145
1060
|
async doesBlockContainBlockCountInArea(blockWithAreaName, areaName, blocksInAreaCount, index = 0) {
|
|
1146
1061
|
const blockWithArea = this.blockGridEntry.locator(this.blockGridBlock.filter({ hasText: blockWithAreaName })).nth(index);
|
|
1147
|
-
const area = blockWithArea.locator(this.blockGridAreasContainer).locator(
|
|
1062
|
+
const area = blockWithArea.locator(this.blockGridAreasContainer).locator(`[data-area-alias="${areaName}"]`);
|
|
1148
1063
|
const blocks = area.locator(this.blockGridEntry);
|
|
1149
|
-
await (
|
|
1064
|
+
await this.hasCount(blocks, blocksInAreaCount);
|
|
1150
1065
|
}
|
|
1151
1066
|
async doesBlockContainCountOfBlockInArea(blockWithAreaName, areaName, blockInAreaName, count, index = 0) {
|
|
1152
1067
|
const blockWithArea = this.blockGridEntry.locator(this.blockGridBlock.filter({ hasText: blockWithAreaName })).nth(index);
|
|
1153
|
-
const area = blockWithArea.locator(this.blockGridAreasContainer).locator(
|
|
1068
|
+
const area = blockWithArea.locator(this.blockGridAreasContainer).locator(`[data-area-alias="${areaName}"]`);
|
|
1154
1069
|
const blockInArea = area.locator(this.blockGridEntry.filter({ hasText: blockInAreaName }));
|
|
1155
|
-
await (
|
|
1070
|
+
await this.hasCount(blockInArea, count);
|
|
1156
1071
|
}
|
|
1157
1072
|
async getBlockAtRootDataElementKey(blockName, index = 0) {
|
|
1158
1073
|
const blockGridEntrySelector = 'umb-block-grid-entry';
|
|
@@ -1164,40 +1079,38 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
1164
1079
|
}
|
|
1165
1080
|
async getBlockDataElementKeyInArea(parentBlockName, areaName, blockName, parentIndex = 0, childIndex = 0) {
|
|
1166
1081
|
const parentBlock = this.blockGridEntry.locator(this.blockGridBlock.filter({ hasText: parentBlockName })).nth(parentIndex);
|
|
1167
|
-
const area = parentBlock.locator(this.blockGridAreasContainer).locator(
|
|
1082
|
+
const area = parentBlock.locator(this.blockGridAreasContainer).locator(`[data-area-alias="${areaName}"]`);
|
|
1168
1083
|
const block = area.locator(this.blockGridEntry.filter({ hasText: blockName })).nth(childIndex);
|
|
1169
1084
|
return block.getAttribute('data-element-key');
|
|
1170
1085
|
}
|
|
1171
1086
|
async removeBlockFromArea(parentBlockName, areaName, blockName, parentIndex = 0, childIndex = 0) {
|
|
1172
1087
|
const parentBlock = this.blockGridEntry.locator(this.blockGridBlock.filter({ hasText: parentBlockName })).nth(parentIndex);
|
|
1173
|
-
const area = parentBlock.locator(this.blockGridAreasContainer).locator(
|
|
1088
|
+
const area = parentBlock.locator(this.blockGridAreasContainer).locator(`[data-area-alias="${areaName}"]`);
|
|
1174
1089
|
const block = area.locator(this.blockGridEntry.filter({ hasText: blockName })).nth(childIndex);
|
|
1175
|
-
await block.
|
|
1176
|
-
await block.getByLabel('delete').click({ force: true });
|
|
1090
|
+
await this.hoverAndClick(block, block.getByLabel('delete'), { force: true });
|
|
1177
1091
|
}
|
|
1178
1092
|
async doesBlockAreaContainColumnSpan(blockWithAreaName, areaName, columnSpan, index = 0) {
|
|
1179
1093
|
const blockWithArea = this.blockGridEntry.locator(this.blockGridBlock.filter({ hasText: blockWithAreaName })).nth(index);
|
|
1180
|
-
const area = blockWithArea.locator(this.blockGridAreasContainer).locator(
|
|
1181
|
-
await (
|
|
1094
|
+
const area = blockWithArea.locator(this.blockGridAreasContainer).locator(`[data-area-alias="${areaName}"]`);
|
|
1095
|
+
await this.hasAttribute(area, 'data-area-col-span', columnSpan.toString());
|
|
1182
1096
|
}
|
|
1183
1097
|
async doesBlockAreaContainRowSpan(blockWithAreaName, areaName, rowSpan, index = 0) {
|
|
1184
1098
|
const blockWithArea = this.blockGridEntry.locator(this.blockGridBlock.filter({ hasText: blockWithAreaName })).nth(index);
|
|
1185
|
-
const area = blockWithArea.locator(this.blockGridAreasContainer).locator(
|
|
1186
|
-
await (
|
|
1099
|
+
const area = blockWithArea.locator(this.blockGridAreasContainer).locator(`[data-area-alias="${areaName}"]`);
|
|
1100
|
+
await this.hasAttribute(area, 'data-area-row-span', rowSpan.toString());
|
|
1187
1101
|
}
|
|
1188
1102
|
async clickInlineAddToAreaButton(parentBlockName, areaName, parentIndex = 0, buttonIndex = 1) {
|
|
1189
1103
|
const parentBlock = this.blockGridEntry.locator(this.blockGridBlock.filter({ hasText: parentBlockName })).nth(parentIndex);
|
|
1190
|
-
const area = parentBlock.locator(this.blockGridAreasContainer).locator(
|
|
1191
|
-
await area.locator(this.inlineCreateBtn).nth(buttonIndex)
|
|
1104
|
+
const area = parentBlock.locator(this.blockGridAreasContainer).locator(`[data-area-alias="${areaName}"]`);
|
|
1105
|
+
await this.click(area.locator(this.inlineCreateBtn).nth(buttonIndex));
|
|
1192
1106
|
}
|
|
1193
1107
|
async addBlockToAreasWithExistingBlock(blockWithAreaName, areaName, parentIndex = 0, addToIndex = 0) {
|
|
1194
1108
|
const blockWithArea = this.blockGridEntry.locator(this.blockGridBlock).filter({ hasText: blockWithAreaName }).nth(parentIndex);
|
|
1195
|
-
await
|
|
1196
|
-
|
|
1197
|
-
const area = blockWithArea.locator(this.blockGridAreasContainer).locator('[data-area-alias="' + areaName + '"]');
|
|
1109
|
+
await this.hover(blockWithArea);
|
|
1110
|
+
const area = blockWithArea.locator(this.blockGridAreasContainer).locator(`[data-area-alias="${areaName}"]`);
|
|
1198
1111
|
const addBlockBtn = area.locator(this.inlineCreateBtn).nth(addToIndex);
|
|
1199
|
-
await
|
|
1200
|
-
await
|
|
1112
|
+
await this.hover(addBlockBtn, { force: true });
|
|
1113
|
+
await this.click(addBlockBtn, { force: true });
|
|
1201
1114
|
}
|
|
1202
1115
|
async doesBlockGridBlockWithAreaContainCreateLabel(blockWithAreaName, createLabel, index = 0) {
|
|
1203
1116
|
const blockWithArea = this.blockGridEntry.locator(this.blockGridBlock.filter({ hasText: blockWithAreaName })).nth(index);
|
|
@@ -1207,20 +1120,16 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
1207
1120
|
await (0, test_1.expect)(this.property.filter({ hasText: propertyName }).locator('input')).toHaveValue(value);
|
|
1208
1121
|
}
|
|
1209
1122
|
async clickCreateButtonForModalWithElementTypeNameAndGroupName(headlineName, groupName) {
|
|
1210
|
-
await
|
|
1211
|
-
await this.blockWorkspace.filter({ hasText: 'Add ' + headlineName }).filter({ hasText: groupName }).getByLabel('Create').click();
|
|
1123
|
+
await this.click(this.blockWorkspace.filter({ hasText: `Add ${headlineName}` }).filter({ hasText: groupName }).getByLabel('Create'));
|
|
1212
1124
|
}
|
|
1213
1125
|
async clickUpdateButtonForModalWithElementTypeNameAndGroupName(headlineName, groupName) {
|
|
1214
|
-
await
|
|
1215
|
-
await this.blockWorkspace.filter({ hasText: 'Edit ' + headlineName }).filter({ hasText: groupName }).locator(this.updateBtn).click();
|
|
1126
|
+
await this.click(this.blockWorkspace.filter({ hasText: `Edit ${headlineName}` }).filter({ hasText: groupName }).locator(this.updateBtn));
|
|
1216
1127
|
}
|
|
1217
1128
|
async clickExactCopyButton() {
|
|
1218
|
-
await
|
|
1219
|
-
await this.exactCopyBtn.click();
|
|
1129
|
+
await this.click(this.exactCopyBtn);
|
|
1220
1130
|
}
|
|
1221
1131
|
async clickExactReplaceButton() {
|
|
1222
|
-
await
|
|
1223
|
-
await this.replaceExactBtn.click();
|
|
1132
|
+
await this.click(this.replaceExactBtn);
|
|
1224
1133
|
}
|
|
1225
1134
|
async doesClipboardHaveCopiedBlockWithName(contentName, propertyName, blockName, index = 0) {
|
|
1226
1135
|
await (0, test_1.expect)(this.clipboardEntryPicker.getByLabel(`${contentName} - ${propertyName} - ${blockName}`).nth(index)).toBeVisible();
|
|
@@ -1229,84 +1138,73 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
1229
1138
|
await (0, test_1.expect)(this.clipboardEntryPicker.getByLabel(`${contentName} - ${propertyName}`).nth(index)).toBeVisible();
|
|
1230
1139
|
}
|
|
1231
1140
|
async doesClipboardContainCopiedBlocksCount(count) {
|
|
1232
|
-
await
|
|
1141
|
+
await this.hasCount(this.clipboardEntryPicker.locator(this.menuItem), count);
|
|
1233
1142
|
}
|
|
1234
1143
|
async selectClipboardEntryWithName(contentName, propertyName, blockName, index = 0) {
|
|
1235
1144
|
await this.doesClipboardHaveCopiedBlockWithName(contentName, propertyName, blockName, index);
|
|
1236
|
-
await this.clipboardEntryPicker.getByLabel(`${contentName} - ${propertyName} - ${blockName}`).nth(index)
|
|
1145
|
+
await this.click(this.clipboardEntryPicker.getByLabel(`${contentName} - ${propertyName} - ${blockName}`).nth(index));
|
|
1237
1146
|
}
|
|
1238
1147
|
async selectClipboardEntriesWithName(contentName, propertyName, index = 0) {
|
|
1239
1148
|
await this.doesClipboardHaveCopiedBlocks(contentName, propertyName, index);
|
|
1240
|
-
await this.clipboardEntryPicker.getByLabel(`${contentName} - ${propertyName}`).nth(index)
|
|
1149
|
+
await this.click(this.clipboardEntryPicker.getByLabel(`${contentName} - ${propertyName}`).nth(index));
|
|
1241
1150
|
}
|
|
1242
1151
|
async goToBlockGridBlockWithName(groupName, propertyName, blockName, index = 0) {
|
|
1243
1152
|
const blockGridBlock = this.workspaceEditTab.filter({ hasText: groupName }).locator(this.workspaceEditProperties).filter({ hasText: propertyName }).locator(this.blockGridEntry).nth(index).filter({ hasText: blockName });
|
|
1244
|
-
await
|
|
1245
|
-
await blockGridBlock.click();
|
|
1153
|
+
await this.click(blockGridBlock);
|
|
1246
1154
|
}
|
|
1247
1155
|
async goToBlockListBlockWithName(groupName, propertyName, blockName, index = 0) {
|
|
1248
1156
|
const blocklistBlock = this.workspaceEditTab.filter({ hasText: groupName }).locator(this.workspaceEditProperties).filter({ hasText: propertyName }).locator(this.blockListEntry).nth(index).filter({ hasText: blockName });
|
|
1249
|
-
await
|
|
1250
|
-
await blocklistBlock.click();
|
|
1157
|
+
await this.click(blocklistBlock);
|
|
1251
1158
|
}
|
|
1252
1159
|
async doesBlockEditorBlockWithNameContainValue(groupName, propertyName, inputType = ConstantHelper_1.ConstantHelper.inputTypes.general, value) {
|
|
1253
1160
|
await (0, test_1.expect)(this.blockWorkspaceEditTab.filter({ hasText: groupName }).locator(this.property).filter({ hasText: propertyName }).locator(inputType)).toContainText(value);
|
|
1254
1161
|
}
|
|
1255
1162
|
async clickCloseButton() {
|
|
1256
|
-
await
|
|
1257
|
-
await this.closeBtn.click();
|
|
1163
|
+
await this.click(this.closeBtn);
|
|
1258
1164
|
}
|
|
1259
1165
|
async clickPasteButton() {
|
|
1260
|
-
await
|
|
1261
|
-
await this.pasteBtn.click({ force: true });
|
|
1166
|
+
await this.click(this.pasteBtn, { force: true });
|
|
1262
1167
|
}
|
|
1263
1168
|
async doesBlockListPropertyHaveBlockAmount(groupName, propertyName, amount) {
|
|
1264
|
-
await
|
|
1169
|
+
await this.hasCount(this.workspaceEditTab.filter({ hasText: groupName }).locator(this.workspaceEditProperties).filter({ hasText: propertyName }).locator(this.blockListEntry), amount);
|
|
1265
1170
|
}
|
|
1266
1171
|
async doesBlockGridPropertyHaveBlockAmount(groupName, propertyName, amount) {
|
|
1267
|
-
await
|
|
1172
|
+
await this.hasCount(this.workspaceEditTab.filter({ hasText: groupName }).locator(this.workspaceEditProperties).filter({ hasText: propertyName }).locator(this.blockGridEntry), amount);
|
|
1268
1173
|
}
|
|
1269
1174
|
async doesPropertyContainValidationMessage(groupName, propertyName, message) {
|
|
1270
1175
|
await (0, test_1.expect)(this.blockWorkspaceEditTab.filter({ hasText: groupName }).locator(this.property).filter({ hasText: propertyName }).locator(this.validationMessage)).toContainText(message);
|
|
1271
1176
|
}
|
|
1272
1177
|
async clickInsertBlockButton() {
|
|
1273
|
-
await
|
|
1274
|
-
await this.insertBlockBtn.click();
|
|
1178
|
+
await this.click(this.insertBlockBtn);
|
|
1275
1179
|
}
|
|
1276
1180
|
// TipTap
|
|
1277
1181
|
async enterRTETipTapEditor(value) {
|
|
1278
|
-
await
|
|
1279
|
-
await this.tipTapEditor.clear();
|
|
1280
|
-
await this.tipTapEditor.fill(value);
|
|
1182
|
+
await this.enterText(this.tipTapEditor, value);
|
|
1281
1183
|
}
|
|
1282
1184
|
async enterRTETipTapEditorWithName(name, value) {
|
|
1283
|
-
const tipTapEditorLocator = this.page.locator(
|
|
1284
|
-
await (
|
|
1285
|
-
await tipTapEditorLocator.clear();
|
|
1286
|
-
await tipTapEditorLocator.fill(value);
|
|
1185
|
+
const tipTapEditorLocator = this.page.locator(`[data-mark="property:${name}"]`).locator(this.tipTapEditor);
|
|
1186
|
+
await this.enterText(tipTapEditorLocator, value);
|
|
1287
1187
|
}
|
|
1288
1188
|
async clickTipTapToolbarIconWithTitle(iconTitle) {
|
|
1289
|
-
await
|
|
1290
|
-
await this.tipTapPropertyEditor.getByTitle(iconTitle, { exact: true }).locator('svg').click();
|
|
1189
|
+
await this.click(this.tipTapPropertyEditor.getByTitle(iconTitle, { exact: true }).locator('svg'));
|
|
1291
1190
|
}
|
|
1292
1191
|
async doesUploadedSvgThumbnailHaveSrc(imageSrc) {
|
|
1293
|
-
await
|
|
1294
|
-
await (0, test_1.expect)(this.uploadedSvgThumbnail).toHaveAttribute('src', imageSrc);
|
|
1192
|
+
await this.hasAttribute(this.uploadedSvgThumbnail, 'src', imageSrc);
|
|
1295
1193
|
}
|
|
1296
1194
|
async doesRichTextEditorBlockContainLabel(richTextEditorAlias, label) {
|
|
1297
|
-
await (0, test_1.expect)(this.page.getByTestId(
|
|
1195
|
+
await (0, test_1.expect)(this.page.getByTestId(`property:${richTextEditorAlias}`).locator(this.rteBlock)).toContainText(label);
|
|
1298
1196
|
}
|
|
1299
1197
|
async doesBlockEditorModalContainEditorSize(editorSize, elementName) {
|
|
1300
|
-
await (0, test_1.expect)(this.backofficeModalContainer.locator(
|
|
1198
|
+
await (0, test_1.expect)(this.backofficeModalContainer.locator(`[size="${editorSize}"]`).locator(`[headline="Add ${elementName}"]`)).toBeVisible();
|
|
1301
1199
|
}
|
|
1302
1200
|
async doesBlockEditorModalContainInline(richTextEditorAlias, elementName) {
|
|
1303
|
-
await (0, test_1.expect)(this.page.getByTestId(
|
|
1201
|
+
await (0, test_1.expect)(this.page.getByTestId(`property:${richTextEditorAlias}`).locator(this.tiptapInput).locator(this.rteBlockInline)).toContainText(elementName);
|
|
1304
1202
|
}
|
|
1305
1203
|
async doesBlockHaveBackgroundColor(elementName, backgroundColor) {
|
|
1306
|
-
await (0, test_1.expect)(this.page.locator('umb-block-type-card', { hasText: elementName }).locator(
|
|
1204
|
+
await (0, test_1.expect)(this.page.locator('umb-block-type-card', { hasText: elementName }).locator(`[style="background-color:${backgroundColor};"]`)).toBeVisible();
|
|
1307
1205
|
}
|
|
1308
1206
|
async doesBlockHaveIconColor(elementName, backgroundColor) {
|
|
1309
|
-
await (0, test_1.expect)(this.page.locator('umb-block-type-card', { hasText: elementName }).locator(
|
|
1207
|
+
await (0, test_1.expect)(this.page.locator('umb-block-type-card', { hasText: elementName }).locator(`[color="${backgroundColor}"]`)).toBeVisible();
|
|
1310
1208
|
}
|
|
1311
1209
|
async addDocumentDomain(domainName, languageName) {
|
|
1312
1210
|
await this.clickCultureAndHostnamesButton();
|
|
@@ -1317,154 +1215,135 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
1317
1215
|
}
|
|
1318
1216
|
// Scheduled Publishing
|
|
1319
1217
|
async clickViewMoreOptionsButton() {
|
|
1320
|
-
await
|
|
1321
|
-
await this.viewMoreOptionsBtn.click();
|
|
1218
|
+
await this.click(this.viewMoreOptionsBtn);
|
|
1322
1219
|
}
|
|
1323
1220
|
async clickSchedulePublishButton() {
|
|
1324
|
-
await
|
|
1325
|
-
await this.schedulePublishBtn.click();
|
|
1221
|
+
await this.click(this.schedulePublishBtn);
|
|
1326
1222
|
}
|
|
1327
1223
|
async clickSchedulePublishModalButton() {
|
|
1328
|
-
await
|
|
1329
|
-
await this.schedulePublishModalBtn.click();
|
|
1224
|
+
await this.click(this.schedulePublishModalBtn);
|
|
1330
1225
|
}
|
|
1331
1226
|
async enterPublishTime(time, index = 0) {
|
|
1332
1227
|
const publishAtTxt = this.documentScheduleModal.locator('.publish-date').nth(index).locator('uui-form-layout-item').first().locator('#input');
|
|
1333
|
-
await (
|
|
1334
|
-
await publishAtTxt.fill(time);
|
|
1228
|
+
await this.enterText(publishAtTxt, time);
|
|
1335
1229
|
}
|
|
1336
1230
|
async enterUnpublishTime(time, index = 0) {
|
|
1337
1231
|
const unpublishAtTxt = this.documentScheduleModal.locator('.publish-date').nth(index).locator('uui-form-layout-item').last().locator('#input');
|
|
1338
|
-
await (
|
|
1339
|
-
await unpublishAtTxt.fill(time);
|
|
1232
|
+
await this.enterText(unpublishAtTxt, time);
|
|
1340
1233
|
}
|
|
1341
1234
|
async doesPublishAtValidationMessageContainText(text) {
|
|
1342
|
-
await
|
|
1235
|
+
await this.containsText(this.publishAtValidationMessage, text);
|
|
1343
1236
|
}
|
|
1344
1237
|
async doesUnpublishAtValidationMessageContainText(text) {
|
|
1345
|
-
await
|
|
1238
|
+
await this.containsText(this.unpublishAtValidationMessage, text);
|
|
1346
1239
|
}
|
|
1347
1240
|
async doesLastPublishedContainText(text) {
|
|
1348
|
-
await
|
|
1241
|
+
await this.containsText(this.lastPublished, text);
|
|
1349
1242
|
}
|
|
1350
1243
|
async doesPublishAtContainText(text) {
|
|
1351
|
-
await
|
|
1244
|
+
await this.containsText(this.publishAt, text);
|
|
1352
1245
|
}
|
|
1353
1246
|
async doesRemoveAtContainText(text) {
|
|
1354
|
-
await
|
|
1247
|
+
await this.containsText(this.removeAt, text);
|
|
1355
1248
|
}
|
|
1356
1249
|
async clickSelectAllCheckbox() {
|
|
1357
|
-
await
|
|
1358
|
-
await this.selectAllCheckbox.click();
|
|
1250
|
+
await this.click(this.selectAllCheckbox);
|
|
1359
1251
|
}
|
|
1360
1252
|
async doesSchedulePublishModalButtonContainDisabledTag(hasDisabledTag = false) {
|
|
1361
1253
|
if (!hasDisabledTag) {
|
|
1362
|
-
|
|
1254
|
+
await (0, test_1.expect)(this.schedulePublishModalBtn).not.toHaveAttribute('disabled', '');
|
|
1255
|
+
}
|
|
1256
|
+
else {
|
|
1257
|
+
await this.hasAttribute(this.schedulePublishModalBtn, 'disabled', '');
|
|
1363
1258
|
}
|
|
1364
|
-
return await (0, test_1.expect)(this.schedulePublishModalBtn).toHaveAttribute('disabled', '');
|
|
1365
1259
|
}
|
|
1366
1260
|
async clickInlineBlockCaretButtonForName(blockEditorName, index = 0) {
|
|
1367
1261
|
const caretButtonLocator = this.blockListEntry.filter({ hasText: blockEditorName }).nth(index).locator('uui-symbol-expand svg');
|
|
1368
|
-
await
|
|
1369
|
-
await caretButtonLocator.click();
|
|
1262
|
+
await this.click(caretButtonLocator);
|
|
1370
1263
|
}
|
|
1371
1264
|
async doesTiptapHaveWordCount(count) {
|
|
1372
|
-
await
|
|
1265
|
+
await this.hasText(this.tiptapStatusbarWordCount, `${count} words`);
|
|
1373
1266
|
}
|
|
1374
1267
|
async doesTiptapHaveCharacterCount(count) {
|
|
1375
|
-
await
|
|
1268
|
+
await this.hasText(this.tiptapStatusbarWordCount, `${count} characters`);
|
|
1376
1269
|
}
|
|
1377
1270
|
async clickTiptapWordCountButton() {
|
|
1378
|
-
await
|
|
1379
|
-
await this.tiptapStatusbarWordCount.click();
|
|
1271
|
+
await this.click(this.tiptapStatusbarWordCount);
|
|
1380
1272
|
}
|
|
1381
1273
|
async doesElementPathHaveText(text) {
|
|
1382
|
-
await
|
|
1274
|
+
await this.hasText(this.tiptapStatusbarElementPath, text);
|
|
1383
1275
|
}
|
|
1384
1276
|
async clickConfirmToPublishButton() {
|
|
1385
|
-
await this.
|
|
1277
|
+
await this.click(this.confirmToPublishBtn);
|
|
1386
1278
|
}
|
|
1387
1279
|
async clickPublishWithDescendantsButton() {
|
|
1388
|
-
await
|
|
1389
|
-
await this.publishWithDescendantsBtn.click();
|
|
1280
|
+
await this.click(this.publishWithDescendantsBtn);
|
|
1390
1281
|
}
|
|
1391
1282
|
async clickIncludeUnpublishedDescendantsToggle() {
|
|
1392
|
-
await
|
|
1393
|
-
await this.includeUnpublishedDescendantsToggle.click();
|
|
1283
|
+
await this.click(this.includeUnpublishedDescendantsToggle);
|
|
1394
1284
|
}
|
|
1395
1285
|
async clickPublishWithDescendantsModalButton() {
|
|
1396
|
-
await
|
|
1397
|
-
await this.publishWithDescendantsModalBtn.click();
|
|
1286
|
+
await this.click(this.publishWithDescendantsModalBtn);
|
|
1398
1287
|
}
|
|
1399
1288
|
async doesDocumentVariantLanguageItemHaveCount(count) {
|
|
1400
|
-
await
|
|
1289
|
+
await this.hasCount(this.documentVariantLanguageItem, count);
|
|
1401
1290
|
}
|
|
1402
1291
|
async doesDocumentVariantLanguageItemHaveName(name) {
|
|
1403
|
-
await
|
|
1292
|
+
await this.containsText(this.documentVariantLanguagePicker, name);
|
|
1404
1293
|
}
|
|
1405
1294
|
async clickSchedulePublishLanguageButton(languageName) {
|
|
1406
|
-
await
|
|
1407
|
-
await this.page.getByRole('menu').filter({ hasText: languageName }).click();
|
|
1295
|
+
await this.click(this.page.getByRole('menu').filter({ hasText: languageName }));
|
|
1408
1296
|
}
|
|
1409
1297
|
async clickBlockCardWithName(name, toForce = false) {
|
|
1410
1298
|
const blockWithNameLocator = this.page.locator('uui-card-block-type', { hasText: name });
|
|
1411
|
-
await (
|
|
1412
|
-
await blockWithNameLocator.click({ force: toForce });
|
|
1299
|
+
await this.click(blockWithNameLocator, { force: toForce });
|
|
1413
1300
|
}
|
|
1414
1301
|
async clickStyleSelectButton() {
|
|
1415
|
-
await
|
|
1416
|
-
await this.styleSelectBtn.click();
|
|
1302
|
+
await this.click(this.styleSelectBtn);
|
|
1417
1303
|
}
|
|
1418
1304
|
async clickCascadingMenuItemWithName(name) {
|
|
1419
|
-
const menuItemLocator = this.cascadingMenuContainer.locator(
|
|
1420
|
-
await
|
|
1421
|
-
await menuItemLocator.click();
|
|
1305
|
+
const menuItemLocator = this.cascadingMenuContainer.locator(`uui-menu-item[label="${name}"]`);
|
|
1306
|
+
await this.click(menuItemLocator);
|
|
1422
1307
|
}
|
|
1423
1308
|
async hoverCascadingMenuItemWithName(name) {
|
|
1424
|
-
const menuItemLocator = this.cascadingMenuContainer.locator(
|
|
1425
|
-
await
|
|
1426
|
-
await menuItemLocator.hover();
|
|
1309
|
+
const menuItemLocator = this.cascadingMenuContainer.locator(`uui-menu-item[label="${name}"]`);
|
|
1310
|
+
await this.hover(menuItemLocator);
|
|
1427
1311
|
}
|
|
1428
1312
|
async selectAllRTETipTapEditorText() {
|
|
1429
|
-
await
|
|
1430
|
-
await this.tipTapEditor
|
|
1431
|
-
await this.page.keyboard.press('Control+A');
|
|
1313
|
+
await this.click(this.tipTapEditor);
|
|
1314
|
+
await this.pressKey(this.tipTapEditor, 'Control+A');
|
|
1432
1315
|
}
|
|
1433
1316
|
async waitForContentToBePublished() {
|
|
1434
|
-
await this.
|
|
1317
|
+
await this.waitForLoadState();
|
|
1435
1318
|
}
|
|
1436
1319
|
async waitForRecycleBinToBeEmptied() {
|
|
1437
|
-
await this.
|
|
1320
|
+
await this.waitForLoadState();
|
|
1438
1321
|
}
|
|
1439
1322
|
async clearTipTapEditor() {
|
|
1440
|
-
await
|
|
1323
|
+
await this.waitForVisible(this.tipTapEditor);
|
|
1441
1324
|
// We use the middle mouse button click so we don't accidentally open a block in the RTE. This solution avoids that.
|
|
1442
1325
|
await this.tipTapEditor.click({ button: "middle" });
|
|
1443
|
-
await this.
|
|
1444
|
-
await this.
|
|
1326
|
+
await this.pressKey(this.tipTapEditor, 'Control+A');
|
|
1327
|
+
await this.pressKey(this.tipTapEditor, 'Backspace');
|
|
1445
1328
|
}
|
|
1446
1329
|
async clickBlockElementInRTEWithName(elementTypeName) {
|
|
1447
1330
|
const blockElementLocator = this.page.locator('uui-ref-node umb-ufm-render').filter({ hasText: elementTypeName });
|
|
1448
|
-
await (
|
|
1449
|
-
await blockElementLocator.click({ force: true });
|
|
1331
|
+
await this.click(blockElementLocator, { force: true });
|
|
1450
1332
|
}
|
|
1451
1333
|
async doesModalFormValidationMessageContainText(text) {
|
|
1452
|
-
await
|
|
1334
|
+
await this.containsText(this.modalFormValidationMessage, text);
|
|
1453
1335
|
}
|
|
1454
1336
|
async enterSearchKeywordInTreePickerModal(keyword) {
|
|
1455
|
-
await
|
|
1456
|
-
await this.treePickerSearchTxt
|
|
1457
|
-
await this.page.keyboard.press('Enter');
|
|
1337
|
+
await this.enterText(this.treePickerSearchTxt, keyword);
|
|
1338
|
+
await this.pressKey(this.treePickerSearchTxt, 'Enter');
|
|
1458
1339
|
}
|
|
1459
1340
|
async enterSearchKeywordInMediaPickerModal(keyword) {
|
|
1460
|
-
await
|
|
1461
|
-
await this.mediaPickerSearchTxt
|
|
1462
|
-
await this.page.keyboard.press('Enter');
|
|
1341
|
+
await this.enterText(this.mediaPickerSearchTxt, keyword);
|
|
1342
|
+
await this.pressKey(this.mediaPickerSearchTxt, 'Enter');
|
|
1463
1343
|
}
|
|
1464
1344
|
async enterSearchKeywordInMemberPickerModal(keyword) {
|
|
1465
|
-
await
|
|
1466
|
-
await this.memberPickerSearchTxt
|
|
1467
|
-
await this.page.keyboard.press('Enter');
|
|
1345
|
+
await this.enterText(this.memberPickerSearchTxt, keyword);
|
|
1346
|
+
await this.pressKey(this.memberPickerSearchTxt, 'Enter');
|
|
1468
1347
|
}
|
|
1469
1348
|
async isContentNameReadOnly() {
|
|
1470
1349
|
await (0, test_1.expect)(this.contentNameTxt).toHaveAttribute('readonly');
|
|
@@ -1481,91 +1360,82 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
1481
1360
|
else {
|
|
1482
1361
|
(0, test_1.expect)(count, `Expected only one element, but found ${count}`).toBe(0);
|
|
1483
1362
|
}
|
|
1484
|
-
await
|
|
1363
|
+
await this.isVisible(this.refListBlock, isVisible);
|
|
1485
1364
|
}
|
|
1486
1365
|
async doesBlockCustomViewHaveValue(customBlockViewLocator, valueText) {
|
|
1487
1366
|
const locator = this.page.locator(`${customBlockViewLocator} p`);
|
|
1488
|
-
await
|
|
1489
|
-
await (
|
|
1367
|
+
await this.waitForVisible(locator);
|
|
1368
|
+
await this.hasText(locator, valueText);
|
|
1490
1369
|
}
|
|
1491
1370
|
async clickPropertyActionWithName(name) {
|
|
1492
|
-
const actionLocator = this.propertyActionMenu.locator(
|
|
1493
|
-
await
|
|
1494
|
-
await actionLocator.click();
|
|
1371
|
+
const actionLocator = this.propertyActionMenu.locator(`umb-property-action uui-menu-item[label="${name}"]`);
|
|
1372
|
+
await this.click(actionLocator);
|
|
1495
1373
|
}
|
|
1496
1374
|
async isContentWithNameVisibleInList(contentName, isVisible = true) {
|
|
1497
|
-
await
|
|
1375
|
+
await this.isVisible(this.documentTableColumnName.filter({ hasText: contentName }), isVisible);
|
|
1498
1376
|
}
|
|
1499
1377
|
async selectDocumentBlueprintWithName(blueprintName) {
|
|
1500
|
-
await
|
|
1501
|
-
await this.documentCreateOptionsModal.locator('uui-menu-item', { hasText: blueprintName }).click();
|
|
1378
|
+
await this.click(this.documentCreateOptionsModal.locator('uui-menu-item', { hasText: blueprintName }));
|
|
1502
1379
|
}
|
|
1503
1380
|
async doesDocumentModalHaveText(text) {
|
|
1504
|
-
await
|
|
1381
|
+
await this.containsText(this.documentCreateOptionsModal, text);
|
|
1505
1382
|
}
|
|
1506
1383
|
async doesListViewItemsHaveCount(pageSize) {
|
|
1507
|
-
await
|
|
1384
|
+
await this.hasCount(this.listViewCustomRows, pageSize);
|
|
1508
1385
|
}
|
|
1509
1386
|
async isListViewItemWithNameVisible(itemName, index = 0) {
|
|
1510
1387
|
await (0, test_1.expect)(this.listViewCustomRows.nth(index)).toContainText(itemName);
|
|
1511
1388
|
}
|
|
1512
1389
|
async clickPaginationNextButton() {
|
|
1513
|
-
await
|
|
1514
|
-
await this.nextPaginationBtn.click();
|
|
1390
|
+
await this.click(this.nextPaginationBtn);
|
|
1515
1391
|
}
|
|
1516
1392
|
// Entity Data Picker
|
|
1517
1393
|
async chooseCollectionMenuItemWithName(name) {
|
|
1518
1394
|
await this.clickChooseButton();
|
|
1519
|
-
await this.collectionMenu.locator('umb-collection-menu-item', { hasText: name })
|
|
1395
|
+
await this.click(this.collectionMenu.locator('umb-collection-menu-item', { hasText: name }));
|
|
1520
1396
|
await this.clickChooseContainerButton();
|
|
1521
1397
|
}
|
|
1522
1398
|
async chooseTreeMenuItemWithName(name, parentNames = []) {
|
|
1523
1399
|
await this.clickChooseButton();
|
|
1524
1400
|
for (const itemName of parentNames) {
|
|
1525
|
-
await this.entityPickerTree.locator('umb-tree-item').getByLabel(
|
|
1401
|
+
await this.click(this.entityPickerTree.locator('umb-tree-item').getByLabel(`Expand child items for ${itemName}`));
|
|
1526
1402
|
}
|
|
1527
|
-
await this.container.getByLabel(name)
|
|
1403
|
+
await this.click(this.container.getByLabel(name));
|
|
1528
1404
|
await this.clickChooseContainerButton();
|
|
1529
1405
|
}
|
|
1530
1406
|
async isChooseButtonVisible(isVisible = true) {
|
|
1531
|
-
await
|
|
1407
|
+
await this.isVisible(this.chooseBtn, isVisible);
|
|
1532
1408
|
}
|
|
1533
1409
|
async clickDocumentNotificationOptionWithName(name) {
|
|
1534
|
-
const notificationOptionLocator = this.page.locator(
|
|
1535
|
-
await
|
|
1536
|
-
await notificationOptionLocator.click();
|
|
1410
|
+
const notificationOptionLocator = this.page.locator(`umb-document-notifications-modal [id$="${name}"]`).locator('#toggle');
|
|
1411
|
+
await this.click(notificationOptionLocator);
|
|
1537
1412
|
}
|
|
1538
1413
|
async switchLanguage(languageName) {
|
|
1539
|
-
await
|
|
1540
|
-
await this.languageToggle.click();
|
|
1414
|
+
await this.click(this.languageToggle);
|
|
1541
1415
|
const languageOptionLocator = this.contentVariantDropdown.locator('.culture-variant').filter({ hasText: languageName });
|
|
1542
|
-
await
|
|
1543
|
-
await languageOptionLocator.click();
|
|
1416
|
+
await this.click(languageOptionLocator);
|
|
1544
1417
|
await (0, test_1.expect)(languageOptionLocator).toContainClass('selected');
|
|
1545
1418
|
}
|
|
1546
1419
|
async clickAddBlockListElementWithName(blockName) {
|
|
1547
|
-
const createNewButtonLocator = this.page.getByTestId(
|
|
1548
|
-
await
|
|
1549
|
-
await createNewButtonLocator.click();
|
|
1420
|
+
const createNewButtonLocator = this.page.getByTestId(`property:${blockName.toLowerCase()}`).getByLabel('Create new');
|
|
1421
|
+
await this.click(createNewButtonLocator);
|
|
1550
1422
|
}
|
|
1551
1423
|
async isAddBlockListElementWithNameDisabled(blockName) {
|
|
1552
|
-
const createNewButtonLocator = this.page.getByTestId(
|
|
1424
|
+
const createNewButtonLocator = this.page.getByTestId(`property:${blockName.toLowerCase()}`).locator('uui-button[label="Create new"]');
|
|
1553
1425
|
await (0, test_1.expect)(createNewButtonLocator).toHaveAttribute('disabled');
|
|
1554
1426
|
}
|
|
1555
1427
|
async isAddBlockListElementWithNameVisible(blockName) {
|
|
1556
|
-
const createNewButtonLocator = this.page.getByTestId(
|
|
1557
|
-
await
|
|
1428
|
+
const createNewButtonLocator = this.page.getByTestId(`property:${blockName.toLowerCase()}`).locator('uui-button[label="Create new"]');
|
|
1429
|
+
await this.waitForVisible(createNewButtonLocator);
|
|
1558
1430
|
await (0, test_1.expect)(createNewButtonLocator).not.toHaveAttribute('disabled');
|
|
1559
1431
|
}
|
|
1560
1432
|
async enterBlockPropertyValue(propertyName, value) {
|
|
1561
1433
|
const property = this.blockProperty.filter({ hasText: propertyName });
|
|
1562
|
-
await
|
|
1563
|
-
await property.locator('input').clear();
|
|
1564
|
-
await property.locator('input').fill(value);
|
|
1434
|
+
await this.enterText(property.locator('input'), value);
|
|
1565
1435
|
}
|
|
1566
1436
|
async isBlockPropertyEditable(propertyName, isEditable = true) {
|
|
1567
1437
|
const propertyLocator = this.blockProperty.filter({ hasText: propertyName }).locator('#input');
|
|
1568
|
-
await
|
|
1438
|
+
await this.waitForVisible(propertyLocator);
|
|
1569
1439
|
await (0, test_1.expect)(propertyLocator).toBeEditable({ editable: isEditable });
|
|
1570
1440
|
}
|
|
1571
1441
|
}
|