@umbraco/playwright-testhelpers 16.0.29 → 16.0.31
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/ContentUiHelper.js +2 -1
- package/dist/lib/helpers/ContentUiHelper.js.map +1 -1
- package/dist/lib/helpers/DataTypeUiHelper.js +9 -0
- package/dist/lib/helpers/DataTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/ProfilingUiHelper.js +2 -0
- package/dist/lib/helpers/ProfilingUiHelper.js.map +1 -1
- package/dist/lib/helpers/UiBaseLocators.js +41 -9
- package/dist/lib/helpers/UiBaseLocators.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -418,16 +418,20 @@ class UiBaseLocators {
|
|
|
418
418
|
await this.selectPropertyEditorBtn.click();
|
|
419
419
|
}
|
|
420
420
|
async clickCreateFolderButton() {
|
|
421
|
+
await (0, test_1.expect)(this.createFolderBtn).toBeVisible();
|
|
421
422
|
await this.createFolderBtn.click();
|
|
423
|
+
await this.page.waitForTimeout(500); // Wait for the action to complete
|
|
422
424
|
}
|
|
423
425
|
async enterAPropertyName(name) {
|
|
424
426
|
await (0, test_1.expect)(this.propertyNameTxt).toBeVisible();
|
|
425
427
|
await this.propertyNameTxt.fill(name);
|
|
426
428
|
}
|
|
427
429
|
async clickConfirmButton() {
|
|
430
|
+
await (0, test_1.expect)(this.confirmBtn).toBeVisible();
|
|
428
431
|
await this.confirmBtn.click();
|
|
429
432
|
}
|
|
430
433
|
async clickBreadcrumbButton() {
|
|
434
|
+
await (0, test_1.expect)(this.breadcrumbBtn).toBeVisible();
|
|
431
435
|
await this.breadcrumbBtn.click();
|
|
432
436
|
}
|
|
433
437
|
async clickInsertButton() {
|
|
@@ -435,20 +439,28 @@ class UiBaseLocators {
|
|
|
435
439
|
await this.insertBtn.click();
|
|
436
440
|
}
|
|
437
441
|
async clickConfirmToDeleteButton() {
|
|
442
|
+
await (0, test_1.expect)(this.confirmToDeleteBtn).toBeVisible();
|
|
438
443
|
await this.confirmToDeleteBtn.click();
|
|
439
|
-
await this.page.waitForTimeout(500);
|
|
444
|
+
await this.page.waitForTimeout(500); // Wait for the action to complete
|
|
440
445
|
}
|
|
441
446
|
async clickConfirmCreateFolderButton() {
|
|
447
|
+
await (0, test_1.expect)(this.confirmCreateFolderBtn).toBeVisible();
|
|
442
448
|
await this.confirmCreateFolderBtn.click();
|
|
449
|
+
await this.page.waitForTimeout(500); // Wait for the action to complete
|
|
443
450
|
}
|
|
444
451
|
async clickRemoveExactButton() {
|
|
452
|
+
await (0, test_1.expect)(this.removeExactBtn).toBeVisible();
|
|
445
453
|
await this.removeExactBtn.click();
|
|
446
454
|
}
|
|
447
455
|
async clickRemoveButtonForName(name) {
|
|
448
|
-
|
|
456
|
+
const removeButtonWithNameLocator = this.page.locator('[name="' + name + '"] [label="Remove"]');
|
|
457
|
+
await (0, test_1.expect)(removeButtonWithNameLocator).toBeVisible();
|
|
458
|
+
await removeButtonWithNameLocator.click();
|
|
449
459
|
}
|
|
450
460
|
async clickTrashIconButtonForName(name) {
|
|
451
|
-
|
|
461
|
+
const trashIconButtonWithNameLocator = this.page.locator('[name="' + name + '"] [name="icon-trash"]');
|
|
462
|
+
await (0, test_1.expect)(trashIconButtonWithNameLocator).toBeVisible();
|
|
463
|
+
await trashIconButtonWithNameLocator.click();
|
|
452
464
|
}
|
|
453
465
|
async clickRemoveWithName(name) {
|
|
454
466
|
const removeLabelWithNameLocator = this.page.locator('[label="Remove ' + name + '"]');
|
|
@@ -456,18 +468,23 @@ class UiBaseLocators {
|
|
|
456
468
|
await removeLabelWithNameLocator.click();
|
|
457
469
|
}
|
|
458
470
|
async clickDisableButton() {
|
|
471
|
+
await (0, test_1.expect)(this.disableBtn).toBeVisible();
|
|
459
472
|
await this.disableBtn.click();
|
|
460
473
|
}
|
|
461
474
|
async clickConfirmDisableButton() {
|
|
475
|
+
await (0, test_1.expect)(this.confirmDisableBtn).toBeVisible();
|
|
462
476
|
await this.confirmDisableBtn.click();
|
|
463
477
|
}
|
|
464
478
|
async clickConfirmRemoveButton() {
|
|
479
|
+
await (0, test_1.expect)(this.confirmToRemoveBtn).toBeVisible();
|
|
465
480
|
await this.confirmToRemoveBtn.click();
|
|
466
481
|
}
|
|
467
482
|
async clickEnableButton() {
|
|
483
|
+
await (0, test_1.expect)(this.enableBtn).toBeVisible();
|
|
468
484
|
await this.enableBtn.click();
|
|
469
485
|
}
|
|
470
486
|
async clickConfirmEnableButton() {
|
|
487
|
+
await (0, test_1.expect)(this.confirmEnableBtn).toBeVisible();
|
|
471
488
|
await this.confirmEnableBtn.click();
|
|
472
489
|
}
|
|
473
490
|
async insertDictionaryItem(dictionaryName) {
|
|
@@ -476,6 +493,7 @@ class UiBaseLocators {
|
|
|
476
493
|
await this.insertDictionaryItemBtn.click();
|
|
477
494
|
await (0, test_1.expect)(this.page.getByLabel(dictionaryName)).toBeVisible();
|
|
478
495
|
await this.page.getByLabel(dictionaryName).click();
|
|
496
|
+
await (0, test_1.expect)(this.chooseBtn).toBeVisible();
|
|
479
497
|
await this.chooseBtn.click();
|
|
480
498
|
}
|
|
481
499
|
async addQueryBuilderWithOrderByStatement(propertyAlias, isAscending) {
|
|
@@ -545,6 +563,7 @@ class UiBaseLocators {
|
|
|
545
563
|
await this.clickConfirmToDeleteButton();
|
|
546
564
|
}
|
|
547
565
|
async clickDeleteExactButton() {
|
|
566
|
+
await (0, test_1.expect)(this.deleteExactBtn).toBeVisible();
|
|
548
567
|
await this.deleteExactBtn.click();
|
|
549
568
|
}
|
|
550
569
|
async isTreeItemVisible(name, isVisible = true) {
|
|
@@ -598,6 +617,7 @@ class UiBaseLocators {
|
|
|
598
617
|
return await (0, test_1.expect)(this.page.getByText(message)).toBeVisible({ visible: isVisible });
|
|
599
618
|
}
|
|
600
619
|
async clickCreateThreeDotsButton() {
|
|
620
|
+
await (0, test_1.expect)(this.createThreeDotsBtn).toBeVisible();
|
|
601
621
|
await this.createThreeDotsBtn.click();
|
|
602
622
|
}
|
|
603
623
|
async clickCreateButton() {
|
|
@@ -610,12 +630,16 @@ class UiBaseLocators {
|
|
|
610
630
|
}
|
|
611
631
|
;
|
|
612
632
|
async clickNewFolderThreeDotsButton() {
|
|
633
|
+
await (0, test_1.expect)(this.newFolderThreeDotsBtn).toBeVisible();
|
|
613
634
|
await this.newFolderThreeDotsBtn.click();
|
|
614
635
|
}
|
|
615
636
|
async clickEditorSettingsButton(index = 0) {
|
|
637
|
+
await (0, test_1.expect)(this.editorSettingsBtn.nth(index)).toBeVisible();
|
|
616
638
|
return this.editorSettingsBtn.nth(index).click();
|
|
617
639
|
}
|
|
618
640
|
async enterDescription(description) {
|
|
641
|
+
await (0, test_1.expect)(this.enterDescriptionTxt).toBeVisible();
|
|
642
|
+
await this.enterDescriptionTxt.clear();
|
|
619
643
|
await this.enterDescriptionTxt.fill(description);
|
|
620
644
|
}
|
|
621
645
|
async doesDescriptionHaveValue(value, index = 0) {
|
|
@@ -623,13 +647,15 @@ class UiBaseLocators {
|
|
|
623
647
|
}
|
|
624
648
|
async clickStructureTab() {
|
|
625
649
|
await this.page.waitForTimeout(1000);
|
|
626
|
-
await this.structureTabBtn.
|
|
650
|
+
await (0, test_1.expect)(this.structureTabBtn).toBeVisible();
|
|
627
651
|
await this.structureTabBtn.click();
|
|
628
652
|
}
|
|
629
653
|
async clickAllowAtRootButton() {
|
|
654
|
+
await (0, test_1.expect)(this.allowAtRootBtn).toBeVisible();
|
|
630
655
|
await this.allowAtRootBtn.click();
|
|
631
656
|
}
|
|
632
657
|
async clickIAmDoneReorderingButton() {
|
|
658
|
+
await (0, test_1.expect)(this.iAmDoneReorderingBtn).toBeVisible();
|
|
633
659
|
await this.iAmDoneReorderingBtn.click();
|
|
634
660
|
}
|
|
635
661
|
async clickReorderButton() {
|
|
@@ -637,12 +663,15 @@ class UiBaseLocators {
|
|
|
637
663
|
await this.reorderBtn.click();
|
|
638
664
|
}
|
|
639
665
|
async clickLabelAboveButton() {
|
|
666
|
+
await (0, test_1.expect)(this.labelAboveBtn).toBeVisible();
|
|
640
667
|
await this.labelAboveBtn.click();
|
|
641
668
|
}
|
|
642
669
|
async clickMandatoryToggle() {
|
|
670
|
+
await (0, test_1.expect)(this.mandatoryToggle).toBeVisible();
|
|
643
671
|
await this.mandatoryToggle.click();
|
|
644
672
|
}
|
|
645
673
|
async selectValidationOption(option) {
|
|
674
|
+
await (0, test_1.expect)(this.validation).toBeVisible();
|
|
646
675
|
await this.validation.selectOption(option);
|
|
647
676
|
}
|
|
648
677
|
async enterRegEx(regEx) {
|
|
@@ -696,6 +725,7 @@ class UiBaseLocators {
|
|
|
696
725
|
await this.enterPropertyEditorDescriptionTxt.fill(description);
|
|
697
726
|
}
|
|
698
727
|
async clickAddGroupButton() {
|
|
728
|
+
await (0, test_1.expect)(this.addGroupBtn).toBeVisible();
|
|
699
729
|
await this.addGroupBtn.click();
|
|
700
730
|
}
|
|
701
731
|
async clickChooseModalButton() {
|
|
@@ -756,8 +786,11 @@ class UiBaseLocators {
|
|
|
756
786
|
await this.insertValueBtn.click();
|
|
757
787
|
await (0, test_1.expect)(this.chooseFieldDropDown).toBeVisible();
|
|
758
788
|
await this.chooseFieldDropDown.click();
|
|
789
|
+
await (0, test_1.expect)(this.systemFieldsOption).toBeVisible();
|
|
759
790
|
await this.systemFieldsOption.click();
|
|
791
|
+
await (0, test_1.expect)(this.chooseFieldValueDropDown).toBeVisible();
|
|
760
792
|
await this.chooseFieldValueDropDown.click();
|
|
793
|
+
await (0, test_1.expect)(this.page.getByText(fieldValue)).toBeVisible();
|
|
761
794
|
await this.page.getByText(fieldValue).click();
|
|
762
795
|
await this.clickSubmitButton();
|
|
763
796
|
}
|
|
@@ -767,7 +800,7 @@ class UiBaseLocators {
|
|
|
767
800
|
await this.insertPartialViewBtn.click();
|
|
768
801
|
await (0, test_1.expect)(this.page.getByLabel(partialViewName)).toBeVisible();
|
|
769
802
|
await this.page.getByLabel(partialViewName).click();
|
|
770
|
-
await this.
|
|
803
|
+
await this.clickChooseButton();
|
|
771
804
|
}
|
|
772
805
|
async deletePropertyEditorWithName(name) {
|
|
773
806
|
// We need to hover over the Property Editor to make the delete button visible
|
|
@@ -799,8 +832,7 @@ class UiBaseLocators {
|
|
|
799
832
|
async chooseRootContentInQueryBuilder(contentName) {
|
|
800
833
|
await (0, test_1.expect)(this.chooseRootContentBtn).toBeVisible();
|
|
801
834
|
await this.chooseRootContentBtn.click();
|
|
802
|
-
await
|
|
803
|
-
await this.page.getByText(contentName).click();
|
|
835
|
+
await this.clickModalMenuItemWithName(contentName);
|
|
804
836
|
await this.clickChooseButton();
|
|
805
837
|
}
|
|
806
838
|
async reorderTwoGroups(firstGroupName, secondGroupName) {
|
|
@@ -889,12 +921,12 @@ class UiBaseLocators {
|
|
|
889
921
|
await (0, test_1.expect)(this.recycleBinMenuItem).toBeVisible();
|
|
890
922
|
// If the Recycle Bin does not contain any items,0 the caret button should not be visible. and we should not try to click it
|
|
891
923
|
if (!containsItems) {
|
|
892
|
-
await this.
|
|
924
|
+
await this.clickReloadChildrenActionMenuOption();
|
|
893
925
|
await (0, test_1.expect)(this.recycleBinMenuItemCaretBtn).not.toBeVisible();
|
|
894
926
|
return;
|
|
895
927
|
}
|
|
896
928
|
await this.clickActionsMenuForName('Recycle Bin');
|
|
897
|
-
await this.
|
|
929
|
+
await this.clickReloadChildrenActionMenuOption();
|
|
898
930
|
await (0, test_1.expect)(this.recycleBinMenuItem).toBeVisible();
|
|
899
931
|
await (0, test_1.expect)(this.recycleBinMenuItemCaretBtn.first()).toBeVisible();
|
|
900
932
|
const isCaretButtonOpen = await this.recycleBinMenuItem.first().getAttribute('show-children');
|