@umbraco/playwright-testhelpers 17.0.19 → 17.1.0-beta.1
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/BasePage.d.ts +447 -0
- package/dist/lib/helpers/BasePage.js +543 -0
- package/dist/lib/helpers/BasePage.js.map +1 -0
- package/dist/lib/helpers/ConstantHelper.d.ts +17 -0
- package/dist/lib/helpers/ConstantHelper.js +17 -0
- package/dist/lib/helpers/ConstantHelper.js.map +1 -1
- package/dist/lib/helpers/ContentRenderUiHelper.js +3 -3
- package/dist/lib/helpers/ContentRenderUiHelper.js.map +1 -1
- package/dist/lib/helpers/ContentUiHelper.d.ts +0 -6
- package/dist/lib/helpers/ContentUiHelper.js +333 -495
- package/dist/lib/helpers/ContentUiHelper.js.map +1 -1
- package/dist/lib/helpers/CurrentUserProfileUiHelper.js +4 -10
- package/dist/lib/helpers/CurrentUserProfileUiHelper.js.map +1 -1
- package/dist/lib/helpers/DataTypeUiHelper.js +189 -328
- package/dist/lib/helpers/DataTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/DictionaryUiHelper.js +16 -21
- package/dist/lib/helpers/DictionaryUiHelper.js.map +1 -1
- package/dist/lib/helpers/DocumentBlueprintUiHelper.js +7 -8
- package/dist/lib/helpers/DocumentBlueprintUiHelper.js.map +1 -1
- package/dist/lib/helpers/DocumentTypeApiHelper.d.ts +1 -4
- package/dist/lib/helpers/DocumentTypeApiHelper.js +1 -121
- package/dist/lib/helpers/DocumentTypeApiHelper.js.map +1 -1
- package/dist/lib/helpers/DocumentTypeUiHelper.js +18 -33
- package/dist/lib/helpers/DocumentTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/ExamineManagementUiHelper.js +4 -4
- package/dist/lib/helpers/ExamineManagementUiHelper.js.map +1 -1
- package/dist/lib/helpers/FormsUiHelper.js +119 -158
- package/dist/lib/helpers/FormsUiHelper.js.map +1 -1
- package/dist/lib/helpers/HealthCheckUiHelper.js +3 -3
- package/dist/lib/helpers/HealthCheckUiHelper.js.map +1 -1
- package/dist/lib/helpers/LanguageUiHelper.js +15 -17
- package/dist/lib/helpers/LanguageUiHelper.js.map +1 -1
- package/dist/lib/helpers/LogViewerUiHelper.js +21 -30
- package/dist/lib/helpers/LogViewerUiHelper.js.map +1 -1
- package/dist/lib/helpers/LoginUiHelper.js +5 -7
- package/dist/lib/helpers/LoginUiHelper.js.map +1 -1
- package/dist/lib/helpers/MediaTypeUiHelper.js +11 -17
- package/dist/lib/helpers/MediaTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/MediaUiHelper.js +34 -43
- package/dist/lib/helpers/MediaUiHelper.js.map +1 -1
- package/dist/lib/helpers/MemberGroupUiHelper.js +12 -15
- package/dist/lib/helpers/MemberGroupUiHelper.js.map +1 -1
- package/dist/lib/helpers/MemberTypeUiHelper.js +2 -3
- package/dist/lib/helpers/MemberTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/MemberUiHelper.js +24 -42
- package/dist/lib/helpers/MemberUiHelper.js.map +1 -1
- package/dist/lib/helpers/ModelsBuilderUiHelper.js +2 -3
- package/dist/lib/helpers/ModelsBuilderUiHelper.js.map +1 -1
- package/dist/lib/helpers/PackageUiHelper.js +29 -34
- package/dist/lib/helpers/PackageUiHelper.js.map +1 -1
- package/dist/lib/helpers/PartialViewUiHelper.js +13 -15
- package/dist/lib/helpers/PartialViewUiHelper.js.map +1 -1
- package/dist/lib/helpers/ProfilingUiHelper.js +2 -4
- package/dist/lib/helpers/ProfilingUiHelper.js.map +1 -1
- package/dist/lib/helpers/PublishedStatusUiHelper.js +6 -6
- package/dist/lib/helpers/PublishedStatusUiHelper.js.map +1 -1
- package/dist/lib/helpers/RedirectManagementUiHelper.js +7 -12
- package/dist/lib/helpers/RedirectManagementUiHelper.js.map +1 -1
- package/dist/lib/helpers/RelationTypeUiHelper.js +12 -14
- package/dist/lib/helpers/RelationTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/ScriptUiHelper.js +8 -11
- package/dist/lib/helpers/ScriptUiHelper.js.map +1 -1
- package/dist/lib/helpers/StylesheetUiHelper.js +8 -12
- package/dist/lib/helpers/StylesheetUiHelper.js.map +1 -1
- package/dist/lib/helpers/TelemetryDataUiHelper.js +2 -3
- package/dist/lib/helpers/TelemetryDataUiHelper.js.map +1 -1
- package/dist/lib/helpers/TemplateUiHelper.js +17 -22
- package/dist/lib/helpers/TemplateUiHelper.js.map +1 -1
- package/dist/lib/helpers/UiBaseLocators.d.ts +230 -228
- package/dist/lib/helpers/UiBaseLocators.js +832 -869
- package/dist/lib/helpers/UiBaseLocators.js.map +1 -1
- package/dist/lib/helpers/UserGroupUiHelper.js +27 -44
- package/dist/lib/helpers/UserGroupUiHelper.js.map +1 -1
- package/dist/lib/helpers/UserUiHelper.js +43 -46
- package/dist/lib/helpers/UserUiHelper.js.map +1 -1
- package/dist/lib/helpers/WebhookUiHelper.js +11 -27
- package/dist/lib/helpers/WebhookUiHelper.js.map +1 -1
- package/dist/lib/helpers/WelcomeDashboardUiHelper.js +1 -1
- package/dist/lib/helpers/WelcomeDashboardUiHelper.js.map +1 -1
- package/dist/lib/helpers/differentAppSettingsHelpers/ExternalLoginUiHelpers.js +4 -9
- package/dist/lib/helpers/differentAppSettingsHelpers/ExternalLoginUiHelpers.js.map +1 -1
- package/dist/lib/helpers/differentAppSettingsHelpers/InstallUiHelper.js +5 -10
- package/dist/lib/helpers/differentAppSettingsHelpers/InstallUiHelper.js.map +1 -1
- package/dist/lib/helpers/index.d.ts +1 -0
- package/dist/lib/helpers/index.js +3 -1
- package/dist/lib/helpers/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DataTypeUiHelper = void 0;
|
|
4
4
|
const test_1 = require("@playwright/test");
|
|
5
5
|
const UiBaseLocators_1 = require("./UiBaseLocators");
|
|
6
|
+
const ConstantHelper_1 = require("./ConstantHelper");
|
|
6
7
|
class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
7
8
|
moveToBtn;
|
|
8
9
|
duplicateToBtn;
|
|
@@ -320,57 +321,46 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
320
321
|
}
|
|
321
322
|
async goToDataType(dataTypeName) {
|
|
322
323
|
await this.clickRootFolderCaretButton();
|
|
323
|
-
await
|
|
324
|
-
await this.sectionSidebar.getByLabel(dataTypeName, { exact: true }).click();
|
|
324
|
+
await this.click(this.sectionSidebar.getByLabel(dataTypeName, { exact: true }));
|
|
325
325
|
}
|
|
326
326
|
async clickMoveToButton() {
|
|
327
|
-
await
|
|
328
|
-
await this.moveToBtn.click();
|
|
327
|
+
await this.click(this.moveToBtn);
|
|
329
328
|
}
|
|
330
329
|
async clickDuplicateToButton() {
|
|
331
|
-
await
|
|
332
|
-
await this.duplicateToBtn.click();
|
|
330
|
+
await this.click(this.duplicateToBtn);
|
|
333
331
|
}
|
|
334
332
|
async waitForDataTypeToBeCreated() {
|
|
335
|
-
await this.
|
|
333
|
+
await this.waitForLoadState();
|
|
336
334
|
}
|
|
337
335
|
async isDataTypeTreeItemVisible(name, isVisible = true) {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
await this.dataTypeTreeRoot.locator(this.caretBtn).first().click();
|
|
342
|
-
}
|
|
343
|
-
await this.isTreeItemVisible(name, isVisible);
|
|
336
|
+
const hasShowChildren = await this.dataTypeTreeRoot.getAttribute('show-children') !== null;
|
|
337
|
+
if (!hasShowChildren) {
|
|
338
|
+
await this.click(this.dataTypeTreeRoot.locator(this.caretBtn).first());
|
|
344
339
|
}
|
|
340
|
+
await this.isTreeItemVisible(name, isVisible);
|
|
345
341
|
}
|
|
346
342
|
async waitForDataTypeToBeDeleted() {
|
|
347
|
-
await this.
|
|
343
|
+
await this.waitForLoadState();
|
|
348
344
|
}
|
|
349
345
|
async waitForDataTypeToBeRenamed() {
|
|
350
|
-
await this.
|
|
346
|
+
await this.waitForLoadState();
|
|
351
347
|
}
|
|
352
348
|
async clickNewDataTypeButton() {
|
|
353
|
-
await
|
|
354
|
-
await this.newDataTypeBtn.click();
|
|
349
|
+
await this.click(this.newDataTypeBtn);
|
|
355
350
|
}
|
|
356
351
|
async clickNewDataTypeFolderButton() {
|
|
357
|
-
await
|
|
358
|
-
await this.newFolderBtn.click();
|
|
352
|
+
await this.click(this.newFolderBtn);
|
|
359
353
|
}
|
|
360
354
|
async enterDataTypeName(name) {
|
|
361
|
-
await
|
|
362
|
-
await this.dataTypeNameTxt
|
|
363
|
-
await this.dataTypeNameTxt.clear();
|
|
364
|
-
await this.dataTypeNameTxt.fill(name);
|
|
355
|
+
await this.click(this.dataTypeNameTxt);
|
|
356
|
+
await this.enterText(this.dataTypeNameTxt, name);
|
|
365
357
|
}
|
|
366
358
|
async clickCreateFolderButton() {
|
|
367
|
-
await
|
|
368
|
-
await this.
|
|
369
|
-
await this.page.waitForTimeout(500); // Wait for the action to complete
|
|
359
|
+
await this.click(this.createDataTypeFolderBtn);
|
|
360
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.short);
|
|
370
361
|
}
|
|
371
362
|
async clickUpdateFolderButton() {
|
|
372
|
-
await
|
|
373
|
-
await this.updateDataTypeFolderBtn.click();
|
|
363
|
+
await this.click(this.updateDataTypeFolderBtn);
|
|
374
364
|
}
|
|
375
365
|
async deleteDataType(name) {
|
|
376
366
|
await this.clickActionsMenuForDataType(name);
|
|
@@ -382,27 +372,24 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
382
372
|
}
|
|
383
373
|
async moveDataTypeToFolder(folderName) {
|
|
384
374
|
await this.clickMoveToActionMenuOption();
|
|
385
|
-
await
|
|
386
|
-
await this.
|
|
387
|
-
await this.chooseModalBtn.click();
|
|
375
|
+
await this.click(this.sidebarModal.getByText(folderName, { exact: true }));
|
|
376
|
+
await this.click(this.chooseModalBtn);
|
|
388
377
|
}
|
|
389
378
|
async duplicateDataTypeToFolder(folderName) {
|
|
390
379
|
await this.clickDuplicateToActionMenuOption();
|
|
391
|
-
await
|
|
392
|
-
await this.
|
|
393
|
-
await this.duplicateBtn.click();
|
|
380
|
+
await this.click(this.sidebarModal.getByText(folderName, { exact: true }));
|
|
381
|
+
await this.click(this.duplicateBtn);
|
|
394
382
|
}
|
|
395
383
|
async addMediaStartNode(mediaName) {
|
|
396
|
-
await
|
|
397
|
-
await this.mediaCardItems.filter({ hasText: mediaName }).click();
|
|
384
|
+
await this.click(this.mediaCardItems.filter({ hasText: mediaName }));
|
|
398
385
|
await this.clickChooseModalButton();
|
|
399
386
|
}
|
|
400
387
|
async addContentStartNode(contentName) {
|
|
401
388
|
await this.clickTextButtonWithName(contentName);
|
|
402
|
-
await this.
|
|
389
|
+
await this.click(this.chooseModalBtn);
|
|
403
390
|
}
|
|
404
391
|
async clickSelectAPropertyEditorButton() {
|
|
405
|
-
await this.
|
|
392
|
+
await this.click(this.selectAPropertyEditorBtn);
|
|
406
393
|
}
|
|
407
394
|
async selectAPropertyEditor(propertyName, filterKeyword) {
|
|
408
395
|
await this.typeToFilterTxt.fill(filterKeyword ? filterKeyword : propertyName);
|
|
@@ -410,260 +397,215 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
410
397
|
}
|
|
411
398
|
// Approved Color
|
|
412
399
|
async clickIncludeLabelsToggle() {
|
|
413
|
-
await this.
|
|
400
|
+
await this.click(this.includeLabelsToggle);
|
|
414
401
|
}
|
|
415
402
|
async removeColorByValue(value) {
|
|
416
|
-
await this.page.locator(
|
|
417
|
-
await this.
|
|
403
|
+
await this.click(this.page.locator(`[value="${value}"] uui-button svg`));
|
|
404
|
+
await this.click(this.confirmToDeleteBtn);
|
|
418
405
|
}
|
|
419
406
|
async addColor(value) {
|
|
420
|
-
await this.
|
|
421
|
-
await this.colorValueTxt
|
|
422
|
-
await this.colorValueTxt.fill(value);
|
|
407
|
+
await this.click(this.addColorBtn);
|
|
408
|
+
await this.enterText(this.colorValueTxt, value);
|
|
423
409
|
}
|
|
424
410
|
// Label
|
|
425
411
|
async changeValueType(valueType) {
|
|
426
|
-
await this.page.getByLabel('Select a value type')
|
|
412
|
+
await this.selectByText(this.page.getByLabel('Select a value type'), valueType);
|
|
427
413
|
}
|
|
428
414
|
// Date Picker
|
|
429
415
|
async clickOffsetTimeToggle() {
|
|
430
|
-
await this.
|
|
416
|
+
await this.click(this.offsetTimeToggle);
|
|
431
417
|
}
|
|
432
418
|
async enterDateFormatValue(value) {
|
|
433
|
-
await this.dateFormatTxt
|
|
434
|
-
await this.dateFormatTxt.fill(value);
|
|
419
|
+
await this.enterText(this.dateFormatTxt, value);
|
|
435
420
|
}
|
|
436
421
|
// List View
|
|
437
422
|
async enterPageSizeValue(value) {
|
|
438
|
-
await this.pageSizeTxt
|
|
439
|
-
await this.pageSizeTxt.fill(value);
|
|
423
|
+
await this.enterText(this.pageSizeTxt, value);
|
|
440
424
|
}
|
|
441
425
|
async chooseOrderDirection(isAscending) {
|
|
442
426
|
if (isAscending) {
|
|
443
|
-
await this.
|
|
427
|
+
await this.click(this.ascendingRadioBtn);
|
|
444
428
|
}
|
|
445
429
|
else {
|
|
446
|
-
await this.
|
|
430
|
+
await this.click(this.descendingRadioBtn);
|
|
447
431
|
}
|
|
448
432
|
}
|
|
449
433
|
async addColumnDisplayed(contentType, contentName, propertyAlias) {
|
|
450
|
-
await this.
|
|
434
|
+
await this.click(this.chooseColumnsDisplayedBtn);
|
|
451
435
|
await this.clickTextButtonWithName(contentType);
|
|
452
436
|
await this.clickTextButtonWithName(contentName);
|
|
453
437
|
await this.clickChooseContainerButton();
|
|
454
438
|
await this.clickTextButtonWithName(propertyAlias);
|
|
455
439
|
}
|
|
456
440
|
async removeColumnDisplayed(propertyAlias) {
|
|
457
|
-
await this.columnsDisplayedItems.filter({ has: this.page.getByText(propertyAlias, { exact: true }) }).getByText('Remove')
|
|
441
|
+
await this.click(this.columnsDisplayedItems.filter({ has: this.page.getByText(propertyAlias, { exact: true }) }).getByText('Remove'));
|
|
458
442
|
}
|
|
459
443
|
async addLayouts(layoutName) {
|
|
460
|
-
await
|
|
461
|
-
await this.
|
|
462
|
-
await (0, test_1.expect)(this.page.locator('[name="' + layoutName + '"]')).toBeVisible();
|
|
463
|
-
await this.page.locator('[name="' + layoutName + '"]').click();
|
|
444
|
+
await this.click(this.chooseLayoutsBtn);
|
|
445
|
+
await this.click(this.page.locator(`[name="${layoutName}"]`));
|
|
464
446
|
}
|
|
465
447
|
async removeLayouts(layoutAlias) {
|
|
466
|
-
await this.layoutsItems.filter({ has: this.page.getByText(layoutAlias, { exact: true }) }).getByText('Remove')
|
|
448
|
+
await this.click(this.layoutsItems.filter({ has: this.page.getByText(layoutAlias, { exact: true }) }).getByText('Remove'));
|
|
467
449
|
}
|
|
468
450
|
async chooseOrderByValue(value) {
|
|
469
|
-
await this.orderByDropDownBox
|
|
451
|
+
await this.selectByText(this.orderByDropDownBox, value);
|
|
470
452
|
}
|
|
471
453
|
async enterWorkspaceViewName(name) {
|
|
472
|
-
await this.workspaceViewName
|
|
473
|
-
await this.workspaceViewName.fill(name);
|
|
454
|
+
await this.enterText(this.workspaceViewName, name);
|
|
474
455
|
}
|
|
475
456
|
async clickShowContentWorkspaceViewFirstToggle() {
|
|
476
|
-
await this.
|
|
457
|
+
await this.click(this.showWorkspaceViewFirstToggle);
|
|
477
458
|
}
|
|
478
459
|
async clickEditInInfiniteEditorToggle() {
|
|
479
|
-
await this.
|
|
460
|
+
await this.click(this.editInInfiniteEditorToggle);
|
|
480
461
|
}
|
|
481
462
|
async clickBulkActionPermissionsToggleByValue(value) {
|
|
482
|
-
await this.page.locator(
|
|
463
|
+
await this.click(this.page.locator(`uui-toggle[label='${value}'] #toggle`));
|
|
483
464
|
}
|
|
484
465
|
async clickSelectIconButton() {
|
|
485
|
-
await (0, test_1.expect)(this.selectIconBtn).toBeVisible();
|
|
486
466
|
// Force click is needed
|
|
487
|
-
await this.
|
|
467
|
+
await this.click(this.selectIconBtn, { force: true });
|
|
488
468
|
}
|
|
489
469
|
async chooseWorkspaceViewIconByValue(value) {
|
|
490
|
-
await this.page.locator(
|
|
491
|
-
await this.
|
|
470
|
+
await this.click(this.page.locator(`[label="${value}"] svg`));
|
|
471
|
+
await this.click(this.submitBtn);
|
|
492
472
|
}
|
|
493
473
|
// Image Cropper
|
|
494
474
|
async enterCropValues(label, alias, width, height) {
|
|
495
|
-
await
|
|
496
|
-
await this.
|
|
497
|
-
await this.
|
|
498
|
-
await
|
|
499
|
-
await this.aliasTxt.clear();
|
|
500
|
-
await this.aliasTxt.fill(alias);
|
|
501
|
-
await (0, test_1.expect)(this.widthTxt).toBeVisible();
|
|
502
|
-
await this.widthTxt.clear();
|
|
503
|
-
await this.widthTxt.fill(width);
|
|
504
|
-
await this.heightTxt.clear();
|
|
505
|
-
await this.heightTxt.fill(height);
|
|
475
|
+
await this.enterText(this.labelTxt, label);
|
|
476
|
+
await this.enterText(this.aliasTxt, alias);
|
|
477
|
+
await this.enterText(this.widthTxt, width);
|
|
478
|
+
await this.enterText(this.heightTxt, height);
|
|
506
479
|
}
|
|
507
480
|
async clickCreateCropButton() {
|
|
508
|
-
await
|
|
509
|
-
await this.createCropBtn.click();
|
|
481
|
+
await this.click(this.createCropBtn);
|
|
510
482
|
}
|
|
511
483
|
async clickEditCropButton() {
|
|
512
|
-
await
|
|
513
|
-
await this.editCropBtn.click();
|
|
484
|
+
await this.click(this.editCropBtn);
|
|
514
485
|
}
|
|
515
486
|
async editCropByAlias(alias) {
|
|
516
|
-
await
|
|
517
|
-
await this.page.locator('.crop').filter({ has: this.page.getByText(alias) }).getByText('Edit').click();
|
|
487
|
+
await this.click(this.page.locator('.crop').filter({ has: this.page.getByText(alias) }).getByText('Edit'));
|
|
518
488
|
}
|
|
519
489
|
async removeCropByAlias(alias) {
|
|
520
|
-
await
|
|
521
|
-
await this.page.locator('.crop').filter({ has: this.page.getByText(alias) }).getByText('Remove').click();
|
|
490
|
+
await this.click(this.page.locator('.crop').filter({ has: this.page.getByText(alias) }).getByText('Remove'));
|
|
522
491
|
}
|
|
523
492
|
// Numeric
|
|
524
493
|
async enterMinimumValue(value) {
|
|
525
|
-
await
|
|
526
|
-
await this.minimumTxt.clear();
|
|
527
|
-
await this.minimumTxt.fill(value);
|
|
494
|
+
await this.enterText(this.minimumTxt, value);
|
|
528
495
|
}
|
|
529
496
|
async enterMaximumValue(value) {
|
|
530
|
-
await
|
|
531
|
-
await this.maximumTxt.clear();
|
|
532
|
-
await this.maximumTxt.fill(value);
|
|
497
|
+
await this.enterText(this.maximumTxt, value);
|
|
533
498
|
}
|
|
534
499
|
async enterStepSizeValue(value) {
|
|
535
|
-
await
|
|
536
|
-
await this.stepSizeTxt.clear();
|
|
537
|
-
await this.stepSizeTxt.fill(value);
|
|
500
|
+
await this.enterText(this.stepSizeTxt, value);
|
|
538
501
|
}
|
|
539
502
|
async clickAllowDecimalsToggle() {
|
|
540
|
-
await
|
|
541
|
-
await this.allowDecimalsToggle.click();
|
|
503
|
+
await this.click(this.allowDecimalsToggle);
|
|
542
504
|
}
|
|
543
505
|
// Radiobox
|
|
544
506
|
async removeOptionByName(name) {
|
|
545
|
-
await
|
|
546
|
-
await this.
|
|
547
|
-
await this.confirmToDeleteBtn.click();
|
|
507
|
+
await this.click(this.page.locator(`uui-button[label='Remove ${name}'] svg`));
|
|
508
|
+
await this.click(this.confirmToDeleteBtn);
|
|
548
509
|
}
|
|
549
510
|
async enterOptionName(name) {
|
|
550
|
-
await
|
|
551
|
-
await this.optionTxt.last().clear();
|
|
552
|
-
await this.optionTxt.last().fill(name);
|
|
511
|
+
await this.enterText(this.optionTxt.last(), name);
|
|
553
512
|
}
|
|
554
513
|
async clickAddOptionButton() {
|
|
555
|
-
await
|
|
556
|
-
await this.addOptionBtn.click();
|
|
514
|
+
await this.click(this.addOptionBtn);
|
|
557
515
|
}
|
|
558
516
|
// Textarea - Textstring
|
|
559
517
|
async enterMaximumAllowedCharactersValue(value) {
|
|
560
|
-
await
|
|
561
|
-
await this.maximumAllowedCharsTxt.clear();
|
|
562
|
-
await this.maximumAllowedCharsTxt.fill(value);
|
|
518
|
+
await this.enterText(this.maximumAllowedCharsTxt, value);
|
|
563
519
|
}
|
|
564
520
|
async enterNumberOfRowsValue(value) {
|
|
565
|
-
await
|
|
566
|
-
await this.numberOfRowsTxt.clear();
|
|
567
|
-
await this.numberOfRowsTxt.fill(value);
|
|
521
|
+
await this.enterText(this.numberOfRowsTxt, value);
|
|
568
522
|
}
|
|
569
523
|
async enterMaxHeightValue(value) {
|
|
570
|
-
await
|
|
571
|
-
await this.maxHeightTxt.clear();
|
|
572
|
-
await this.maxHeightTxt.fill(value);
|
|
524
|
+
await this.enterText(this.maxHeightTxt, value);
|
|
573
525
|
}
|
|
574
526
|
async enterMinHeightValue(value) {
|
|
575
|
-
await this.minHeightTxt
|
|
576
|
-
await this.minHeightTxt.fill(value);
|
|
527
|
+
await this.enterText(this.minHeightTxt, value);
|
|
577
528
|
}
|
|
578
529
|
// Upload
|
|
579
530
|
async enterAcceptedFileExtensions(value) {
|
|
580
|
-
await this.acceptedFileExtensionsTxt.last()
|
|
581
|
-
await this.acceptedFileExtensionsTxt.last().fill(value);
|
|
531
|
+
await this.enterText(this.acceptedFileExtensionsTxt.last(), value);
|
|
582
532
|
}
|
|
583
533
|
async removeAcceptedFileExtensionsByValue(value) {
|
|
584
|
-
await this.page.locator(
|
|
585
|
-
await this.
|
|
534
|
+
await this.click(this.page.locator(`uui-button[label='Remove ${value}'] svg`));
|
|
535
|
+
await this.click(this.confirmToDeleteBtn);
|
|
586
536
|
}
|
|
587
537
|
async clickAddAcceptedFileExtensionsButton() {
|
|
588
|
-
await this.
|
|
538
|
+
await this.click(this.addAcceptedFileExtensionsBtn);
|
|
589
539
|
}
|
|
590
540
|
// Multi URL Picker
|
|
591
541
|
async enterMinimumNumberOfItemsValue(value) {
|
|
592
|
-
await this.minimumNumberOfItemsTxt
|
|
593
|
-
await this.minimumNumberOfItemsTxt.fill(value);
|
|
542
|
+
await this.enterText(this.minimumNumberOfItemsTxt, value);
|
|
594
543
|
}
|
|
595
544
|
async enterMaximumNumberOfItemsValue(value) {
|
|
596
|
-
await this.maximumNumberOfItemsTxt
|
|
597
|
-
await this.maximumNumberOfItemsTxt.fill(value);
|
|
545
|
+
await this.enterText(this.maximumNumberOfItemsTxt, value);
|
|
598
546
|
}
|
|
599
547
|
async clickIgnoreUserStartNodesToggle() {
|
|
600
|
-
await this.
|
|
548
|
+
await this.click(this.ignoreUserStartNodesToggle);
|
|
601
549
|
}
|
|
602
550
|
async chooseOverlaySizeByValue(value) {
|
|
603
|
-
await this.overlaySizeDropDownBox
|
|
551
|
+
await this.selectByValue(this.overlaySizeDropDownBox, value);
|
|
604
552
|
}
|
|
605
553
|
async clickHideAnchorQueryStringInputToggle() {
|
|
606
|
-
await this.
|
|
554
|
+
await this.click(this.hideAnchorQueryStringInputToggle);
|
|
607
555
|
}
|
|
608
556
|
// Media Picker
|
|
609
557
|
async clickPickMultipleItemsToggle() {
|
|
610
|
-
await this.
|
|
558
|
+
await this.click(this.pickMultipleItemsToggle);
|
|
611
559
|
}
|
|
612
560
|
async clickEnableFocalPointToggle() {
|
|
613
|
-
await
|
|
614
|
-
await this.enableFocalPointToggle.click();
|
|
561
|
+
await this.click(this.enableFocalPointToggle);
|
|
615
562
|
}
|
|
616
563
|
async enterAmountValue(lowValue, highValue) {
|
|
617
|
-
await this.amountLowValueTxt
|
|
618
|
-
await this.
|
|
619
|
-
await this.amountHighValueTxt.clear();
|
|
620
|
-
await this.amountHighValueTxt.fill(highValue);
|
|
564
|
+
await this.enterText(this.amountLowValueTxt, lowValue);
|
|
565
|
+
await this.enterText(this.amountHighValueTxt, highValue);
|
|
621
566
|
}
|
|
622
567
|
async addAcceptedType(mediaTypeName) {
|
|
623
|
-
await this.
|
|
568
|
+
await this.click(this.chooseAcceptedTypesBtn);
|
|
624
569
|
await this.clickTextButtonWithName(mediaTypeName);
|
|
625
|
-
await this.
|
|
570
|
+
await this.click(this.chooseModalBtn);
|
|
626
571
|
}
|
|
627
572
|
async removeAcceptedType(mediaTypeName) {
|
|
628
|
-
await this.page.locator(
|
|
629
|
-
await this.
|
|
573
|
+
await this.click(this.page.locator(`uui-ref-node-document-type[name="${mediaTypeName}"]`).getByLabel('Remove'));
|
|
574
|
+
await this.click(this.confirmToRemoveBtn);
|
|
630
575
|
}
|
|
631
576
|
async removeMediaStartNode(mediaName) {
|
|
632
|
-
await this.page.locator(
|
|
633
|
-
await this.
|
|
577
|
+
await this.click(this.page.locator(`uui-card-media[name="${mediaName}"]`).locator('[label="Remove"]'));
|
|
578
|
+
await this.click(this.confirmToRemoveBtn);
|
|
634
579
|
}
|
|
635
580
|
async clickChooseStartNodeButton() {
|
|
636
|
-
await this.
|
|
581
|
+
await this.click(this.chooseStartNodeBtn);
|
|
637
582
|
}
|
|
638
583
|
// Richtext Editor
|
|
639
584
|
async clickToolbarOptionByValue(values) {
|
|
640
585
|
for (var index in values) {
|
|
641
|
-
await this.toolbarCheckboxes.filter({ has: this.page.getByLabel(values[index]) }).locator('#ticker svg')
|
|
586
|
+
await this.click(this.toolbarCheckboxes.filter({ has: this.page.getByLabel(values[index]) }).locator('#ticker svg'));
|
|
642
587
|
}
|
|
643
588
|
}
|
|
644
589
|
async addStylesheet(stylesheetName) {
|
|
645
|
-
await this.
|
|
646
|
-
await this.page.getByLabel(stylesheetName)
|
|
647
|
-
await this.
|
|
590
|
+
await this.click(this.addStylesheetBtn);
|
|
591
|
+
await this.click(this.page.getByLabel(stylesheetName));
|
|
592
|
+
await this.click(this.chooseModalBtn);
|
|
648
593
|
}
|
|
649
594
|
async enterDimensionsValue(width, height) {
|
|
650
|
-
await this.dimensionsWidthTxt
|
|
651
|
-
await this.
|
|
652
|
-
await this.dimensionsHeightTxt.clear();
|
|
653
|
-
await this.dimensionsHeightTxt.fill(height);
|
|
595
|
+
await this.enterText(this.dimensionsWidthTxt, width);
|
|
596
|
+
await this.enterText(this.dimensionsHeightTxt, height);
|
|
654
597
|
}
|
|
655
598
|
async enterMaximumSizeForImages(value) {
|
|
656
|
-
await this.maxImageSizeTxt
|
|
657
|
-
await this.maxImageSizeTxt.fill(value);
|
|
599
|
+
await this.enterText(this.maxImageSizeTxt, value);
|
|
658
600
|
}
|
|
659
601
|
async clickHideLabelToggle() {
|
|
660
|
-
await this.
|
|
602
|
+
await this.click(this.hideLabelToggle);
|
|
661
603
|
}
|
|
662
604
|
async clickInlineRadioButton() {
|
|
663
|
-
await this.
|
|
605
|
+
await this.click(this.inlineRadioBtn);
|
|
664
606
|
}
|
|
665
607
|
async clickChooseWithPlusButton() {
|
|
666
|
-
await this.
|
|
608
|
+
await this.click(this.chooseWithPlusBtn);
|
|
667
609
|
}
|
|
668
610
|
async addImageUploadFolder(mediaFolderName) {
|
|
669
611
|
await this.clickChooseWithPlusButton();
|
|
@@ -671,8 +613,7 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
671
613
|
await this.clickChooseModalButton();
|
|
672
614
|
}
|
|
673
615
|
async clickAddWithPlusButton() {
|
|
674
|
-
await
|
|
675
|
-
await this.addWithPlusBtn.click();
|
|
616
|
+
await this.click(this.addWithPlusBtn);
|
|
676
617
|
}
|
|
677
618
|
async addAvailableBlocks(blockName) {
|
|
678
619
|
await this.clickAddWithPlusButton();
|
|
@@ -682,187 +623,136 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
682
623
|
}
|
|
683
624
|
// Tags
|
|
684
625
|
async enterDefineTagGroupValue(value) {
|
|
685
|
-
await
|
|
686
|
-
await this.defineTagGroupTxt.clear();
|
|
687
|
-
await this.defineTagGroupTxt.fill(value);
|
|
626
|
+
await this.enterText(this.defineTagGroupTxt, value);
|
|
688
627
|
}
|
|
689
628
|
async selectStorageTypeOption(option) {
|
|
690
|
-
await
|
|
691
|
-
await this.storageTypeDropDownBox.selectOption({ label: option });
|
|
629
|
+
await this.selectByText(this.storageTypeDropDownBox, option);
|
|
692
630
|
}
|
|
693
631
|
// Content Picker
|
|
694
632
|
async clickShowOpenButtonToggle() {
|
|
695
|
-
await
|
|
696
|
-
await this.showOpenButtonToggle.click();
|
|
633
|
+
await this.click(this.showOpenButtonToggle);
|
|
697
634
|
}
|
|
698
635
|
async removeContentStartNode(contentName) {
|
|
699
|
-
const startNodeLocator = this.entityItem.filter({ has: this.page.locator(
|
|
700
|
-
await startNodeLocator.
|
|
701
|
-
await startNodeLocator.getByLabel('Remove').click();
|
|
636
|
+
const startNodeLocator = this.entityItem.filter({ has: this.page.locator(`[name="${contentName}"]`) });
|
|
637
|
+
await this.hoverAndClick(startNodeLocator, startNodeLocator.getByLabel('Remove'));
|
|
702
638
|
await this.clickConfirmRemoveButton();
|
|
703
639
|
}
|
|
704
640
|
// Dropdown
|
|
705
641
|
async clickEnableMultipleChoiceToggle() {
|
|
706
|
-
await
|
|
707
|
-
await this.enableMultipleChoiceToggle.click();
|
|
642
|
+
await this.click(this.enableMultipleChoiceToggle);
|
|
708
643
|
}
|
|
709
644
|
async clickAddOptionsButton() {
|
|
710
|
-
await
|
|
711
|
-
await this.addOptionsBtn.click();
|
|
645
|
+
await this.click(this.addOptionsBtn);
|
|
712
646
|
}
|
|
713
647
|
// True/false
|
|
714
648
|
async clickPresetValueToggle() {
|
|
715
|
-
await
|
|
716
|
-
await this.presetValueToggle.click();
|
|
649
|
+
await this.click(this.presetValueToggle);
|
|
717
650
|
}
|
|
718
651
|
async clickShowToggleLabelsToggle() {
|
|
719
|
-
await
|
|
720
|
-
await this.showToggleLabelsToggle.click();
|
|
652
|
+
await this.click(this.showToggleLabelsToggle);
|
|
721
653
|
}
|
|
722
654
|
async enterLabelOnValue(value) {
|
|
723
|
-
await
|
|
724
|
-
await this.labelOnTxt.clear();
|
|
725
|
-
await this.labelOnTxt.fill(value);
|
|
655
|
+
await this.enterText(this.labelOnTxt, value);
|
|
726
656
|
}
|
|
727
657
|
async enterLabelOffValue(value) {
|
|
728
|
-
await
|
|
729
|
-
await this.labelOffTxt.clear();
|
|
730
|
-
await this.labelOffTxt.fill(value);
|
|
658
|
+
await this.enterText(this.labelOffTxt, value);
|
|
731
659
|
}
|
|
732
660
|
// Block List Editor
|
|
733
661
|
async clickAddBlockButton(index = 0) {
|
|
734
|
-
await
|
|
735
|
-
await this.addBlockBtn.nth(index).click();
|
|
662
|
+
await this.click(this.addBlockBtn.nth(index));
|
|
736
663
|
}
|
|
737
664
|
async clickRemoveBlockWithName(name) {
|
|
738
665
|
const blockWithNameLocator = this.page.locator('umb-block-type-card', { hasText: name });
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
await blockWithNameLocator.getByLabel('Remove block').click({ force: true });
|
|
666
|
+
// The force click is necessary.
|
|
667
|
+
await this.click(blockWithNameLocator.getByLabel('Remove block'), { force: true });
|
|
742
668
|
}
|
|
743
669
|
async enterMinAmount(value) {
|
|
744
|
-
await
|
|
745
|
-
await this.minAmountTxt.clear();
|
|
746
|
-
await this.minAmountTxt.fill(value);
|
|
670
|
+
await this.enterText(this.minAmountTxt, value);
|
|
747
671
|
}
|
|
748
672
|
async enterMaxAmount(value) {
|
|
749
|
-
await
|
|
750
|
-
await this.maxAmountTxt.clear();
|
|
751
|
-
await this.maxAmountTxt.fill(value);
|
|
673
|
+
await this.enterText(this.maxAmountTxt, value);
|
|
752
674
|
}
|
|
753
675
|
async doesAmountContainErrorMessageWithText(errorMessage) {
|
|
754
676
|
return await (0, test_1.expect)(this.page.getByText(errorMessage)).toBeVisible();
|
|
755
677
|
}
|
|
756
678
|
async clickSingleBlockMode() {
|
|
757
|
-
await
|
|
758
|
-
await this.singleBlockModeBtn.click();
|
|
679
|
+
await this.click(this.singleBlockModeBtn);
|
|
759
680
|
}
|
|
760
681
|
async clickLiveEditingMode() {
|
|
761
|
-
await
|
|
762
|
-
await this.liveEditingModeBtn.click();
|
|
682
|
+
await this.click(this.liveEditingModeBtn);
|
|
763
683
|
}
|
|
764
684
|
async clickInlineEditingMode() {
|
|
765
|
-
await
|
|
766
|
-
await this.inlineEditingModeBtn.click();
|
|
685
|
+
await this.click(this.inlineEditingModeBtn);
|
|
767
686
|
}
|
|
768
687
|
async enterPropertyEditorWidth(width) {
|
|
769
|
-
await
|
|
770
|
-
await this.propertyEditorWidthTxt.clear();
|
|
771
|
-
await this.propertyEditorWidthTxt.fill(width);
|
|
688
|
+
await this.enterText(this.propertyEditorWidthTxt, width);
|
|
772
689
|
}
|
|
773
690
|
async goToBlockWithName(name) {
|
|
774
|
-
await
|
|
775
|
-
await this.page.getByRole('link', { name: name }).click();
|
|
691
|
+
await this.click(this.page.getByRole('link', { name: name }));
|
|
776
692
|
}
|
|
777
693
|
async enterBlockLabelText(label) {
|
|
778
694
|
await this.removeBlockLabelText();
|
|
779
695
|
await this.labelTextTxt.fill(label);
|
|
780
696
|
}
|
|
781
697
|
async removeBlockLabelText() {
|
|
782
|
-
await
|
|
698
|
+
await this.waitForVisible(this.labelTextTxt);
|
|
783
699
|
await this.labelTextTxt.clear();
|
|
784
700
|
}
|
|
785
701
|
async clickAllowInRootForBlock() {
|
|
786
|
-
await
|
|
787
|
-
await this.allowBlockAtRootToggle.click();
|
|
702
|
+
await this.click(this.allowBlockAtRootToggle);
|
|
788
703
|
}
|
|
789
704
|
async clickAllowInAreasForBlock() {
|
|
790
|
-
await
|
|
791
|
-
await this.allowInAreasToggle.click();
|
|
705
|
+
await this.click(this.allowInAreasToggle);
|
|
792
706
|
}
|
|
793
707
|
async updateBlockOverlaySize(size) {
|
|
794
|
-
await
|
|
795
|
-
await this.overlaySizeOption.selectOption(size);
|
|
708
|
+
await this.selectByValue(this.overlaySizeOption, size);
|
|
796
709
|
}
|
|
797
710
|
async addBlockContentModel(elementName) {
|
|
798
|
-
await
|
|
799
|
-
await this.chooseContentModelBtn.click();
|
|
711
|
+
await this.click(this.chooseContentModelBtn);
|
|
800
712
|
await this.clickButtonWithName(elementName);
|
|
801
713
|
await this.clickChooseButton();
|
|
802
714
|
}
|
|
803
715
|
async addBlockSettingsModel(elementName) {
|
|
804
|
-
await
|
|
805
|
-
await this.chooseSettingsModelBtn.click();
|
|
716
|
+
await this.click(this.chooseSettingsModelBtn, { timeout: ConstantHelper_1.ConstantHelper.timeout.long });
|
|
806
717
|
await this.clickModalMenuItemWithName(elementName);
|
|
807
718
|
await this.clickChooseModalButton();
|
|
808
719
|
}
|
|
809
720
|
async removeBlockContentModel() {
|
|
810
|
-
await
|
|
811
|
-
await this.contentModelNode.hover();
|
|
812
|
-
await (0, test_1.expect)(this.removeExactContentModelNodeBtn).toBeVisible();
|
|
813
|
-
await this.removeExactContentModelNodeBtn.click();
|
|
721
|
+
await this.hoverAndClick(this.contentModelNode, this.removeExactContentModelNodeBtn);
|
|
814
722
|
}
|
|
815
723
|
async removeBlockSettingsModel() {
|
|
816
|
-
await
|
|
817
|
-
await this.settingsModelNode.hover();
|
|
818
|
-
await (0, test_1.expect)(this.removeExactSettingsModelNodeBtn).toBeVisible();
|
|
819
|
-
await this.removeExactSettingsModelNodeBtn.click();
|
|
724
|
+
await this.hoverAndClick(this.settingsModelNode, this.removeExactSettingsModelNodeBtn);
|
|
820
725
|
}
|
|
821
726
|
async openBlockContentModel() {
|
|
822
|
-
await
|
|
823
|
-
await this.contentModelNode.hover();
|
|
824
|
-
await (0, test_1.expect)(this.openBtn).toBeVisible();
|
|
825
|
-
await this.openBtn.click();
|
|
727
|
+
await this.hoverAndClick(this.contentModelNode, this.openBtn);
|
|
826
728
|
}
|
|
827
729
|
async openBlockSettingsModel() {
|
|
828
|
-
await
|
|
829
|
-
await this.settingsModelNode.hover();
|
|
830
|
-
await (0, test_1.expect)(this.openBtn).toBeVisible();
|
|
831
|
-
await this.openBtn.click();
|
|
730
|
+
await this.hoverAndClick(this.settingsModelNode, this.openBtn);
|
|
832
731
|
}
|
|
833
732
|
async isElementWorkspaceOpenInBlock(elementTypeName) {
|
|
834
733
|
return await (0, test_1.expect)(this.documentTypeWorkspace.filter({ hasText: elementTypeName })).toBeVisible();
|
|
835
734
|
}
|
|
836
735
|
async selectBlockBackgroundColor(color) {
|
|
837
|
-
await
|
|
838
|
-
await this.
|
|
839
|
-
await this.backgroundColorTxt.clear();
|
|
840
|
-
await this.backgroundColorTxt.fill(color);
|
|
736
|
+
await this.click(this.backgroundColorBtn);
|
|
737
|
+
await this.enterText(this.backgroundColorTxt, color);
|
|
841
738
|
}
|
|
842
739
|
async selectBlockIconColor(color) {
|
|
843
|
-
await
|
|
844
|
-
await this.
|
|
845
|
-
await this.iconColorTxt.clear();
|
|
846
|
-
await this.iconColorTxt.fill(color);
|
|
740
|
+
await this.click(this.iconColorBtn);
|
|
741
|
+
await this.enterText(this.iconColorTxt, color);
|
|
847
742
|
}
|
|
848
743
|
async clickExpandChildItemsForMediaButton() {
|
|
849
|
-
await
|
|
850
|
-
await this.expandChildItemsForMediaBtn.click();
|
|
744
|
+
await this.click(this.expandChildItemsForMediaBtn);
|
|
851
745
|
}
|
|
852
746
|
async clickRemoveCustomStylesheetWithName(name) {
|
|
853
|
-
await
|
|
854
|
-
await this.
|
|
855
|
-
await (0, test_1.expect)(this.stylesheetRemoveBtn).toBeVisible();
|
|
856
|
-
await this.stylesheetRemoveBtn.click();
|
|
747
|
+
await this.click(this.customStylesheetLabel.locator(`[name="${name}"]`));
|
|
748
|
+
await this.click(this.stylesheetRemoveBtn);
|
|
857
749
|
await this.clickConfirmRemoveButton();
|
|
858
750
|
}
|
|
859
751
|
async clickBlockGridHideContentEditorButton() {
|
|
860
|
-
await
|
|
861
|
-
await this.hideContentEditorBlockGridBtn.click();
|
|
752
|
+
await this.click(this.hideContentEditorBlockGridBtn);
|
|
862
753
|
}
|
|
863
754
|
async chooseBlockCustomStylesheetWithName(name) {
|
|
864
|
-
await
|
|
865
|
-
await this.chooseCustomStylesheetBtn.click();
|
|
755
|
+
await this.click(this.chooseCustomStylesheetBtn);
|
|
866
756
|
await this.openCaretButtonForName('wwwroot');
|
|
867
757
|
await this.openCaretButtonForName('css');
|
|
868
758
|
await this.clickLabelWithName(name, true);
|
|
@@ -870,8 +760,7 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
870
760
|
}
|
|
871
761
|
async chooseBlockThumbnailWithPath(mediaPath) {
|
|
872
762
|
const mediaItems = mediaPath.split('/media/')[1].split('/');
|
|
873
|
-
await
|
|
874
|
-
await this.chooseThumbnailAlias.click();
|
|
763
|
+
await this.click(this.chooseThumbnailAlias);
|
|
875
764
|
await this.openCaretButtonForName('wwwroot', true);
|
|
876
765
|
await this.clickExpandChildItemsForMediaButton();
|
|
877
766
|
for (let i = 0; i < mediaItems.length; i++) {
|
|
@@ -879,27 +768,22 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
879
768
|
await this.clickLabelWithName(mediaItems[i], true);
|
|
880
769
|
}
|
|
881
770
|
else {
|
|
882
|
-
await this.sidebarModal.locator(
|
|
771
|
+
await this.click(this.sidebarModal.locator(`uui-menu-item[label="${mediaItems[i]}"] #caret-button`));
|
|
883
772
|
}
|
|
884
773
|
}
|
|
885
774
|
await this.clickChooseModalButton();
|
|
886
775
|
}
|
|
887
776
|
async clickBlockListHideContentEditorButton() {
|
|
888
|
-
await
|
|
889
|
-
await this.hideContentEditorBlockListBtn.click();
|
|
777
|
+
await this.click(this.hideContentEditorBlockListBtn);
|
|
890
778
|
}
|
|
891
779
|
async enterEditorWidth(value) {
|
|
892
|
-
await
|
|
893
|
-
await this.editorWidthTxt.clear();
|
|
894
|
-
await this.editorWidthTxt.fill(value);
|
|
780
|
+
await this.enterText(this.editorWidthTxt, value);
|
|
895
781
|
}
|
|
896
782
|
async enterCreateButtonLabel(value) {
|
|
897
|
-
await
|
|
898
|
-
await this.createButtonLabelTxt.clear();
|
|
899
|
-
await this.createButtonLabelTxt.fill(value);
|
|
783
|
+
await this.enterText(this.createButtonLabelTxt, value);
|
|
900
784
|
}
|
|
901
785
|
async enterGridColumns(value) {
|
|
902
|
-
await
|
|
786
|
+
await this.waitForVisible(this.gridColumnsTxt);
|
|
903
787
|
await this.gridColumnsTxt.clear();
|
|
904
788
|
if (value === undefined) {
|
|
905
789
|
return;
|
|
@@ -907,21 +791,18 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
907
791
|
await this.gridColumnsTxt.fill(value.toString());
|
|
908
792
|
}
|
|
909
793
|
async clickShowResizeOptions() {
|
|
910
|
-
await
|
|
911
|
-
await this.showResizeOptionsBtn.click();
|
|
794
|
+
await this.click(this.showResizeOptionsBtn);
|
|
912
795
|
}
|
|
913
796
|
async clickAvailableColumnSpans(columnSpans) {
|
|
914
797
|
for (let index in columnSpans) {
|
|
915
|
-
await
|
|
916
|
-
await this.columnSpanOptions.getByLabel(columnSpans[index].toString(), { exact: true }).click();
|
|
798
|
+
await this.click(this.columnSpanOptions.getByLabel(columnSpans[index].toString(), { exact: true }));
|
|
917
799
|
}
|
|
918
800
|
}
|
|
919
801
|
async goToBlockAreasTab() {
|
|
920
|
-
await
|
|
921
|
-
await this.areasTabBtn.click();
|
|
802
|
+
await this.click(this.areasTabBtn);
|
|
922
803
|
}
|
|
923
804
|
async enterMinRowSpan(value) {
|
|
924
|
-
await
|
|
805
|
+
await this.waitForVisible(this.availableRowSpansLowValueTxt);
|
|
925
806
|
await this.availableRowSpansLowValueTxt.clear();
|
|
926
807
|
if (value === undefined) {
|
|
927
808
|
return;
|
|
@@ -929,7 +810,7 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
929
810
|
await this.availableRowSpansLowValueTxt.fill(value.toString());
|
|
930
811
|
}
|
|
931
812
|
async enterMaxRowSpan(value) {
|
|
932
|
-
await
|
|
813
|
+
await this.waitForVisible(this.availableRowSpansHighValueTxt);
|
|
933
814
|
await this.availableRowSpansHighValueTxt.clear();
|
|
934
815
|
if (value === undefined) {
|
|
935
816
|
return;
|
|
@@ -937,7 +818,7 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
937
818
|
await this.availableRowSpansHighValueTxt.fill(value.toString());
|
|
938
819
|
}
|
|
939
820
|
async enterGridColumnsForArea(value) {
|
|
940
|
-
await
|
|
821
|
+
await this.waitForVisible(this.areaGridColumnsTxt);
|
|
941
822
|
await this.areaGridColumnsTxt.clear();
|
|
942
823
|
if (value === undefined) {
|
|
943
824
|
return;
|
|
@@ -945,32 +826,28 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
945
826
|
await this.areaGridColumnsTxt.fill(value.toString());
|
|
946
827
|
}
|
|
947
828
|
async addAreaButton() {
|
|
948
|
-
await
|
|
949
|
-
await this.addAreaBtn.click();
|
|
829
|
+
await this.click(this.addAreaBtn);
|
|
950
830
|
}
|
|
951
831
|
async goToAreaByAlias(alias) {
|
|
952
832
|
const editAreaWithAliasLocator = this.blockAreaConfig.filter({ hasText: alias }).getByLabel('edit');
|
|
953
|
-
|
|
954
|
-
await
|
|
833
|
+
// Force click is needed
|
|
834
|
+
await this.click(editAreaWithAliasLocator, { force: true });
|
|
955
835
|
}
|
|
956
836
|
async clickRemoveAreaByAlias(alias) {
|
|
957
837
|
const removeAreaWithAliasLocator = this.blockAreaConfig.filter({ hasText: alias }).getByLabel('delete');
|
|
958
|
-
|
|
959
|
-
await
|
|
838
|
+
// Force click is needed
|
|
839
|
+
await this.click(removeAreaWithAliasLocator, { force: true });
|
|
960
840
|
await this.clickConfirmToDeleteButton();
|
|
961
841
|
}
|
|
962
842
|
async enterAreaAlias(alias) {
|
|
963
|
-
await
|
|
964
|
-
await this.aliasAliasTxt.clear();
|
|
965
|
-
await this.aliasAliasTxt.fill(alias);
|
|
843
|
+
await this.enterText(this.aliasAliasTxt, alias);
|
|
966
844
|
}
|
|
967
845
|
async clickAreaSubmitButton() {
|
|
968
|
-
await
|
|
969
|
-
await this.
|
|
970
|
-
await this.page.waitForTimeout(500);
|
|
846
|
+
await this.click(this.blockGridAreaWorkspaceSubmitBtn);
|
|
847
|
+
await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.short);
|
|
971
848
|
}
|
|
972
849
|
async enterCreateButtonLabelInArea(value) {
|
|
973
|
-
await
|
|
850
|
+
await this.waitForVisible(this.createLabelTxt.nth(1));
|
|
974
851
|
await this.createLabelTxt.nth(1).clear();
|
|
975
852
|
if (value === undefined) {
|
|
976
853
|
return;
|
|
@@ -978,7 +855,7 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
978
855
|
await this.createLabelTxt.nth(1).fill(value);
|
|
979
856
|
}
|
|
980
857
|
async enterMinAllowedInArea(value) {
|
|
981
|
-
await
|
|
858
|
+
await this.waitForVisible(this.minAllowedTxt);
|
|
982
859
|
await this.minAllowedTxt.clear();
|
|
983
860
|
if (value === undefined) {
|
|
984
861
|
return;
|
|
@@ -986,7 +863,7 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
986
863
|
await this.minAllowedTxt.fill(value.toString());
|
|
987
864
|
}
|
|
988
865
|
async enterMaxAllowedInArea(value) {
|
|
989
|
-
await
|
|
866
|
+
await this.waitForVisible(this.maxAllowedTxt);
|
|
990
867
|
await this.maxAllowedTxt.clear();
|
|
991
868
|
if (value === undefined) {
|
|
992
869
|
return;
|
|
@@ -994,12 +871,10 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
994
871
|
await this.maxAllowedTxt.fill(value.toString());
|
|
995
872
|
}
|
|
996
873
|
async clickAddSpecifiedAllowanceButton() {
|
|
997
|
-
await
|
|
998
|
-
await this.addSpecifiedAllowanceBtn.click();
|
|
874
|
+
await this.click(this.addSpecifiedAllowanceBtn);
|
|
999
875
|
}
|
|
1000
876
|
async goToBlockAdvancedTab() {
|
|
1001
|
-
await
|
|
1002
|
-
await this.advancedTabBtn.click();
|
|
877
|
+
await this.click(this.advancedTabBtn);
|
|
1003
878
|
}
|
|
1004
879
|
async getLinkWithName(name) {
|
|
1005
880
|
await (0, test_1.expect)(this.page.getByRole('link', { name: name })).toBeVisible();
|
|
@@ -1011,55 +886,46 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
1011
886
|
}
|
|
1012
887
|
async clickRemoveStylesheetButton(stylesheetName) {
|
|
1013
888
|
const removeButton = this.entityItem.filter({ hasText: stylesheetName }).getByLabel('Remove');
|
|
1014
|
-
await
|
|
1015
|
-
await removeButton.click();
|
|
889
|
+
await this.click(removeButton);
|
|
1016
890
|
}
|
|
1017
891
|
// TipTap
|
|
1018
892
|
async deleteToolbarGroup(groupIndex, rowIndex = 0) {
|
|
1019
893
|
const groupButton = this.tiptapToolbarConfiguration.locator('.row').nth(rowIndex).locator('.group').nth(groupIndex);
|
|
1020
|
-
await
|
|
1021
|
-
await groupButton.hover();
|
|
894
|
+
await this.hover(groupButton);
|
|
1022
895
|
const actionsInGroup = groupButton.locator('.items').locator('uui-button');
|
|
1023
896
|
const actionsCount = await actionsInGroup.count();
|
|
1024
897
|
for (let i = 0; i < actionsCount; i++) {
|
|
1025
|
-
await actionsInGroup.first()
|
|
898
|
+
await this.click(actionsInGroup.first());
|
|
1026
899
|
}
|
|
1027
|
-
await groupButton.locator('[label="Remove group"]')
|
|
900
|
+
await this.click(groupButton.locator('[label="Remove group"]'));
|
|
1028
901
|
}
|
|
1029
902
|
async deleteToolbarRow(rowIndex) {
|
|
1030
903
|
const rowButton = this.tiptapToolbarConfiguration.locator('.row').nth(rowIndex);
|
|
1031
|
-
await (
|
|
1032
|
-
await rowButton.hover();
|
|
1033
|
-
await rowButton.locator('[label="Remove row"]').click();
|
|
904
|
+
await this.hoverAndClick(rowButton, rowButton.locator('[label="Remove row"]'));
|
|
1034
905
|
}
|
|
1035
906
|
async clickAddRowToolbarButton() {
|
|
1036
|
-
await
|
|
1037
|
-
await this.addRowToolbarBtn.click();
|
|
907
|
+
await this.click(this.addRowToolbarBtn);
|
|
1038
908
|
}
|
|
1039
909
|
async clickAddGroupToolbarButton() {
|
|
1040
|
-
await
|
|
1041
|
-
await this.addGroupToolbarBtn.click();
|
|
910
|
+
await this.click(this.addGroupToolbarBtn);
|
|
1042
911
|
}
|
|
1043
912
|
async clickExtensionItemWithName(name) {
|
|
1044
|
-
await
|
|
1045
|
-
await this.tiptapExtensionsConfiguration.locator('uui-checkbox[label="' + name + '"]').click();
|
|
913
|
+
await this.click(this.tiptapExtensionsConfiguration.locator(`uui-checkbox[label="${name}"]`));
|
|
1046
914
|
}
|
|
1047
915
|
async doesPropertyEditorHaveUiAlias(uiAlias) {
|
|
1048
|
-
await
|
|
916
|
+
await this.hasAttribute(this.propertyEditor, 'alias', uiAlias);
|
|
1049
917
|
}
|
|
1050
918
|
async doesPropertyEditorHaveName(name) {
|
|
1051
|
-
await
|
|
919
|
+
await this.hasAttribute(this.propertyEditor, 'name', name);
|
|
1052
920
|
}
|
|
1053
921
|
async doesPropertyEditorHaveAlias(alias) {
|
|
1054
|
-
await
|
|
922
|
+
await this.hasAttribute(this.propertyEditor, 'property-editor-schema-alias', alias);
|
|
1055
923
|
}
|
|
1056
924
|
async clickDataTypeButton() {
|
|
1057
|
-
await
|
|
1058
|
-
await this.dataTypeBtn.click();
|
|
925
|
+
await this.click(this.dataTypeBtn);
|
|
1059
926
|
}
|
|
1060
927
|
async clickDataTypesMenu() {
|
|
1061
|
-
await
|
|
1062
|
-
await this.dataTypesMenu.click();
|
|
928
|
+
await this.click(this.dataTypesMenu);
|
|
1063
929
|
}
|
|
1064
930
|
async doesSettingHaveValue(settings) {
|
|
1065
931
|
for (let index = 0; index < Object.keys(settings).length; index++) {
|
|
@@ -1070,42 +936,37 @@ class DataTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
1070
936
|
}
|
|
1071
937
|
}
|
|
1072
938
|
async doesSettingItemsHaveCount(settings) {
|
|
1073
|
-
await
|
|
939
|
+
await this.hasCount(this.propertyEditorConfigItems, Object.keys(settings).length);
|
|
1074
940
|
}
|
|
1075
941
|
async doesSettingsContainText(text) {
|
|
1076
|
-
await
|
|
942
|
+
await this.containsText(this.propertyEditorConfig, text);
|
|
1077
943
|
}
|
|
1078
944
|
async clickStatusbarItemInToolboxWithName(name) {
|
|
1079
945
|
const statusbarItemLocator = this.tiptapStatusbarConfiguration.locator('#toolbox uui-button').filter({ hasText: name });
|
|
1080
|
-
await
|
|
1081
|
-
await statusbarItemLocator.click();
|
|
946
|
+
await this.click(statusbarItemLocator);
|
|
1082
947
|
}
|
|
1083
948
|
async clickStatusbarItemWithName(name) {
|
|
1084
949
|
const statusbarItemLocator = this.tiptapStatusbarConfiguration.locator('#statusbar uui-button').filter({ hasText: name });
|
|
1085
|
-
await
|
|
1086
|
-
await statusbarItemLocator.click();
|
|
950
|
+
await this.click(statusbarItemLocator);
|
|
1087
951
|
}
|
|
1088
952
|
async isExtensionItemChecked(itemName, isChecked = true) {
|
|
1089
|
-
await (0, test_1.expect)(this.tiptapExtensionsConfiguration.locator(
|
|
953
|
+
await (0, test_1.expect)(this.tiptapExtensionsConfiguration.locator(`uui-checkbox[label="${itemName}"] input`)).toBeChecked({ checked: isChecked });
|
|
1090
954
|
}
|
|
1091
955
|
async doesBlockHaveThumbnailImage(thumbnailImageUrl) {
|
|
1092
|
-
await
|
|
956
|
+
await this.hasAttribute(this.blockThumbnailImage, 'src', thumbnailImageUrl);
|
|
1093
957
|
}
|
|
1094
958
|
async addTimeZones(timeZones) {
|
|
1095
959
|
for (let i = 0; i < timeZones.length; i++) {
|
|
1096
|
-
|
|
1097
|
-
await this.timeZoneDropDown.
|
|
1098
|
-
await this.
|
|
1099
|
-
await this.addTimeZoneBtn.click();
|
|
960
|
+
await this.click(this.timeZoneDropDown);
|
|
961
|
+
await this.click(this.timeZoneDropDown.getByText(timeZones[i]));
|
|
962
|
+
await this.click(this.addTimeZoneBtn);
|
|
1100
963
|
}
|
|
1101
964
|
}
|
|
1102
965
|
async clickChooseDataSourceButton() {
|
|
1103
|
-
await
|
|
1104
|
-
await this.dataSourceChooseBtn.click();
|
|
966
|
+
await this.click(this.dataSourceChooseBtn);
|
|
1105
967
|
}
|
|
1106
968
|
async clickChooseThumbnailButton() {
|
|
1107
|
-
await
|
|
1108
|
-
await this.chooseThumbnailAlias.click();
|
|
969
|
+
await this.click(this.chooseThumbnailAlias);
|
|
1109
970
|
}
|
|
1110
971
|
}
|
|
1111
972
|
exports.DataTypeUiHelper = DataTypeUiHelper;
|