@alfresco/aca-playwright-shared 7.3.0-19871149028 → 7.3.0-20034002852

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.
@@ -2438,6 +2438,10 @@ var ActionType;
2438
2438
  ActionType["TransformAndCopyContent"] = "Transform and copy content";
2439
2439
  ActionType["TransformAndCopyImage"] = "Transform and copy image";
2440
2440
  })(ActionType || (ActionType = {}));
2441
+ var MimeType;
2442
+ (function (MimeType) {
2443
+ MimeType["AdobePDFDocument"] = "Adobe PDF Document [application/pdf]";
2444
+ })(MimeType || (MimeType = {}));
2441
2445
  class ActionsDropdownComponent extends BaseComponent {
2442
2446
  static rootElement = 'aca-edit-rule-dialog aca-rule-action-list';
2443
2447
  getOptionLocator = (optionName) => this.page.locator('.mat-mdc-select-panel .mdc-list-item__primary-text', { hasText: optionName }).first();
@@ -2454,6 +2458,9 @@ class ActionsDropdownComponent extends BaseComponent {
2454
2458
  actionSimpleWorkflowLabelApproveLocator = `[data-automation-id="card-boolean-label-approve-move"]`;
2455
2459
  actionSimpleWorkflowSRejectStepLocator = '[data-automation-id="header-reject-step"] input';
2456
2460
  actionSimpleWorkflowRejectFolderLocator = `[data-automation-id="header-reject-folder"] input`;
2461
+ mimeTypeDropdownLocator = this.getChild('[data-automation-class="select-box"][aria-label="Mimetype *"]');
2462
+ actionTransformAndCopyContentDestinationFolderLocator = '[data-automation-id="card-textitem-value-destination-folder"]';
2463
+ contentNodeSelectorSearchInput = '[data-automation-id="content-node-selector-search-input"]';
2457
2464
  constructor(page) {
2458
2465
  super(page, ActionsDropdownComponent.rootElement);
2459
2466
  }
@@ -2491,6 +2498,59 @@ class ActionsDropdownComponent extends BaseComponent {
2491
2498
  await this.ruleActionLocator.nth(index).locator(this.actionSimpleWorkflowRejectFolderLocator).click();
2492
2499
  await this.page.locator(this.actionSimpleWorkflowActionChoiceLocator).click();
2493
2500
  }
2501
+ /**
2502
+ * Selects a MIME type from the dropdown for content transformation actions.
2503
+ * This method is typically used when configuring folder rules with transform actions
2504
+ * (e.g., Transform and Copy Content) to specify the target format for file conversion.
2505
+ *
2506
+ * @param mimeType - The MIME type to select (e.g., MimeType.AdobePDFDocument for PDF conversion)
2507
+ * @param index - The zero-based index of the action dropdown (use 0 for the first action, 1 for the second, etc.)
2508
+ *
2509
+ * @example
2510
+ * ```typescript
2511
+ * // Select PDF as the target format for the first transform action
2512
+ * await actionsDropdown.selectMimeType(MimeType.AdobePDFDocument, 0);
2513
+ * ```
2514
+ */
2515
+ async selectMimeType(mimeType, index) {
2516
+ await this.mimeTypeDropdownLocator.nth(index).hover({ timeout: timeouts.short });
2517
+ await this.mimeTypeDropdownLocator.nth(index).click();
2518
+ const option = this.getOptionLocator(mimeType);
2519
+ await option.click();
2520
+ }
2521
+ /**
2522
+ * Selects a destination folder for the Transform and Copy Content action.
2523
+ * This method opens the folder picker dialog, searches for a folder by name,
2524
+ * and selects it as the destination where transformed files will be copied.
2525
+ *
2526
+ * The method performs the following steps:
2527
+ * 1. Clicks the destination folder field to open the content node selector dialog
2528
+ * 2. Fills the search input with the provided search term
2529
+ * 3. Waits for search results to load
2530
+ * 4. Clicks on the first matching folder from the results
2531
+ * 5. Confirms the selection by clicking the Choose button
2532
+ *
2533
+ * @param index - The zero-based index of the action dropdown (use 0 for the first action, 1 for the second, etc.)
2534
+ * @param searchTerm - The name or partial name of the destination folder to search for (e.g., 'TO_PDF')
2535
+ *
2536
+ * @example
2537
+ * ```typescript
2538
+ * // Select 'TO_PDF' folder as the destination for transformed files
2539
+ * await actionsDropdown.selectDestinationFolderTransformAndCopyContent(0, 'TO_PDF');
2540
+ * ```
2541
+ */
2542
+ async selectDestinationFolderTransformAndCopyContent(index, searchTerm) {
2543
+ // Click on the destination folder input field to open the folder picker dialog
2544
+ await this.ruleActionLocator.nth(index).locator(this.actionTransformAndCopyContentDestinationFolderLocator).click();
2545
+ // Locate and fill the search input field within the content node selector
2546
+ const searchInput = this.page.locator(this.contentNodeSelectorSearchInput);
2547
+ await searchInput.fill(searchTerm);
2548
+ // Click on the folder from the search results (first match if multiple)
2549
+ const folderRow = this.page.locator('.adf-datatable-body .adf-name-location-cell-name', { hasText: searchTerm }).first();
2550
+ await folderRow.click();
2551
+ // Click the Choose button to confirm selection
2552
+ await this.page.locator(this.actionSimpleWorkflowActionChoiceLocator).click();
2553
+ }
2494
2554
  }
2495
2555
 
2496
2556
  /*!
@@ -7236,5 +7296,5 @@ const TEST_FILES = {
7236
7296
  * Generated bundle index. Do not edit.
7237
7297
  */
7238
7298
 
7239
- export { APP_ROUTES, AcaHeader, ActionType, ActionTypes, ActionsDropdownComponent, AdfConfirmDialogComponent, AdfDeleteTrashComponent, AdfFolderDialogComponent, AdfInfoDrawerComponent, AdfLibraryDialogComponent, ApiClientFactory, BaseComponent, BasePage, Breadcrumb, CategoriesApi, Comparator, ConditionComponent, ConditionsTypes, ContentNodeSelectorDialog, CreateFromTemplateDialogComponent, DataTableComponent, DateTimePicker, EditDialog, ErrorComponent, FavoritesLibrariesPage, FavoritesPage, FavoritesPageApi, Field, FileActionsApi, FolderInformationDialogComponent, GenericLogger, LinkRulesDialog, LogLevelsEnum, LoginPage, ManageRules, ManageRulesDialogComponent, ManageVersionsDialog, MatMenuComponent, MyLibrariesPage, NodesApi, NodesPage, PaginationActionsType, PaginationComponent, PasswordOverlayDialogComponent, Person, PersonalFilesPage, QueriesApi, RecentFilesPage, RulesApi, SIDEBAR_LABELS, SITE_ROLES, SITE_VISIBILITY, SearchFilters, SearchFiltersCategories, SearchFiltersDate, SearchFiltersLocation, SearchFiltersLogic, SearchFiltersProperties, SearchFiltersTags, SearchInputComponent, SearchOverlayComponent, SearchPage, SearchPageApi, SearchSortingPicker, ShareDialogComponent, SharedLinksApi, SharedPage, SidenavComponent, SitesApi, SnackBarComponent, SpinnerComponent, TEST_FILES, TagsApi, ToolbarComponent, TrashPage, TrashcanApi, UploadDialog, UploadNewVersionDialog, UserModel, Utils, ViewerComponent, ViewerOverlayDialogComponent, collaboratorDocToolbarMore, collaboratorEditRowToolbarMore, collaboratorLockCurrentUserToolbarMore, collaboratorLockOtherUserSearchToolbarMore, collaboratorLockOtherUserToolbarMore, collaboratorSharedToolbarPrimary, collaboratorToolbarPrimary, errorColor, errorStrings, favoritesCollaboratorToolbarMore, file, fileDocx, fileDocxFav, fileDocxShared, fileDocxSharedFav, fileFav, fileFavLocked, fileGranularPermission, fileLocked, fileLockedByUser, fileShared, fileSharedFav, fileSharedFavLocked, fileSharedLocked, flattenNodeContentTree, folder, folderFav, folderFav2, folderFavFile, folderFile, getExcludedTestsRegExpArray, getGlobalConfig, getUserState, infoColor, libraryErrors, logColor, logLevels, multipleSel, multipleSelAllFav, multipleSelFile, paths, random$1 as random, test, testEmailDomain, timeouts, users, waitForApi, warnColor };
7299
+ export { APP_ROUTES, AcaHeader, ActionType, ActionTypes, ActionsDropdownComponent, AdfConfirmDialogComponent, AdfDeleteTrashComponent, AdfFolderDialogComponent, AdfInfoDrawerComponent, AdfLibraryDialogComponent, ApiClientFactory, BaseComponent, BasePage, Breadcrumb, CategoriesApi, Comparator, ConditionComponent, ConditionsTypes, ContentNodeSelectorDialog, CreateFromTemplateDialogComponent, DataTableComponent, DateTimePicker, EditDialog, ErrorComponent, FavoritesLibrariesPage, FavoritesPage, FavoritesPageApi, Field, FileActionsApi, FolderInformationDialogComponent, GenericLogger, LinkRulesDialog, LogLevelsEnum, LoginPage, ManageRules, ManageRulesDialogComponent, ManageVersionsDialog, MatMenuComponent, MimeType, MyLibrariesPage, NodesApi, NodesPage, PaginationActionsType, PaginationComponent, PasswordOverlayDialogComponent, Person, PersonalFilesPage, QueriesApi, RecentFilesPage, RulesApi, SIDEBAR_LABELS, SITE_ROLES, SITE_VISIBILITY, SearchFilters, SearchFiltersCategories, SearchFiltersDate, SearchFiltersLocation, SearchFiltersLogic, SearchFiltersProperties, SearchFiltersTags, SearchInputComponent, SearchOverlayComponent, SearchPage, SearchPageApi, SearchSortingPicker, ShareDialogComponent, SharedLinksApi, SharedPage, SidenavComponent, SitesApi, SnackBarComponent, SpinnerComponent, TEST_FILES, TagsApi, ToolbarComponent, TrashPage, TrashcanApi, UploadDialog, UploadNewVersionDialog, UserModel, Utils, ViewerComponent, ViewerOverlayDialogComponent, collaboratorDocToolbarMore, collaboratorEditRowToolbarMore, collaboratorLockCurrentUserToolbarMore, collaboratorLockOtherUserSearchToolbarMore, collaboratorLockOtherUserToolbarMore, collaboratorSharedToolbarPrimary, collaboratorToolbarPrimary, errorColor, errorStrings, favoritesCollaboratorToolbarMore, file, fileDocx, fileDocxFav, fileDocxShared, fileDocxSharedFav, fileFav, fileFavLocked, fileGranularPermission, fileLocked, fileLockedByUser, fileShared, fileSharedFav, fileSharedFavLocked, fileSharedLocked, flattenNodeContentTree, folder, folderFav, folderFav2, folderFavFile, folderFile, getExcludedTestsRegExpArray, getGlobalConfig, getUserState, infoColor, libraryErrors, logColor, logLevels, multipleSel, multipleSelAllFav, multipleSelFile, paths, random$1 as random, test, testEmailDomain, timeouts, users, waitForApi, warnColor };
7240
7300
  //# sourceMappingURL=alfresco-aca-playwright-shared.mjs.map