@umbraco/playwright-testhelpers 15.0.11 → 15.0.12

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.
Files changed (31) hide show
  1. package/dist/lib/helpers/ContentUiHelper.d.ts +5 -2
  2. package/dist/lib/helpers/ContentUiHelper.js +44 -7
  3. package/dist/lib/helpers/ContentUiHelper.js.map +1 -1
  4. package/dist/lib/helpers/DataTypeUiHelper.d.ts +4 -2
  5. package/dist/lib/helpers/DataTypeUiHelper.js +111 -18
  6. package/dist/lib/helpers/DataTypeUiHelper.js.map +1 -1
  7. package/dist/lib/helpers/DictionaryUiHelper.js +2 -1
  8. package/dist/lib/helpers/DictionaryUiHelper.js.map +1 -1
  9. package/dist/lib/helpers/DocumentTypeUiHelper.js +11 -5
  10. package/dist/lib/helpers/DocumentTypeUiHelper.js.map +1 -1
  11. package/dist/lib/helpers/LanguageUiHelper.js +2 -2
  12. package/dist/lib/helpers/LanguageUiHelper.js.map +1 -1
  13. package/dist/lib/helpers/LogViewerUiHelper.js +1 -0
  14. package/dist/lib/helpers/LogViewerUiHelper.js.map +1 -1
  15. package/dist/lib/helpers/MediaUiHelper.js +2 -2
  16. package/dist/lib/helpers/MediaUiHelper.js.map +1 -1
  17. package/dist/lib/helpers/MemberUiHelper.js +1 -1
  18. package/dist/lib/helpers/MemberUiHelper.js.map +1 -1
  19. package/dist/lib/helpers/PartialViewUiHelper.js +5 -0
  20. package/dist/lib/helpers/PartialViewUiHelper.js.map +1 -1
  21. package/dist/lib/helpers/StylesheetUiHelper.js +1 -1
  22. package/dist/lib/helpers/StylesheetUiHelper.js.map +1 -1
  23. package/dist/lib/helpers/TemplateUiHelper.js +2 -0
  24. package/dist/lib/helpers/TemplateUiHelper.js.map +1 -1
  25. package/dist/lib/helpers/UiBaseLocators.d.ts +6 -0
  26. package/dist/lib/helpers/UiBaseLocators.js +54 -6
  27. package/dist/lib/helpers/UiBaseLocators.js.map +1 -1
  28. package/dist/lib/helpers/UserGroupUiHelper.js +17 -3
  29. package/dist/lib/helpers/UserGroupUiHelper.js.map +1 -1
  30. package/dist/tsconfig.tsbuildinfo +1 -1
  31. package/package.json +1 -1
@@ -3,7 +3,7 @@ import { UiBaseLocators } from "./UiBaseLocators";
3
3
  export declare class DataTypeUiHelper extends UiBaseLocators {
4
4
  private readonly moveToBtn;
5
5
  private readonly duplicateToBtn;
6
- private readonly newDataTypeThreeDotsBtn;
6
+ private readonly newDataTypeBtn;
7
7
  private readonly dataTypeNameTxt;
8
8
  private readonly createDataTypeFolderBtn;
9
9
  private readonly updateDataTypeFolderBtn;
@@ -127,14 +127,16 @@ export declare class DataTypeUiHelper extends UiBaseLocators {
127
127
  private readonly tiptapExtensionsConfiguration;
128
128
  private readonly propertyEditor;
129
129
  private readonly selectIconBtn;
130
+ private readonly newFolderBtn;
130
131
  constructor(page: Page);
131
132
  clickActionsMenuForDataType(name: string): Promise<void>;
132
133
  clickActionsMenuAtRoot(): Promise<void>;
133
134
  clickRootFolderCaretButton(): Promise<void>;
135
+ createDataTypeFolder(folderName: string): Promise<void>;
134
136
  goToDataType(dataTypeName: string): Promise<void>;
135
137
  clickMoveToButton(): Promise<void>;
136
138
  clickDuplicateToButton(): Promise<void>;
137
- clickNewDataTypeThreeDotsButton(): Promise<void>;
139
+ clickNewDataTypeButton(): Promise<void>;
138
140
  clickNewDataTypeFolderButton(): Promise<void>;
139
141
  enterDataTypeName(name: string): Promise<void>;
140
142
  clickCreateFolderButton(): Promise<void>;
@@ -6,7 +6,7 @@ const UiBaseLocators_1 = require("./UiBaseLocators");
6
6
  class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
7
7
  moveToBtn;
8
8
  duplicateToBtn;
9
- newDataTypeThreeDotsBtn;
9
+ newDataTypeBtn;
10
10
  dataTypeNameTxt;
11
11
  createDataTypeFolderBtn;
12
12
  updateDataTypeFolderBtn;
@@ -130,13 +130,15 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
130
130
  tiptapExtensionsConfiguration;
131
131
  propertyEditor;
132
132
  selectIconBtn;
133
+ newFolderBtn;
133
134
  constructor(page) {
134
135
  super(page);
135
- this.moveToBtn = page.locator('umb-entity-action').getByLabel('Move to');
136
- this.duplicateToBtn = page.locator('umb-entity-action').getByLabel(/^Duplicate to(\.\.\.)?$/);
137
- this.newDataTypeThreeDotsBtn = page.locator('umb-data-type-create-options-modal').getByLabel('New Data Type...');
136
+ this.moveToBtn = this.actionsMenuContainer.getByLabel('Move to');
137
+ this.duplicateToBtn = this.actionsMenuContainer.getByLabel(/^Duplicate to(\.\.\.)?$/);
138
+ this.newDataTypeBtn = page.getByRole('link', { name: 'Data Type', exact: true });
138
139
  this.dataTypeNameTxt = page.locator('umb-data-type-workspace-editor #nameInput #input');
139
140
  this.createDataTypeFolderBtn = page.getByLabel('Create folder');
141
+ this.newFolderBtn = page.locator('[name="Folder"]');
140
142
  this.updateDataTypeFolderBtn = page.getByLabel('Update folder');
141
143
  this.ignoreUserStartNodesSlider = page.locator('umb-property[label="Ignore user start nodes"] #slider, umb-property[label="Ignore User Start Nodes"] #slider');
142
144
  this.duplicateBtn = this.sidebarModal.getByLabel('Duplicate', { exact: true });
@@ -277,7 +279,7 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
277
279
  this.selectIconBtn = page.getByLabel('Select icon');
278
280
  }
279
281
  async clickActionsMenuForDataType(name) {
280
- await this.clickActionsMenuForName(name);
282
+ await this.clickActionsMenuForNameInSectionSidebar(name);
281
283
  }
282
284
  async clickActionsMenuAtRoot() {
283
285
  await this.clickActionsMenuForDataType('Data Types');
@@ -285,9 +287,16 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
285
287
  async clickRootFolderCaretButton() {
286
288
  await this.clickCaretButtonForName('Data Types');
287
289
  }
290
+ async createDataTypeFolder(folderName) {
291
+ await this.clickActionsMenuCreateButton();
292
+ await this.clickNewDataTypeFolderButton();
293
+ await this.enterFolderName(folderName);
294
+ await this.clickConfirmCreateFolderButton();
295
+ }
288
296
  async goToDataType(dataTypeName) {
289
297
  await this.clickRootFolderCaretButton();
290
- await this.page.getByLabel(dataTypeName, { exact: true }).click();
298
+ await (0, test_1.expect)(this.sectionSidebar.getByLabel(dataTypeName, { exact: true })).toBeVisible();
299
+ await this.sectionSidebar.getByLabel(dataTypeName, { exact: true }).click();
291
300
  }
292
301
  async clickMoveToButton() {
293
302
  await (0, test_1.expect)(this.moveToBtn).toBeVisible();
@@ -297,11 +306,11 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
297
306
  await (0, test_1.expect)(this.duplicateToBtn).toBeVisible();
298
307
  await this.duplicateToBtn.click();
299
308
  }
300
- async clickNewDataTypeThreeDotsButton() {
301
- await this.newDataTypeThreeDotsBtn.click();
309
+ async clickNewDataTypeButton() {
310
+ await this.newDataTypeBtn.click();
302
311
  }
303
312
  async clickNewDataTypeFolderButton() {
304
- await this.newFolderThreeDotsBtn.click();
313
+ await this.newFolderBtn.click();
305
314
  }
306
315
  async enterDataTypeName(name) {
307
316
  await this.dataTypeNameTxt.click();
@@ -338,7 +347,7 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
338
347
  }
339
348
  async addMediaStartNode(mediaName) {
340
349
  await this.mediaCardItems.filter({ hasText: mediaName }).click();
341
- await this.clickSubmitButton();
350
+ await this.clickChooseModalButton();
342
351
  }
343
352
  async addContentStartNode(contentName) {
344
353
  await this.clickTextButtonWithName(contentName);
@@ -400,7 +409,9 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
400
409
  await this.columnsDisplayedItems.filter({ has: this.page.getByText(propertyAlias, { exact: true }) }).getByText('Remove').click();
401
410
  }
402
411
  async addLayouts(layoutName) {
412
+ await (0, test_1.expect)(this.chooseLayoutsBtn).toBeVisible();
403
413
  await this.chooseLayoutsBtn.click();
414
+ await (0, test_1.expect)(this.page.locator('[name="' + layoutName + '"]')).toBeVisible();
404
415
  await this.page.locator('[name="' + layoutName + '"]').click();
405
416
  }
406
417
  async removeLayouts(layoutAlias) {
@@ -433,65 +444,82 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
433
444
  }
434
445
  // Image Cropper
435
446
  async enterCropValues(label, alias, width, height) {
447
+ await (0, test_1.expect)(this.labelTxt).toBeVisible();
436
448
  await this.labelTxt.clear();
437
449
  await this.labelTxt.fill(label);
450
+ await (0, test_1.expect)(this.aliasTxt).toBeVisible();
438
451
  await this.aliasTxt.clear();
439
452
  await this.aliasTxt.fill(alias);
453
+ await (0, test_1.expect)(this.widthTxt).toBeVisible();
440
454
  await this.widthTxt.clear();
441
455
  await this.widthTxt.fill(width);
442
456
  await this.heightTxt.clear();
443
457
  await this.heightTxt.fill(height);
444
458
  }
445
459
  async clickAddCropButton() {
460
+ await (0, test_1.expect)(this.addCropBtn).toBeVisible();
446
461
  await this.addCropBtn.click();
447
462
  }
448
463
  async clickSaveCropButton() {
464
+ await (0, test_1.expect)(this.saveCropBtn).toBeVisible();
449
465
  await this.saveCropBtn.click();
450
466
  }
451
467
  async editCropByAlias(alias) {
468
+ await (0, test_1.expect)(this.page.locator('.crop').filter({ has: this.page.getByText(alias) }).getByText('Edit')).toBeVisible();
452
469
  await this.page.locator('.crop').filter({ has: this.page.getByText(alias) }).getByText('Edit').click();
453
470
  }
454
471
  async removeCropByAlias(alias) {
472
+ await (0, test_1.expect)(this.page.locator('.crop').filter({ has: this.page.getByText(alias) }).getByText('Remove')).toBeVisible();
455
473
  await this.page.locator('.crop').filter({ has: this.page.getByText(alias) }).getByText('Remove').click();
456
474
  }
457
475
  // Numeric
458
476
  async enterMinimumValue(value) {
477
+ await (0, test_1.expect)(this.minimumTxt).toBeVisible();
459
478
  await this.minimumTxt.clear();
460
479
  await this.minimumTxt.fill(value);
461
480
  }
462
481
  async enterMaximumValue(value) {
482
+ await (0, test_1.expect)(this.maximumTxt).toBeVisible();
463
483
  await this.maximumTxt.clear();
464
484
  await this.maximumTxt.fill(value);
465
485
  }
466
486
  async enterStepSizeValue(value) {
487
+ await (0, test_1.expect)(this.stepSizeTxt).toBeVisible();
467
488
  await this.stepSizeTxt.clear();
468
489
  await this.stepSizeTxt.fill(value);
469
490
  }
470
491
  async clickAllowDecimalsSlider() {
492
+ await (0, test_1.expect)(this.allowDecimalsSlider).toBeVisible();
471
493
  await this.allowDecimalsSlider.click();
472
494
  }
473
495
  // Radiobox
474
496
  async removeOptionByName(name) {
497
+ await (0, test_1.expect)(this.page.locator("uui-button[label='Remove " + name + "'] svg")).toBeVisible();
475
498
  await this.page.locator("uui-button[label='Remove " + name + "'] svg").click();
476
499
  await this.confirmToDeleteBtn.click();
477
500
  }
478
501
  async enterOptionName(name) {
502
+ await (0, test_1.expect)(this.optionTxt.last()).toBeVisible();
479
503
  await this.optionTxt.last().clear();
480
504
  await this.optionTxt.last().fill(name);
481
505
  }
482
506
  async clickAddOptionButton() {
507
+ await (0, test_1.expect)(this.addOptionBtn).toBeVisible();
483
508
  await this.addOptionBtn.click();
484
509
  }
485
510
  // Textarea - Textstring
486
511
  async enterMaximumAllowedCharactersValue(value) {
512
+ await (0, test_1.expect)(this.maximumAllowedCharsTxt).toBeVisible();
487
513
  await this.maximumAllowedCharsTxt.clear();
488
514
  await this.maximumAllowedCharsTxt.fill(value);
489
515
  }
490
516
  async enterNumberOfRowsValue(value) {
517
+ await (0, test_1.expect)(this.numberOfRowsTxt).toBeVisible();
491
518
  await this.numberOfRowsTxt.clear();
492
519
  await this.numberOfRowsTxt.fill(value);
493
520
  }
494
521
  async enterMaxHeightValue(value) {
522
+ await (0, test_1.expect)(this.maxHeightTxt).toBeVisible();
495
523
  await this.maxHeightTxt.clear();
496
524
  await this.maxHeightTxt.fill(value);
497
525
  }
@@ -592,52 +620,64 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
592
620
  async addImageUploadFolder(mediaFolderName) {
593
621
  await this.clickChooseWithPlusButton();
594
622
  await this.selectMediaWithName(mediaFolderName);
595
- await this.clickSubmitButton();
623
+ await this.clickChooseModalButton();
596
624
  }
597
625
  async clickAddWithPlusButton() {
626
+ await (0, test_1.expect)(this.addWithPlusBtn).toBeVisible();
598
627
  await this.addWithPlusBtn.click();
599
628
  }
600
629
  async addAvailableBlocks(blockName) {
601
630
  await this.clickAddWithPlusButton();
602
631
  await this.clickTextButtonWithName(blockName);
603
- await this.chooseModalBtn.click();
632
+ await this.clickChooseModalButton();
604
633
  await this.clickSubmitButton();
605
634
  }
606
635
  // Tags
607
636
  async enterDefineTagGroupValue(value) {
637
+ await (0, test_1.expect)(this.defineTagGroupTxt).toBeVisible();
608
638
  await this.defineTagGroupTxt.clear();
609
639
  await this.defineTagGroupTxt.fill(value);
610
640
  }
611
641
  async selectStorageTypeOption(option) {
642
+ await (0, test_1.expect)(this.storageTypeDropDownBox).toBeVisible();
612
643
  await this.storageTypeDropDownBox.selectOption({ label: option });
613
644
  }
614
645
  // Content Picker
615
646
  async clickShowOpenButtonSlider() {
647
+ await (0, test_1.expect)(this.showOpenButtonSlider).toBeVisible();
616
648
  await this.showOpenButtonSlider.click();
617
649
  }
618
650
  async removeContentStartNode(contentName) {
651
+ await (0, test_1.expect)(this.page.locator('[name="' + contentName + '"] uui-button').getByLabel('Remove')).toBeVisible();
619
652
  await this.page.locator('[name="' + contentName + '"] uui-button').getByLabel('Remove').click();
653
+ await (0, test_1.expect)(this.confirmToRemoveBtn).toBeVisible();
620
654
  await this.confirmToRemoveBtn.click();
621
655
  }
622
656
  // Dropdown
623
657
  async clickEnableMultipleChoiceSlider() {
658
+ await (0, test_1.expect)(this.enableMultipleChoiceSlider).toBeVisible();
624
659
  await this.enableMultipleChoiceSlider.click();
625
660
  }
626
661
  async clickAddOptionsButton() {
662
+ await (0, test_1.expect)(this.addOptionsBtn).toBeVisible();
627
663
  await this.addOptionsBtn.click();
628
664
  }
629
665
  // True/false
630
666
  async clickInitialStateSlider() {
667
+ await (0, test_1.expect)(this.initialStateSlider).toBeVisible();
631
668
  await this.initialStateSlider.click();
632
669
  }
633
670
  async clickShowToggleLabelsSlider() {
671
+ await (0, test_1.expect)(this.showToggleLabelsSlider).toBeVisible();
634
672
  await this.showToggleLabelsSlider.click();
635
673
  }
636
674
  async enterLabelOnValue(value) {
675
+ await (0, test_1.expect)(this.labelOnTxt).toBeVisible();
637
676
  await this.labelOnTxt.clear();
638
677
  await this.labelOnTxt.fill(value);
639
678
  }
640
679
  async enterLabelOffValue(value) {
680
+ await (0, test_1.expect)(this.labelOffTxt).toBeVisible();
641
681
  await this.labelOffTxt.clear();
642
682
  await this.labelOffTxt.fill(value);
643
683
  }
@@ -653,10 +693,12 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
653
693
  await blockWithNameLocator.getByLabel('Remove block').click({ force: true });
654
694
  }
655
695
  async enterMinAmount(value) {
696
+ await (0, test_1.expect)(this.minAmountTxt).toBeVisible();
656
697
  await this.minAmountTxt.clear();
657
698
  await this.minAmountTxt.fill(value);
658
699
  }
659
700
  async enterMaxAmount(value) {
701
+ await (0, test_1.expect)(this.maxAmountTxt).toBeVisible();
660
702
  await this.maxAmountTxt.clear();
661
703
  await this.maxAmountTxt.fill(value);
662
704
  }
@@ -664,116 +706,145 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
664
706
  return await (0, test_1.expect)(this.page.getByText(errorMessage)).toBeVisible();
665
707
  }
666
708
  async clickSingleBlockMode() {
667
- // We need to wait, otherwise this would be flaky
668
- await this.singleBlockModeBtn.waitFor();
709
+ await (0, test_1.expect)(this.singleBlockModeBtn).toBeVisible();
669
710
  await this.singleBlockModeBtn.click();
670
711
  }
671
712
  async clickLiveEditingMode() {
713
+ await (0, test_1.expect)(this.liveEditingModeBtn).toBeVisible();
672
714
  await this.liveEditingModeBtn.click();
673
715
  }
674
716
  async clickInlineEditingMode() {
717
+ await (0, test_1.expect)(this.inlineEditingModeBtn).toBeVisible();
675
718
  await this.inlineEditingModeBtn.click();
676
719
  }
677
720
  async enterPropertyEditorWidth(width) {
721
+ await (0, test_1.expect)(this.propertyEditorWidthTxt).toBeVisible();
678
722
  await this.propertyEditorWidthTxt.clear();
679
723
  await this.propertyEditorWidthTxt.fill(width);
680
724
  }
681
725
  async goToBlockWithName(name) {
726
+ await (0, test_1.expect)(this.page.getByRole('link', { name: name })).toBeVisible();
682
727
  await this.page.getByRole('link', { name: name }).click();
683
728
  }
684
729
  async enterBlockLabelText(label) {
685
- await this.labelTextTxt.clear();
730
+ await this.removeBlockLabelText();
686
731
  await this.labelTextTxt.fill(label);
687
732
  }
688
733
  async removeBlockLabelText() {
734
+ await (0, test_1.expect)(this.labelTextTxt).toBeVisible();
689
735
  await this.labelTextTxt.clear();
690
736
  }
691
737
  async clickAllowInRootForBlock() {
738
+ await (0, test_1.expect)(this.allowBlockAtRootBtn).toBeVisible();
692
739
  await this.allowBlockAtRootBtn.click();
693
740
  }
694
741
  async clickAllowInAreasForBlock() {
742
+ await (0, test_1.expect)(this.allowInAreasBtn).toBeVisible();
695
743
  await this.allowInAreasBtn.click();
696
744
  }
697
745
  async updateBlockOverlaySize(size) {
746
+ await (0, test_1.expect)(this.overlaySizeOption).toBeVisible();
698
747
  await this.overlaySizeOption.selectOption(size);
699
748
  }
700
749
  async addBlockContentModel(elementName) {
750
+ await (0, test_1.expect)(this.chooseContentModelBtn).toBeVisible();
701
751
  await this.chooseContentModelBtn.click();
702
752
  await this.clickButtonWithName(elementName);
703
753
  await this.clickChooseButton();
704
754
  }
705
755
  async addBlockSettingsModel(elementName) {
756
+ await (0, test_1.expect)(this.chooseSettingsModelBtn).toBeVisible();
706
757
  await this.chooseSettingsModelBtn.click();
707
758
  await this.clickButtonWithName(elementName);
708
759
  await this.clickChooseModalButton();
709
760
  }
710
761
  async removeBlockContentModel() {
762
+ await (0, test_1.expect)(this.contentModelNode).toBeVisible();
711
763
  await this.contentModelNode.hover();
764
+ await (0, test_1.expect)(this.removeExactContentModelNodeBtn).toBeVisible();
712
765
  await this.removeExactContentModelNodeBtn.click();
713
766
  }
714
767
  async removeBlockSettingsModel() {
768
+ await (0, test_1.expect)(this.settingsModelNode).toBeVisible();
715
769
  await this.settingsModelNode.hover();
770
+ await (0, test_1.expect)(this.removeExactContentModelNodeBtn).toBeVisible();
716
771
  await this.removeExactSettingsModelNodeBtn.click();
717
772
  }
718
773
  async openBlockContentModel() {
774
+ await (0, test_1.expect)(this.contentModelNode).toBeVisible();
719
775
  await this.contentModelNode.hover();
776
+ await (0, test_1.expect)(this.openBtn).toBeVisible();
720
777
  await this.openBtn.click();
721
778
  }
722
779
  async openBlockSettingsModel() {
780
+ await (0, test_1.expect)(this.settingsModelNode).toBeVisible();
723
781
  await this.settingsModelNode.hover();
782
+ await (0, test_1.expect)(this.openBtn).toBeVisible();
724
783
  await this.openBtn.click();
725
784
  }
726
785
  async isElementWorkspaceOpenInBlock(elementTypeName) {
727
786
  return await (0, test_1.expect)(this.documentTypeWorkspace.filter({ hasText: elementTypeName })).toBeVisible();
728
787
  }
729
788
  async selectBlockBackgroundColor(color) {
789
+ await (0, test_1.expect)(this.backgroundColorBtn).toBeVisible();
730
790
  await this.backgroundColorBtn.click();
731
791
  await this.backgroundColorTxt.clear();
732
792
  await this.backgroundColorTxt.fill(color);
733
793
  }
734
794
  async selectBlockIconColor(color) {
795
+ await (0, test_1.expect)(this.iconColorBtn).toBeVisible();
735
796
  await this.iconColorBtn.click();
736
797
  await this.iconColorTxt.clear();
737
798
  await this.iconColorTxt.fill(color);
738
799
  }
739
800
  async clickExpandChildItemsForMediaButton() {
801
+ await (0, test_1.expect)(this.expandChildItemsForMediaBtn).toBeVisible();
740
802
  await this.expandChildItemsForMediaBtn.click();
741
803
  }
742
804
  async clickRemoveCustomStylesheetWithName(name) {
805
+ await (0, test_1.expect)(this.customStylesheetLabel.locator('[name="' + name + '"]')).toBeVisible();
743
806
  await this.customStylesheetLabel.locator('[name="' + name + '"]').click();
807
+ await (0, test_1.expect)(this.stylesheetRemoveBtn).toBeVisible();
744
808
  await this.stylesheetRemoveBtn.click();
745
809
  await this.clickConfirmRemoveButton();
746
810
  }
747
811
  async clickBlockGridHideContentEditorButton() {
812
+ await (0, test_1.expect)(this.hideContentEditorBlockGridBtn).toBeVisible();
748
813
  await this.hideContentEditorBlockGridBtn.click();
749
814
  }
750
815
  async chooseBlockCustomStylesheetWithName(name) {
816
+ await (0, test_1.expect)(this.chooseCustomStylesheetBtn).toBeVisible();
751
817
  await this.chooseCustomStylesheetBtn.click();
752
818
  await this.clickCaretButtonForName('wwwroot');
753
819
  await this.clickCaretButtonForName('css');
754
- await this.page.getByLabel(name, { exact: true }).click();
820
+ await this.clickLabelWithName(name, true);
755
821
  await this.clickChooseModalButton();
756
822
  }
757
823
  async chooseBlockThumbnailWithPath(name, mediaPath) {
824
+ await (0, test_1.expect)(this.chooseThumbnailAlias).toBeVisible();
758
825
  await this.chooseThumbnailAlias.click();
759
826
  await this.clickCaretButtonForName('wwwroot');
760
827
  await this.clickExpandChildItemsForMediaButton();
761
828
  await this.page.locator('uui-menu-item[label="' + mediaPath + '"] #caret-button').click();
762
- await this.page.getByLabel(name, { exact: true }).click();
829
+ await this.clickLabelWithName(name, true);
763
830
  await this.clickChooseModalButton();
764
831
  }
765
832
  async clickBlockListHideContentEditorButton() {
833
+ await (0, test_1.expect)(this.hideContentEditorBlockListBtn).toBeVisible();
766
834
  await this.hideContentEditorBlockListBtn.click();
767
835
  }
768
836
  async enterEditorWidth(value) {
837
+ await (0, test_1.expect)(this.editorWidthTxt).toBeVisible();
769
838
  await this.editorWidthTxt.clear();
770
839
  await this.editorWidthTxt.fill(value);
771
840
  }
772
841
  async enterCreateButtonLabel(value) {
842
+ await (0, test_1.expect)(this.createButtonLabelTxt).toBeVisible();
773
843
  await this.createButtonLabelTxt.clear();
774
844
  await this.createButtonLabelTxt.fill(value);
775
845
  }
776
846
  async enterGridColumns(value) {
847
+ await (0, test_1.expect)(this.gridColumnsTxt).toBeVisible();
777
848
  await this.gridColumnsTxt.clear();
778
849
  if (value === undefined) {
779
850
  return;
@@ -781,17 +852,21 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
781
852
  await this.gridColumnsTxt.fill(value.toString());
782
853
  }
783
854
  async clickShowResizeOptions() {
855
+ await (0, test_1.expect)(this.showResizeOptionsBtn).toBeVisible();
784
856
  await this.showResizeOptionsBtn.click();
785
857
  }
786
858
  async clickAvailableColumnSpans(columnSpans) {
787
859
  for (let index in columnSpans) {
860
+ await (0, test_1.expect)(this.columnSpanOptions.getByLabel(columnSpans[index].toString(), { exact: true })).toBeVisible();
788
861
  await this.columnSpanOptions.getByLabel(columnSpans[index].toString(), { exact: true }).click();
789
862
  }
790
863
  }
791
864
  async goToBlockAreasTab() {
865
+ await (0, test_1.expect)(this.areasTabBtn).toBeVisible();
792
866
  await this.areasTabBtn.click();
793
867
  }
794
868
  async enterMinRowSpan(value) {
869
+ await (0, test_1.expect)(this.availableRowSpansLowValueTxt).toBeVisible();
795
870
  await this.availableRowSpansLowValueTxt.clear();
796
871
  if (value === undefined) {
797
872
  return;
@@ -799,6 +874,7 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
799
874
  await this.availableRowSpansLowValueTxt.fill(value.toString());
800
875
  }
801
876
  async enterMaxRowSpan(value) {
877
+ await (0, test_1.expect)(this.availableRowSpansHighValueTxt).toBeVisible();
802
878
  await this.availableRowSpansHighValueTxt.clear();
803
879
  if (value === undefined) {
804
880
  return;
@@ -806,6 +882,7 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
806
882
  await this.availableRowSpansHighValueTxt.fill(value.toString());
807
883
  }
808
884
  async enterGridColumnsForArea(value) {
885
+ await (0, test_1.expect)(this.areaGridColumnsTxt).toBeVisible();
809
886
  await this.areaGridColumnsTxt.clear();
810
887
  if (value === undefined) {
811
888
  return;
@@ -813,6 +890,7 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
813
890
  await this.areaGridColumnsTxt.fill(value.toString());
814
891
  }
815
892
  async addAreaButton() {
893
+ await (0, test_1.expect)(this.addAreaBtn).toBeVisible();
816
894
  await this.addAreaBtn.click();
817
895
  }
818
896
  async goToAreaByAlias(alias) {
@@ -827,14 +905,17 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
827
905
  await this.clickConfirmToDeleteButton();
828
906
  }
829
907
  async enterAreaAlias(alias) {
908
+ await (0, test_1.expect)(this.aliasAliasTxt).toBeVisible();
830
909
  await this.aliasAliasTxt.clear();
831
910
  await this.aliasAliasTxt.fill(alias);
832
911
  }
833
912
  async clickAreaSubmitButton() {
913
+ await (0, test_1.expect)(this.blockGridAreaWorkspaceSubmitBtn).toBeVisible();
834
914
  await this.blockGridAreaWorkspaceSubmitBtn.click();
835
915
  await this.page.waitForTimeout(500);
836
916
  }
837
917
  async enterCreateButtonLabelInArea(value) {
918
+ await (0, test_1.expect)(this.createLabelTxt.nth(1)).toBeVisible();
838
919
  await this.createLabelTxt.nth(1).clear();
839
920
  if (value === undefined) {
840
921
  return;
@@ -842,6 +923,7 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
842
923
  await this.createLabelTxt.nth(1).fill(value);
843
924
  }
844
925
  async enterMinAllowedInArea(value) {
926
+ await (0, test_1.expect)(this.minAllowedTxt).toBeVisible();
845
927
  await this.minAllowedTxt.clear();
846
928
  if (value === undefined) {
847
929
  return;
@@ -849,6 +931,7 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
849
931
  await this.minAllowedTxt.fill(value.toString());
850
932
  }
851
933
  async enterMaxAllowedInArea(value) {
934
+ await (0, test_1.expect)(this.maxAllowedTxt).toBeVisible();
852
935
  await this.maxAllowedTxt.clear();
853
936
  if (value === undefined) {
854
937
  return;
@@ -856,23 +939,29 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
856
939
  await this.maxAllowedTxt.fill(value.toString());
857
940
  }
858
941
  async clickAddSpecifiedAllowanceButton() {
942
+ await (0, test_1.expect)(this.addSpecifiedAllowanceBtn).toBeVisible();
859
943
  await this.addSpecifiedAllowanceBtn.click();
860
944
  }
861
945
  async goToBlockAdvancedTab() {
946
+ await (0, test_1.expect)(this.advancedTabBtn).toBeVisible();
862
947
  await this.advancedTabBtn.click();
863
948
  }
864
949
  async getLinkWithName(name) {
950
+ await (0, test_1.expect)(this.page.getByRole('link', { name: name })).toBeVisible();
865
951
  return this.page.getByRole('link', { name: name });
866
952
  }
867
953
  async getAddButtonInGroupWithName(name) {
954
+ await (0, test_1.expect)(this.page.locator('.group').filter({ hasText: name }).locator('#add-button')).toBeVisible();
868
955
  return this.page.locator('.group').filter({ hasText: name }).locator('#add-button');
869
956
  }
870
957
  async clickRemoveStylesheetButton(stylesheetName) {
871
- return this.page.locator('[name="' + stylesheetName + '"]').getByLabel('Remove').click();
958
+ await (0, test_1.expect)(this.page.locator('[name="' + stylesheetName + '"]').getByLabel('Remove')).toBeVisible();
959
+ await this.page.locator('[name="' + stylesheetName + '"]').getByLabel('Remove').click();
872
960
  }
873
961
  // TipTap
874
962
  async deleteToolbarGroup(groupIndex, rowIndex = 0) {
875
963
  const groupButton = this.tiptapToolbarConfiguration.locator('.row').nth(rowIndex).locator('.group').nth(groupIndex);
964
+ await (0, test_1.expect)(groupButton).toBeVisible();
876
965
  await groupButton.hover();
877
966
  const actionsInGroup = groupButton.locator('.items').locator('uui-button');
878
967
  const actionsCount = await actionsInGroup.count();
@@ -883,16 +972,20 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
883
972
  }
884
973
  async deleteToolbarRow(rowIndex) {
885
974
  const rowButton = this.tiptapToolbarConfiguration.locator('.row').nth(rowIndex);
975
+ await (0, test_1.expect)(rowButton).toBeVisible();
886
976
  await rowButton.hover();
887
977
  await rowButton.locator('[label="Remove row"]').click();
888
978
  }
889
979
  async clickAddRowToolbarButton() {
980
+ await (0, test_1.expect)(this.addRowToolbarBtn).toBeVisible();
890
981
  await this.addRowToolbarBtn.click();
891
982
  }
892
983
  async clickAddGroupToolbarButton() {
984
+ await (0, test_1.expect)(this.addGroupToolbarBtn).toBeVisible();
893
985
  await this.addGroupToolbarBtn.click();
894
986
  }
895
987
  async clickExtensionItemWithName(name) {
988
+ await (0, test_1.expect)(this.tiptapExtensionsConfiguration.locator('uui-checkbox[label="' + name + '"]')).toBeVisible();
896
989
  await this.tiptapExtensionsConfiguration.locator('uui-checkbox[label="' + name + '"]').click();
897
990
  }
898
991
  async doesPropertyEditorHaveAlias(alias) {