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