@umbraco/playwright-testhelpers 15.0.9 → 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.
- package/dist/lib/helpers/ContentUiHelper.d.ts +26 -5
- package/dist/lib/helpers/ContentUiHelper.js +118 -14
- package/dist/lib/helpers/ContentUiHelper.js.map +1 -1
- package/dist/lib/helpers/DataTypeApiHelper.d.ts +9 -3
- package/dist/lib/helpers/DataTypeApiHelper.js +71 -4
- package/dist/lib/helpers/DataTypeApiHelper.js.map +1 -1
- package/dist/lib/helpers/DataTypeUiHelper.d.ts +5 -2
- package/dist/lib/helpers/DataTypeUiHelper.js +113 -17
- package/dist/lib/helpers/DataTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/DictionaryUiHelper.js +2 -1
- package/dist/lib/helpers/DictionaryUiHelper.js.map +1 -1
- package/dist/lib/helpers/DocumentApiHelper.d.ts +2 -0
- package/dist/lib/helpers/DocumentApiHelper.js +58 -0
- package/dist/lib/helpers/DocumentApiHelper.js.map +1 -1
- package/dist/lib/helpers/DocumentTypeUiHelper.d.ts +1 -0
- package/dist/lib/helpers/DocumentTypeUiHelper.js +15 -7
- package/dist/lib/helpers/DocumentTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/LanguageUiHelper.js +2 -2
- package/dist/lib/helpers/LanguageUiHelper.js.map +1 -1
- package/dist/lib/helpers/LogViewerUiHelper.js +1 -0
- package/dist/lib/helpers/LogViewerUiHelper.js.map +1 -1
- package/dist/lib/helpers/MediaApiHelper.js +15 -5
- package/dist/lib/helpers/MediaApiHelper.js.map +1 -1
- package/dist/lib/helpers/MediaUiHelper.js +2 -2
- package/dist/lib/helpers/MediaUiHelper.js.map +1 -1
- package/dist/lib/helpers/MemberUiHelper.js +1 -1
- package/dist/lib/helpers/MemberUiHelper.js.map +1 -1
- package/dist/lib/helpers/NotificationConstantHelper.js +1 -1
- package/dist/lib/helpers/NotificationConstantHelper.js.map +1 -1
- package/dist/lib/helpers/PartialViewUiHelper.js +5 -0
- package/dist/lib/helpers/PartialViewUiHelper.js.map +1 -1
- package/dist/lib/helpers/RedirectManagementApiHelper.d.ts +1 -0
- package/dist/lib/helpers/RedirectManagementApiHelper.js +7 -3
- package/dist/lib/helpers/RedirectManagementApiHelper.js.map +1 -1
- package/dist/lib/helpers/RedirectManagementUiHelper.d.ts +2 -0
- package/dist/lib/helpers/RedirectManagementUiHelper.js +5 -0
- package/dist/lib/helpers/RedirectManagementUiHelper.js.map +1 -1
- package/dist/lib/helpers/StylesheetUiHelper.js +1 -1
- package/dist/lib/helpers/StylesheetUiHelper.js.map +1 -1
- package/dist/lib/helpers/TemplateUiHelper.js +2 -0
- package/dist/lib/helpers/TemplateUiHelper.js.map +1 -1
- package/dist/lib/helpers/UiBaseLocators.d.ts +9 -0
- package/dist/lib/helpers/UiBaseLocators.js +65 -7
- package/dist/lib/helpers/UiBaseLocators.js.map +1 -1
- package/dist/lib/helpers/UserApiHelper.d.ts +1 -1
- package/dist/lib/helpers/UserApiHelper.js +2 -1
- package/dist/lib/helpers/UserApiHelper.js.map +1 -1
- package/dist/lib/helpers/UserGroupUiHelper.js +17 -3
- package/dist/lib/helpers/UserGroupUiHelper.js.map +1 -1
- package/dist/lib/helpers/UserUiHelper.d.ts +2 -0
- package/dist/lib/helpers/UserUiHelper.js +5 -0
- package/dist/lib/helpers/UserUiHelper.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -73,6 +73,7 @@ class UiBaseLocators {
|
|
|
73
73
|
aliasNameTxt;
|
|
74
74
|
deleteFolderThreeDotsBtn;
|
|
75
75
|
createLink;
|
|
76
|
+
actionMenucreateBtn;
|
|
76
77
|
insertValueBtn;
|
|
77
78
|
insertPartialViewBtn;
|
|
78
79
|
insertDictionaryItemBtn;
|
|
@@ -120,12 +121,15 @@ class UiBaseLocators {
|
|
|
120
121
|
actionsBtn;
|
|
121
122
|
mediaPickerModalSubmitBtn;
|
|
122
123
|
deleteBtn;
|
|
124
|
+
createModalBtn;
|
|
123
125
|
mediaCaptionAltTextModalSubmitBtn;
|
|
124
126
|
embeddedMediaModal;
|
|
125
127
|
embeddedURLTxt;
|
|
126
128
|
embeddedRetrieveBtn;
|
|
127
129
|
embeddedMediaModalConfirmBtn;
|
|
128
130
|
embeddedPreview;
|
|
131
|
+
sectionSidebar;
|
|
132
|
+
actionsMenuContainer;
|
|
129
133
|
constructor(page) {
|
|
130
134
|
this.page = page;
|
|
131
135
|
this.saveBtn = page.getByLabel('Save', { exact: true });
|
|
@@ -159,10 +163,12 @@ class UiBaseLocators {
|
|
|
159
163
|
this.newNameTxt = page.getByRole('textbox', { name: 'Enter new name...' });
|
|
160
164
|
this.renameModalBtn = page.locator('umb-rename-modal').getByLabel('Rename');
|
|
161
165
|
this.createBtn = page.getByRole('button', { name: /^Create(\.\.\.)?$/ });
|
|
166
|
+
this.actionsMenuContainer = page.locator('uui-scroll-container');
|
|
167
|
+
this.actionMenucreateBtn = this.actionsMenuContainer.getByRole('button', { name: /^Create(\.\.\.)?$/ });
|
|
162
168
|
this.successState = page.locator('[state="success"]');
|
|
163
169
|
this.chooseModalBtn = this.sidebarModal.locator('[look="primary"]').getByLabel('Choose');
|
|
164
|
-
this.addBtn = page.
|
|
165
|
-
this.renameFolderThreeDotsBtn = page.
|
|
170
|
+
this.addBtn = page.getByRole('button', { name: 'Add', exact: true });
|
|
171
|
+
this.renameFolderThreeDotsBtn = page.getByRole('button', { name: 'Rename folder...' });
|
|
166
172
|
this.renameFolderBtn = page.getByLabel('Rename folder');
|
|
167
173
|
this.confirmRenameFolderBtn = page.locator('#confirm').getByLabel('Rename folder');
|
|
168
174
|
this.updateFolderBtn = page.getByLabel('Update folder');
|
|
@@ -243,14 +249,21 @@ class UiBaseLocators {
|
|
|
243
249
|
this.actionsBtn = page.getByLabel('Actions', { exact: true });
|
|
244
250
|
this.mediaPickerModalSubmitBtn = page.locator('umb-media-picker-modal').getByLabel('Submit');
|
|
245
251
|
this.deleteBtn = page.getByRole('button', { name: /^Delete(\.\.\.)?$/ });
|
|
252
|
+
this.createModalBtn = this.sidebarModal.getByLabel('Create', { exact: true });
|
|
246
253
|
this.mediaCaptionAltTextModalSubmitBtn = page.locator('umb-media-caption-alt-text-modal').getByLabel('Submit');
|
|
247
254
|
this.embeddedMediaModal = page.locator('umb-embedded-media-modal');
|
|
248
255
|
this.embeddedURLTxt = this.embeddedMediaModal.locator('[label="URL"] #input');
|
|
249
256
|
this.embeddedRetrieveBtn = this.embeddedMediaModal.locator('[label="Retrieve"]');
|
|
250
257
|
this.embeddedMediaModalConfirmBtn = this.embeddedMediaModal.getByLabel('Confirm');
|
|
251
258
|
this.embeddedPreview = this.embeddedMediaModal.locator('[label="Preview"]');
|
|
259
|
+
this.sectionSidebar = page.locator('umb-section-sidebar');
|
|
260
|
+
}
|
|
261
|
+
async clickActionsMenuForNameInSectionSidebar(name) {
|
|
262
|
+
await this.sectionSidebar.locator('[label="' + name + '"]').hover();
|
|
263
|
+
await this.sectionSidebar.locator('[label="' + name + '"] >> [label="Open actions menu"]').first().click();
|
|
252
264
|
}
|
|
253
265
|
async clickActionsMenuForName(name) {
|
|
266
|
+
await (0, test_1.expect)(this.page.locator('[label="' + name + '"]')).toBeVisible();
|
|
254
267
|
await this.page.locator('[label="' + name + '"]').hover();
|
|
255
268
|
await this.page.locator('[label="' + name + '"] >> [label="Open actions menu"]').first().click();
|
|
256
269
|
}
|
|
@@ -259,8 +272,12 @@ class UiBaseLocators {
|
|
|
259
272
|
await (0, test_1.expect)(this.page.locator('[label="' + name + '"] >> [label="Open actions menu"]')).toBeVisible({ visible: isVisible });
|
|
260
273
|
}
|
|
261
274
|
async clickCaretButtonForName(name) {
|
|
275
|
+
await this.isCaretButtonWithNameVisible(name);
|
|
262
276
|
await this.page.locator('div').filter({ hasText: name }).locator('#caret-button').click();
|
|
263
277
|
}
|
|
278
|
+
async isCaretButtonWithNameVisible(name, isVisible = true) {
|
|
279
|
+
await (0, test_1.expect)(this.page.locator('div').filter({ hasText: name }).locator('#caret-button')).toBeVisible({ visible: isVisible });
|
|
280
|
+
}
|
|
264
281
|
async clickCaretButton() {
|
|
265
282
|
await this.page.locator('#caret-button').click();
|
|
266
283
|
}
|
|
@@ -274,7 +291,6 @@ class UiBaseLocators {
|
|
|
274
291
|
const isCaretButtonOpen = await menuItem.getAttribute('show-children');
|
|
275
292
|
if (isCaretButtonOpen === null) {
|
|
276
293
|
// We need to wait before clicking the caret button. Because the reload might not have happend yet.
|
|
277
|
-
// await this.page.waitForTimeout(500);
|
|
278
294
|
await this.clickCaretButtonForName(treeName);
|
|
279
295
|
}
|
|
280
296
|
}
|
|
@@ -386,7 +402,7 @@ class UiBaseLocators {
|
|
|
386
402
|
await this.page.locator('[name="' + name + '"] [name="icon-trash"]').click();
|
|
387
403
|
}
|
|
388
404
|
async clickRemoveWithName(name) {
|
|
389
|
-
const removeLabelWithNameLocator = this.page.
|
|
405
|
+
const removeLabelWithNameLocator = this.page.locator('[label="Remove ' + name + '"]');
|
|
390
406
|
await (0, test_1.expect)(removeLabelWithNameLocator).toBeVisible();
|
|
391
407
|
await removeLabelWithNameLocator.click();
|
|
392
408
|
}
|
|
@@ -424,6 +440,7 @@ class UiBaseLocators {
|
|
|
424
440
|
await this.orderByPropertyAliasBtn.click();
|
|
425
441
|
// Click to ascending button if isAscending is false
|
|
426
442
|
if (!isAscending) {
|
|
443
|
+
await (0, test_1.expect)(this.ascendingBtn).toBeVisible();
|
|
427
444
|
await this.ascendingBtn.click();
|
|
428
445
|
}
|
|
429
446
|
}
|
|
@@ -450,7 +467,7 @@ class UiBaseLocators {
|
|
|
450
467
|
await ddlOption.click();
|
|
451
468
|
}
|
|
452
469
|
async createFolder(folderName) {
|
|
453
|
-
await this.
|
|
470
|
+
await this.clickActionsMenuCreateButton();
|
|
454
471
|
await this.clickNewFolderThreeDotsButton();
|
|
455
472
|
await this.enterFolderName(folderName);
|
|
456
473
|
await this.clickConfirmCreateFolderButton();
|
|
@@ -495,6 +512,7 @@ class UiBaseLocators {
|
|
|
495
512
|
}
|
|
496
513
|
async goToSettingsTreeItem(settingsTreeItemName) {
|
|
497
514
|
await this.goToSection(ConstantHelper_1.ConstantHelper.sections.settings);
|
|
515
|
+
await (0, test_1.expect)(this.page.getByLabel(settingsTreeItemName, { exact: true })).toBeVisible();
|
|
498
516
|
await this.page.getByLabel(settingsTreeItemName, { exact: true }).click();
|
|
499
517
|
}
|
|
500
518
|
async clickDataElement(elementName, options = null) {
|
|
@@ -535,7 +553,12 @@ class UiBaseLocators {
|
|
|
535
553
|
await (0, test_1.expect)(this.createBtn).toBeVisible();
|
|
536
554
|
await this.createBtn.click();
|
|
537
555
|
}
|
|
556
|
+
async clickActionsMenuCreateButton() {
|
|
557
|
+
await (0, test_1.expect)(this.actionMenucreateBtn).toBeVisible();
|
|
558
|
+
await this.actionMenucreateBtn.click();
|
|
559
|
+
}
|
|
538
560
|
async clickAddButton() {
|
|
561
|
+
await (0, test_1.expect)(this.addBtn).toBeVisible();
|
|
539
562
|
await this.addBtn.click();
|
|
540
563
|
}
|
|
541
564
|
;
|
|
@@ -576,9 +599,11 @@ class UiBaseLocators {
|
|
|
576
599
|
await this.validation.selectOption(option);
|
|
577
600
|
}
|
|
578
601
|
async enterRegEx(regEx) {
|
|
602
|
+
await (0, test_1.expect)(this.regexTxt).toBeVisible();
|
|
579
603
|
await this.regexTxt.fill(regEx);
|
|
580
604
|
}
|
|
581
605
|
async enterRegExMessage(regExMessage) {
|
|
606
|
+
await (0, test_1.expect)(this.regexMessageTxt).toBeVisible();
|
|
582
607
|
await this.regexMessageTxt.fill(regExMessage);
|
|
583
608
|
}
|
|
584
609
|
async clickCompositionsButton() {
|
|
@@ -618,6 +643,8 @@ class UiBaseLocators {
|
|
|
618
643
|
await this.clickSubmitButton();
|
|
619
644
|
}
|
|
620
645
|
async enterPropertyEditorDescription(description) {
|
|
646
|
+
await (0, test_1.expect)(this.enterPropertyEditorDescriptionTxt).toBeVisible();
|
|
647
|
+
await this.enterPropertyEditorDescriptionTxt.clear();
|
|
621
648
|
await this.enterPropertyEditorDescriptionTxt.fill(description);
|
|
622
649
|
}
|
|
623
650
|
async clickAddGroupButton() {
|
|
@@ -628,7 +655,6 @@ class UiBaseLocators {
|
|
|
628
655
|
await this.chooseModalBtn.click();
|
|
629
656
|
}
|
|
630
657
|
async enterGroupName(groupName, index = 0) {
|
|
631
|
-
await this.page.waitForTimeout(200);
|
|
632
658
|
const groupNameTxt = this.groupLabel.nth(index);
|
|
633
659
|
await (0, test_1.expect)(groupNameTxt).toBeVisible();
|
|
634
660
|
await groupNameTxt.clear();
|
|
@@ -668,9 +694,11 @@ class UiBaseLocators {
|
|
|
668
694
|
await this.page.mouse.up();
|
|
669
695
|
}
|
|
670
696
|
async getButtonWithName(name) {
|
|
697
|
+
await (0, test_1.expect)(this.page.getByRole('button', { name: name })).toBeVisible();
|
|
671
698
|
return this.page.getByRole('button', { name: name });
|
|
672
699
|
}
|
|
673
700
|
async clickCreateLink() {
|
|
701
|
+
await (0, test_1.expect)(this.createLink).toBeVisible();
|
|
674
702
|
await this.createLink.click();
|
|
675
703
|
}
|
|
676
704
|
async insertSystemFieldValue(fieldValue) {
|
|
@@ -695,6 +723,7 @@ class UiBaseLocators {
|
|
|
695
723
|
async deletePropertyEditorWithName(name) {
|
|
696
724
|
// We need to hover over the Property Editor to make the delete button visible
|
|
697
725
|
const propertyEditor = this.page.locator('umb-content-type-design-editor-property', { hasText: name });
|
|
726
|
+
await (0, test_1.expect)(propertyEditor).toBeVisible();
|
|
698
727
|
await propertyEditor.hover();
|
|
699
728
|
await (0, test_1.expect)(propertyEditor.getByLabel('Delete')).toBeVisible();
|
|
700
729
|
// Force click is needed
|
|
@@ -702,6 +731,7 @@ class UiBaseLocators {
|
|
|
702
731
|
await this.clickConfirmToDeleteButton();
|
|
703
732
|
}
|
|
704
733
|
async clickRenameButton() {
|
|
734
|
+
await (0, test_1.expect)(this.renameBtn).toBeVisible();
|
|
705
735
|
await this.renameBtn.click();
|
|
706
736
|
}
|
|
707
737
|
async clickDeleteAndConfirmButton() {
|
|
@@ -709,9 +739,11 @@ class UiBaseLocators {
|
|
|
709
739
|
await this.clickConfirmToDeleteButton();
|
|
710
740
|
}
|
|
711
741
|
async clickDeleteButton() {
|
|
742
|
+
await (0, test_1.expect)(this.deleteBtn).toBeVisible();
|
|
712
743
|
await this.deleteBtn.click();
|
|
713
744
|
}
|
|
714
745
|
async clickQueryBuilderButton() {
|
|
746
|
+
await (0, test_1.expect)(this.queryBuilderBtn).toBeVisible();
|
|
715
747
|
await this.queryBuilderBtn.click();
|
|
716
748
|
}
|
|
717
749
|
async chooseRootContentInQueryBuilder(contentName) {
|
|
@@ -719,7 +751,7 @@ class UiBaseLocators {
|
|
|
719
751
|
await this.chooseRootContentBtn.click();
|
|
720
752
|
await (0, test_1.expect)(this.page.getByText(contentName)).toBeVisible();
|
|
721
753
|
await this.page.getByText(contentName).click();
|
|
722
|
-
await this.
|
|
754
|
+
await this.clickChooseButton();
|
|
723
755
|
}
|
|
724
756
|
async reorderTwoGroups() {
|
|
725
757
|
const firstGroup = this.typeGroups.nth(0);
|
|
@@ -732,9 +764,11 @@ class UiBaseLocators {
|
|
|
732
764
|
return { firstGroupValue, secondGroupValue };
|
|
733
765
|
}
|
|
734
766
|
async clickAllowedChildNodesButton() {
|
|
767
|
+
await (0, test_1.expect)(this.allowedChildNodesModal.locator(this.chooseBtn)).toBeVisible();
|
|
735
768
|
await this.allowedChildNodesModal.locator(this.chooseBtn).click();
|
|
736
769
|
}
|
|
737
770
|
async clickConfigureAsACollectionButton() {
|
|
771
|
+
await (0, test_1.expect)(this.configureAsACollectionBtn).toBeVisible();
|
|
738
772
|
await this.configureAsACollectionBtn.click();
|
|
739
773
|
}
|
|
740
774
|
async doesReturnedItemsHaveCount(itemCount) {
|
|
@@ -757,15 +791,18 @@ class UiBaseLocators {
|
|
|
757
791
|
}
|
|
758
792
|
}
|
|
759
793
|
async clickRemoveTabWithName(name) {
|
|
794
|
+
await (0, test_1.expect)(this.page.locator('uui-tab').filter({ hasText: name })).toBeVisible();
|
|
760
795
|
await this.page.locator('uui-tab').filter({ hasText: name }).hover();
|
|
761
796
|
const removeTabWithNameLocator = this.page.locator('uui-tab').filter({ hasText: name }).locator('[label="Remove"]');
|
|
762
797
|
await (0, test_1.expect)(removeTabWithNameLocator).toBeVisible();
|
|
763
798
|
await removeTabWithNameLocator.click();
|
|
764
799
|
}
|
|
765
800
|
async clickLeftArrowButton() {
|
|
801
|
+
await (0, test_1.expect)(this.leftArrowBtn).toBeVisible();
|
|
766
802
|
await this.leftArrowBtn.click();
|
|
767
803
|
}
|
|
768
804
|
async clickToUploadButton() {
|
|
805
|
+
await (0, test_1.expect)(this.clickToUploadBtn).toBeVisible();
|
|
769
806
|
await this.clickToUploadBtn.click();
|
|
770
807
|
}
|
|
771
808
|
async uploadFile(filePath) {
|
|
@@ -784,9 +821,11 @@ class UiBaseLocators {
|
|
|
784
821
|
await (0, test_1.expect)(this.failedStateButton).toBeVisible();
|
|
785
822
|
}
|
|
786
823
|
async clickContainerSaveAndPublishButton() {
|
|
824
|
+
await (0, test_1.expect)(this.containerSaveAndPublishBtn).toBeVisible();
|
|
787
825
|
await this.containerSaveAndPublishBtn.click();
|
|
788
826
|
}
|
|
789
827
|
async clickConfirmTrashButton() {
|
|
828
|
+
await (0, test_1.expect)(this.confirmTrashBtn).toBeVisible();
|
|
790
829
|
await this.confirmTrashBtn.click();
|
|
791
830
|
}
|
|
792
831
|
async reloadRecycleBin(containsItems = true) {
|
|
@@ -840,9 +879,11 @@ class UiBaseLocators {
|
|
|
840
879
|
await (0, test_1.expect)(this.page.getByRole('tab', { name: sectionName })).toBeVisible({ visible: isVisible });
|
|
841
880
|
}
|
|
842
881
|
async clickMediaCardWithName(name) {
|
|
882
|
+
await (0, test_1.expect)(this.mediaCardItems.filter({ hasText: name }).locator('umb-icon')).toBeVisible();
|
|
843
883
|
await this.mediaCardItems.filter({ hasText: name }).locator('umb-icon').click();
|
|
844
884
|
}
|
|
845
885
|
async clickChooseContentStartNodeButton() {
|
|
886
|
+
await (0, test_1.expect)(this.chooseDocumentInputBtn).toBeVisible();
|
|
846
887
|
await this.chooseDocumentInputBtn.click();
|
|
847
888
|
}
|
|
848
889
|
async clickChooseMediaStartNodeButton() {
|
|
@@ -850,37 +891,54 @@ class UiBaseLocators {
|
|
|
850
891
|
await this.chooseMediaInputBtn.click();
|
|
851
892
|
}
|
|
852
893
|
async clickActionsButton() {
|
|
894
|
+
await (0, test_1.expect)(this.actionsBtn).toBeVisible();
|
|
853
895
|
await this.actionsBtn.click();
|
|
854
896
|
}
|
|
855
897
|
async clickReferenceNodeLinkWithName(name) {
|
|
898
|
+
await (0, test_1.expect)(this.page.locator('[name="' + name + '"] a#open-part')).toBeVisible();
|
|
856
899
|
await this.page.locator('[name="' + name + '"] a#open-part').click();
|
|
857
900
|
}
|
|
858
901
|
async clickLinkWithName(name) {
|
|
902
|
+
await (0, test_1.expect)(this.page.getByRole('link', { name: name })).toBeVisible();
|
|
859
903
|
await this.page.getByRole('link', { name: name }).click();
|
|
860
904
|
}
|
|
861
905
|
async clickMediaPickerModalSubmitButton() {
|
|
906
|
+
await (0, test_1.expect)(this.mediaPickerModalSubmitBtn).toBeVisible();
|
|
862
907
|
await this.mediaPickerModalSubmitBtn.click();
|
|
863
908
|
}
|
|
864
909
|
async selectMediaWithName(mediaName) {
|
|
910
|
+
await (0, test_1.expect)(this.mediaCardItems.filter({ hasText: mediaName })).toBeVisible();
|
|
865
911
|
await this.mediaCardItems.filter({ hasText: mediaName }).click({ position: { x: 0.5, y: 0.5 } });
|
|
866
912
|
}
|
|
913
|
+
async clickCreateModalButton() {
|
|
914
|
+
await (0, test_1.expect)(this.createModalBtn).toBeVisible();
|
|
915
|
+
await this.createModalBtn.click();
|
|
916
|
+
}
|
|
867
917
|
async clickMediaCaptionAltTextModalSubmitButton() {
|
|
918
|
+
await (0, test_1.expect)(this.mediaCaptionAltTextModalSubmitBtn).toBeVisible();
|
|
868
919
|
await this.mediaCaptionAltTextModalSubmitBtn.click();
|
|
869
920
|
}
|
|
870
921
|
// Embed Modal
|
|
871
922
|
async enterEmbeddedURL(value) {
|
|
923
|
+
await (0, test_1.expect)(this.embeddedURLTxt).toBeVisible();
|
|
872
924
|
await this.embeddedURLTxt.clear();
|
|
873
925
|
await this.embeddedURLTxt.fill(value);
|
|
874
926
|
}
|
|
875
927
|
async clickEmbeddedRetrieveButton() {
|
|
928
|
+
await (0, test_1.expect)(this.embeddedRetrieveBtn).toBeVisible();
|
|
876
929
|
await this.embeddedRetrieveBtn.click();
|
|
877
930
|
}
|
|
878
931
|
async clickEmbeddedMediaModalConfirmButton() {
|
|
932
|
+
await (0, test_1.expect)(this.embeddedMediaModalConfirmBtn).toBeVisible();
|
|
879
933
|
await this.embeddedMediaModalConfirmBtn.click();
|
|
880
934
|
}
|
|
881
935
|
async waitForEmbeddedPreviewVisible() {
|
|
882
936
|
await (0, test_1.expect)(this.embeddedPreview).toBeVisible();
|
|
883
937
|
}
|
|
938
|
+
async isSubmitButtonDisabled() {
|
|
939
|
+
await (0, test_1.expect)(this.submitBtn).toBeVisible();
|
|
940
|
+
await (0, test_1.expect)(this.submitBtn).toHaveAttribute('disabled');
|
|
941
|
+
}
|
|
884
942
|
async doesMediaHaveThumbnail(mediaId, thumbnailIconName, thumbnailImage) {
|
|
885
943
|
const mediaThumbnailLocator = this.page.locator('[data-mark="media:' + mediaId + '"]');
|
|
886
944
|
if (thumbnailIconName === 'image') {
|