diff --git a/projects/aca-playwright-shared/src/page-objects/components/aca-header.component.ts b/projects/aca-playwright-shared/src/page-objects/components/aca-header.component.ts index fa3e711a6..fccd4eb35 100644 --- a/projects/aca-playwright-shared/src/page-objects/components/aca-header.component.ts +++ b/projects/aca-playwright-shared/src/page-objects/components/aca-header.component.ts @@ -41,7 +41,6 @@ export class AcaHeader extends BaseComponent { public sharedDownloadButton = this.getChild('button[id="app.viewer.shared.download"]'); public uploadButton = this.getChild('button[id="app.toolbar.upload"]'); public uploadFileButton = this.page.locator('button[id="app.create.uploadFile"]'); - public uploadInput = this.page.locator('input[id="app-upload-files"]'); public uploadNewVersionButton = this.page.locator('#app-upload-file-version'); public permanentlyDeleteButton = this.getChild('button[id="app.toolbar.purgeDeletedNodes"]'); public restoreButton = this.getChild('button[id="app.toolbar.restoreDeletedNodes"]'); diff --git a/projects/aca-playwright-shared/src/page-objects/components/base.component.ts b/projects/aca-playwright-shared/src/page-objects/components/base.component.ts index 47497387c..f7a4581b8 100644 --- a/projects/aca-playwright-shared/src/page-objects/components/base.component.ts +++ b/projects/aca-playwright-shared/src/page-objects/components/base.component.ts @@ -28,7 +28,6 @@ import { timeouts } from '../../utils'; export abstract class BaseComponent extends PlaywrightBase { private readonly rootElement: string; - private overlayElement = this.page.locator('.cdk-overlay-backdrop-showing'); private progressBar = this.page.locator('[role="progressbar"]'); protected constructor(page: Page, rootElement: string) { @@ -48,13 +47,6 @@ export abstract class BaseComponent extends PlaywrightBase { return this.page.locator(`${this.rootElement} ${cssLocator}`, options); } - async closeAdditionalOverlayElementIfVisible(): Promise { - if (await this.overlayElement.isVisible()) { - await this.page.keyboard.press('Escape'); - await this.overlayElement.waitFor({ state: 'detached', timeout: timeouts.medium }); - } - } - async spinnerWaitForReload(): Promise { try { await this.page.locator('[role="progressbar"]').waitFor({ state: 'attached', timeout: timeouts.medium }); diff --git a/projects/aca-playwright-shared/src/page-objects/components/dataTable/data-table.component.ts b/projects/aca-playwright-shared/src/page-objects/components/dataTable/data-table.component.ts index 995b32b90..2669b3528 100644 --- a/projects/aca-playwright-shared/src/page-objects/components/dataTable/data-table.component.ts +++ b/projects/aca-playwright-shared/src/page-objects/components/dataTable/data-table.component.ts @@ -37,10 +37,7 @@ export class DataTableComponent extends BaseComponent { } public pagination = new PaginationComponent(this.page); - body = this.getChild('.adf-datatable-body'); getEmptyFolderLocator = this.getChild('.adf-empty-folder'); - getEmptyContentTitleLocator = this.getChild('adf-empty-content .adf-empty-content__title'); - getEmptyContentSubTitleLocator = this.getChild('adf-empty-content .adf-empty-content__subtitle'); getSelectedRow = this.getChild('.adf-datatable-row.adf-is-selected'); sortedColumnHeader = this.getChild(`.adf-datatable__header--sorted-asc .adf-datatable-cell-header-content .adf-datatable-cell-value, .adf-datatable__header--sorted-desc .adf-datatable-cell-header-content .adf-datatable-cell-value`); @@ -72,15 +69,6 @@ export class DataTableComponent extends BaseComponent { */ getRowByName = (name: string | number): Locator => this.getChild(`adf-datatable-row`, { hasText: name.toString() }); - /** - * Method used in cases where we want to check that some record is visible in the datatable. - * But we want to check it by column header title and value of this column. - * - * @returns reference to cell element which contains text. - */ - getRowByColumnTitleAndItsCellValue = (columnTitle: string, cellValue: string | number): Locator => - this.page.locator(`//div[contains(@title, '${columnTitle}')]//span[contains(text(), '${cellValue}')]/ancestor::adf-datatable-row`); - /** * Method used in cases where we want to retrieve a row from the datatable based on its numerical order within the array. * @@ -96,28 +84,6 @@ export class DataTableComponent extends BaseComponent { */ getCellLinkByName = (name: string): Locator => this.getChild('.adf-cell-value span[role="link"]', { hasText: name }); - /** - * Method used in cases where we want to localize the element by [aria-label] - * - * @returns reference to cell element. - */ - getByAriaLabelTitle = (title: string): Locator => this.getChild(`[aria-label="${title}"]`); - - /** - * Method used in cases where we want to get the edit button and there is no hamburger menu - * - * @returns reference to edit button placed in row localized by the name - */ - getEditButtonByName = (name: string): Locator => this.getRowByName(name).locator('button#editButton'); - - /** - * Method used in cases where we want to get the button and there is no hamburger menu - * - * @returns reference to button placed in row localized by the name - */ - getButtonByNameForSpecificRow = (elementTitleInRow: string, buttonTitle: string): Locator => - this.getRowByName(elementTitleInRow).locator('button', { hasText: buttonTitle }); - /** * Method used in cases where you want to get some specific cell (by column name) for row which contains some name/title/etc. * @@ -132,10 +98,6 @@ export class DataTableComponent extends BaseComponent { */ getCheckboxForElement = (item: string): Locator => this.getRowByName(item).locator('[type="checkbox"]'); - getColumnHeaderByTitleLocator = (headerTitle: string): Locator => this.getChild('[role="columnheader"]', { hasText: headerTitle }); - - getSearchResultLinkByName = (name: string): Locator => this.getChild('.aca-search-results-row span[role="link"]', { hasText: name }); - getColumnValuesByName = (name: string): Locator => this.getChild(`div[title="${name}"] span`); getColumnHeaderByName = (headerTitle: string): Locator => @@ -187,11 +149,6 @@ export class DataTableComponent extends BaseComponent { return this.contextMenuActions.getButtonByText(action); } - async performActionInExpandableMenu(name: string | number, action: string): Promise { - await this.getRowByName(name).click({ button: 'right' }); - await this.contextMenuActions.getButtonByText(action).click(); - } - async goThroughPagesLookingForRowWithName(name: string | number): Promise { await this.spinnerWaitForReload(); if (await this.getRowByName(name).isVisible()) { @@ -344,11 +301,6 @@ export class DataTableComponent extends BaseComponent { return sitesInfo; } - async hasLockIcon(itemName: string): Promise { - const row = this.getRowByName(itemName); - return row.locator('img[src*="lock"]').isVisible(); - } - async getLockOwner(itemName: string): Promise { const row = this.getRowByName(itemName); return row.locator(this.lockOwner).innerText(); diff --git a/projects/aca-playwright-shared/src/page-objects/components/dataTable/mat-menu.component.ts b/projects/aca-playwright-shared/src/page-objects/components/dataTable/mat-menu.component.ts index d153fa189..1a0d6d7ef 100644 --- a/projects/aca-playwright-shared/src/page-objects/components/dataTable/mat-menu.component.ts +++ b/projects/aca-playwright-shared/src/page-objects/components/dataTable/mat-menu.component.ts @@ -32,8 +32,6 @@ export class MatMenuComponent extends BaseComponent { super(page, MatMenuComponent.rootElement); } - public getMenuItemsLocator = this.getChild('button'); - public getMenuItemTextLocator = this.getChild('[data-automation-id="menu-item-title"]'); public createFolder = this.getChild('[id="app.create.folder"]'); public createFolderFromTemplate = this.getChild('[id="app.create.folderFromTemplate"]'); public createFileFromTemplate = this.getChild('[id="app.create.fileFromTemplate"]'); diff --git a/projects/aca-playwright-shared/src/page-objects/components/dialogs/link-rules.component.ts b/projects/aca-playwright-shared/src/page-objects/components/dialogs/link-rules.component.ts index 72086cb91..f83d663e1 100755 --- a/projects/aca-playwright-shared/src/page-objects/components/dialogs/link-rules.component.ts +++ b/projects/aca-playwright-shared/src/page-objects/components/dialogs/link-rules.component.ts @@ -29,12 +29,8 @@ export class LinkRulesDialog extends BaseComponent { private static rootElement = 'aca-rule-set-picker'; private getRowByName = (name: string | number): Locator => this.getChild(`adf-datatable-row`, { hasText: name.toString() }); - cancelButton = this.getChild('[data-automation-id="content-node-selector-actions-cancel"]'); selectFolderButton = this.getChild('button', { hasText: ' Select folder ' }); - emptyLinkRules = this.getChild('.adf-empty-content__title'); getOptionLocator = (optionName: string): Locator => this.page.locator('[role=listbox] [role=option]', { hasText: optionName }).first(); - getDialogTitle = (text: string) => this.getChild('[data-automation-id="content-node-selector-title"]', { hasText: text }); - getBreadcrumb = (text: string) => this.getChild('[data-automation-id="current-folder"]', { hasText: text }); getFolderIcon = this.getChild('.adf-dropdown-breadcrumb-icon', { hasText: 'folder' }); getLibraryIcon = this.getChild('.adf-empty-content__icon', { hasText: 'library_books' }); diff --git a/projects/aca-playwright-shared/src/page-objects/components/dialogs/password-overlay-dialog.component.ts b/projects/aca-playwright-shared/src/page-objects/components/dialogs/password-overlay-dialog.component.ts index 5078c92b8..8bd7449dc 100644 --- a/projects/aca-playwright-shared/src/page-objects/components/dialogs/password-overlay-dialog.component.ts +++ b/projects/aca-playwright-shared/src/page-objects/components/dialogs/password-overlay-dialog.component.ts @@ -57,10 +57,6 @@ export class PasswordOverlayDialogComponent extends BaseComponent { return this.closeButton.isVisible(); } - async isSubmitHidden(): Promise { - return this.submitButton.isHidden(); - } - async isPasswordInputDisplayed(): Promise { return this.passwordInput.isVisible(); } diff --git a/projects/aca-playwright-shared/src/page-objects/components/dialogs/share-dialog.component.ts b/projects/aca-playwright-shared/src/page-objects/components/dialogs/share-dialog.component.ts index 8f2f9f11f..1678ad014 100644 --- a/projects/aca-playwright-shared/src/page-objects/components/dialogs/share-dialog.component.ts +++ b/projects/aca-playwright-shared/src/page-objects/components/dialogs/share-dialog.component.ts @@ -37,7 +37,6 @@ export class ShareDialogComponent extends BaseComponent { closeButton = this.getChild('[data-automation-id="adf-share-dialog-close"]'); dialogTitle = this.getChild('[data-automation-id="adf-share-dialog-title"]'); infoText = this.getChild('.adf-share-link__info').first(); - labels = '.adf-share-link__label'; shareToggle = this.getChild(`[data-automation-id='adf-share-toggle']`); url = this.getChild(`[data-automation-id='adf-share-link']`); urlAction = this.getChild('.adf-input-action'); @@ -49,8 +48,6 @@ export class ShareDialogComponent extends BaseComponent { dateTimePicker = new DateTimePicker(this.page); - getDialogLabel = () => this.getChild('label').innerText(); - async getLabels(): Promise> { return this.page.$$eval('.adf-share-link__label', (elements) => elements.map((element) => element.textContent)); } diff --git a/projects/aca-playwright-shared/src/page-objects/components/dialogs/upload-new-version-dialog.component.ts b/projects/aca-playwright-shared/src/page-objects/components/dialogs/upload-new-version-dialog.component.ts index 51834eca9..826555ecc 100755 --- a/projects/aca-playwright-shared/src/page-objects/components/dialogs/upload-new-version-dialog.component.ts +++ b/projects/aca-playwright-shared/src/page-objects/components/dialogs/upload-new-version-dialog.component.ts @@ -31,7 +31,6 @@ export class UploadNewVersionDialog extends BaseComponent { public cancelButton = this.getChild('#adf-new-version-cancel'); public uploadButton = this.getChild('[data-automation-id="adf-new-version-file-upload"]'); public majorOption = this.getChild('#adf-new-version-major'); - public minorOption = this.getChild('#adf-new-version-minor'); public description = this.getChild('#adf-new-version-text-area'); public title = this.getChild(' [data-automation-id="new-version-uploader-dialog-title"]'); diff --git a/projects/aca-playwright-shared/src/page-objects/components/dialogs/viewer-overlay-dialog.component.ts b/projects/aca-playwright-shared/src/page-objects/components/dialogs/viewer-overlay-dialog.component.ts index 08ffd0da6..74bff629d 100644 --- a/projects/aca-playwright-shared/src/page-objects/components/dialogs/viewer-overlay-dialog.component.ts +++ b/projects/aca-playwright-shared/src/page-objects/components/dialogs/viewer-overlay-dialog.component.ts @@ -29,10 +29,6 @@ import { timeouts } from '../../../utils'; export class ViewerOverlayDialogComponent extends BaseComponent { private static rootElement = '.cdk-overlay-pane'; - public closeButton = this.getChild('[data-automation-id="adf-password-dialog-close"]'); - public submitButton = this.getChild('[data-automation-id="adf-password-dialog-submit"]'); - public passwordInput = this.getChild('[data-automation-id="adf-password-dialog-input"]'); - public errorMessage = this.getChild('[data-automation-id="adf-password-dialog-error"]'); public copyDialog = this.getChild('[data-automation-id="content-node-selector-title"]'); public copyMenuButton = this.getChild('[id="app.viewer.copy"]'); public deleteMenuButton = this.getChild('[id="app.viewer.delete"]'); diff --git a/projects/aca-playwright-shared/src/page-objects/components/manageRules/manage-rules-dialog.component.ts b/projects/aca-playwright-shared/src/page-objects/components/manageRules/manage-rules-dialog.component.ts index 7fda30ade..326e1b6b0 100644 --- a/projects/aca-playwright-shared/src/page-objects/components/manageRules/manage-rules-dialog.component.ts +++ b/projects/aca-playwright-shared/src/page-objects/components/manageRules/manage-rules-dialog.component.ts @@ -38,10 +38,8 @@ export class ManageRulesDialogComponent extends BaseComponent { public comparatorDropDown = this.getChild('[data-automation-id="comparator-select"]'); public valueField = this.getChild('[data-automation-id="value-input"]'); public whenCreatedCheckbox = this.getChild('[data-automation-id="rule-trigger-checkbox-inbound"]'); - public whenUpdatedCheckbox = this.getChild('[data-automation-id="rule-trigger-checkbox-update"]'); public whenDeletedCheckbox = this.getChild('[data-automation-id="rule-trigger-checkbox-outbound"]'); public destinationFolderButton = this.getChild('[data-automation-id="card-textitem-clickable-icon-destination-folder"]'); - public ruleInBackgroundCheckbox = this.getChild('[data-automation-id="rule-option-checkbox-asynchronous"]'); public ruleSubfoldersCheckbox = this.getChild('[data-automation-id="rule-option-checkbox-inheritable"]'); public ruleDisableCheckbox = this.getChild('[data-automation-id="rule-option-checkbox-disabled"] input'); public actionsEllipsisButtons = this.getChild('[data-automation-id="rule-action-list-action-menu"]'); diff --git a/projects/aca-playwright-shared/src/page-objects/components/manageRules/manage-rules.component.ts b/projects/aca-playwright-shared/src/page-objects/components/manageRules/manage-rules.component.ts index 9ad09b34a..e433b7b1e 100644 --- a/projects/aca-playwright-shared/src/page-objects/components/manageRules/manage-rules.component.ts +++ b/projects/aca-playwright-shared/src/page-objects/components/manageRules/manage-rules.component.ts @@ -31,10 +31,8 @@ export class ManageRules extends BaseComponent { public getGroupsList = (optionName: string): Locator => this.getChild('.aca-rule-list-item__header', { hasText: optionName }); public ruleToggle = this.getChild('.aca-manage-rules__container [role="switch"]').first(); public ruleToggleFalse = this.getChild('aca-rule-list-grouping aca-rule-list-item [role="switch"][aria-checked="false"]').first(); - public ruleDetailsTitle = this.getChild('.aca-manage-rules__container__rule-details__header__title__name'); public ruleDetailsDeleteButton = this.getChild('#delete-rule-btn'); public ruleDetailsEditButton = this.getChild('#edit-rule-btn'); - public ruleDetailsWhenText = this.getChild('[data-automation-id="rule-details-triggers-component"]'); public ruleDetailsPerformActionsDiv = this.getChild('adf-card-view-selectitem [data-automation-id="select-box"]'); public rulesEmptyListTitle = this.getChild('.adf-empty-content__title'); public ruleActions = this.getChild('aca-rule-action'); diff --git a/projects/aca-playwright-shared/src/page-objects/components/pagination.component.ts b/projects/aca-playwright-shared/src/page-objects/components/pagination.component.ts index 57f70f92f..72c7e6b03 100644 --- a/projects/aca-playwright-shared/src/page-objects/components/pagination.component.ts +++ b/projects/aca-playwright-shared/src/page-objects/components/pagination.component.ts @@ -24,7 +24,6 @@ import { BaseComponent } from './base.component'; import { Locator, Page } from '@playwright/test'; -import { MatMenuComponent } from './dataTable/mat-menu.component'; import { timeouts } from '../../utils'; export enum PaginationActionsType { @@ -48,33 +47,10 @@ export class PaginationComponent extends BaseComponent { private nextButton = this.getChild('.adf-pagination__next-button'); private maxItemsButton = this.getChild('.adf-pagination__max-items + button[mat-icon-button]'); - private itemsPerPageMenu = new MatMenuComponent(this.page); - public currentPageLocator = this.getChild('.adf-pagination__current-page'); public totalPageLocator = this.getChild('.adf-pagination__total-pages'); public getArrowLocatorFor = (action: PaginationActionsType) => this.getChild(`[aria-label="${action}"]`); - async setItemsPerPage(amount: number): Promise { - await this.getArrowLocatorFor(PaginationActionsType.PageSizeSelector).click(); - await this.itemsPerPageMenu.getButtonByText(amount.toString()).click(); - await this.spinnerWaitForReload(); - } - - async navigateToPage(pageNumber: number): Promise { - await this.getArrowLocatorFor(PaginationActionsType.CurrentPageSelector).click(); - await this.itemsPerPageMenu.getButtonByText(pageNumber.toString()).click(); - await this.spinnerWaitForReload(); - } - - async spinnerWaitForReload(): Promise { - try { - await this.page.locator('[role="progressbar"]').waitFor({ state: 'attached', timeout: 2000 }); - await this.page.locator('[role="progressbar"]').waitFor({ state: 'detached', timeout: 2000 }); - } catch (e) { - this.logger.info('Spinner was not present'); - } - } - async getRange(): Promise { return this.range.innerText(); } diff --git a/projects/aca-playwright-shared/src/page-objects/components/search/search-filters.component.ts b/projects/aca-playwright-shared/src/page-objects/components/search/search-filters.component.ts index 2b0b8c569..9cfedda93 100644 --- a/projects/aca-playwright-shared/src/page-objects/components/search/search-filters.component.ts +++ b/projects/aca-playwright-shared/src/page-objects/components/search/search-filters.component.ts @@ -32,7 +32,6 @@ export class SearchFilters extends BaseComponent { super(page, SearchFilters.rootElement); } - public filtersButtons = this.getChild('adf-search-widget-chip'); public logicFilter = this.getChild('adf-search-widget-chip', { hasText: 'Logic' }); public propertiesFilter = this.getChild('adf-search-widget-chip', { hasText: 'Properties' }); public dateFilter = this.getChild('adf-search-widget-chip', { hasText: 'Date' }); @@ -40,9 +39,5 @@ export class SearchFilters extends BaseComponent { public tagsFilter = this.getChild('adf-search-widget-chip', { hasText: 'Tags' }); public categoriesFilter = this.getChild('adf-search-widget-chip', { hasText: 'Categories' }); public resetButton = this.getChild('button', { hasText: 'Reset' }); - public menuCardTitle = this.getChild('.adf-search-filter-title'); - public menuCardClose = this.getChild('.adf-search-filter-title-action'); - public menuCardClear = this.getChild('#cancel-filter-button'); - public menuCardApply = this.getChild('#apply-filter-button'); public dropdownOptions = this.page.locator(`[role="option"]`); } diff --git a/projects/aca-playwright-shared/src/page-objects/components/search/search-filters/search-filters-date.component.ts b/projects/aca-playwright-shared/src/page-objects/components/search/search-filters/search-filters-date.component.ts index ae0ea52b9..0e03ac3aa 100644 --- a/projects/aca-playwright-shared/src/page-objects/components/search/search-filters/search-filters-date.component.ts +++ b/projects/aca-playwright-shared/src/page-objects/components/search/search-filters/search-filters-date.component.ts @@ -37,17 +37,10 @@ export class SearchFiltersDate extends BaseComponent { public createdTab = this.getChild(`[role='tab']`, { hasText: 'Created' }); public modifiedTab = this.getChild(`[role='tab']`, { hasText: 'Modified' }); - public createdTabTitle = this.createdTab.locator(`div`); - public modifiedTabTitle = this.modifiedTab.locator(`div`); public anytimeButton = this.getChild(`[data-automation-id$='date-range-anytime']`); public anytimeRadioButton = this.anytimeButton.locator(`input`); - public inTheLastButton = this.getChild(`[data-automation-id$='date-range-in-last']`); - public inTheLastInput = this.getChild(`[data-automation-id$='date-range-in-last-input']`); - public inTheLastDropdown = this.getChild(`[data-automation-id$='date-range-in-last-dropdown']`); public betweenButton = this.getChild(`[data-automation-id$='date-range-between']`); public betweenRadioButton = this.betweenButton.locator(`input`); - public betweenStartDate = this.getChild(`[data-automation-id$='date-range-between-start-input']`); - public betweenEndDate = this.getChild(`[data-automation-id$='date-range-between-end-input']`); async openCreatedModifiedTab(page: SearchPage, tab: FilterTab): Promise { switch (tab) { diff --git a/projects/aca-playwright-shared/src/page-objects/components/search/search-input.component.ts b/projects/aca-playwright-shared/src/page-objects/components/search/search-input.component.ts index 7b545f33f..83c530566 100644 --- a/projects/aca-playwright-shared/src/page-objects/components/search/search-input.component.ts +++ b/projects/aca-playwright-shared/src/page-objects/components/search/search-input.component.ts @@ -28,7 +28,6 @@ import { timeouts } from '../../../utils'; export class SearchInputComponent extends BaseComponent { private static rootElement = 'aca-page-layout'; - public searchInput = this.page.locator('#app-control-input'); public searchButton = this.page.locator('.aca-search-input--search-button'); public searchCloseButton = this.page.locator('.aca-search-input--close-button'); diff --git a/projects/aca-playwright-shared/src/page-objects/components/search/search-menu-card.component.ts b/projects/aca-playwright-shared/src/page-objects/components/search/search-menu-card.component.ts index 9b0d609ff..0cd4a5f30 100644 --- a/projects/aca-playwright-shared/src/page-objects/components/search/search-menu-card.component.ts +++ b/projects/aca-playwright-shared/src/page-objects/components/search/search-menu-card.component.ts @@ -28,12 +28,10 @@ import { Page } from '@playwright/test'; export class SearchMenuCard extends BaseComponent { private static readonly rootElement = '.adf-search-filter-menu-card'; - public resetButton = this.getChild('button', { hasText: 'Reset' }); public menuCardTitle = this.getChild('.adf-search-filter-title'); public menuCardClose = this.getChild('.adf-search-filter-title-action'); public menuCardClear = this.getChild('#cancel-filter-button'); public menuCardApply = this.getChild('#apply-filter-button'); - public dropdownOptions = this.page.locator(`[role="option"]`); constructor(page: Page) { super(page, SearchMenuCard.rootElement); diff --git a/projects/aca-playwright-shared/src/page-objects/components/viewer.component.ts b/projects/aca-playwright-shared/src/page-objects/components/viewer.component.ts index c00cb0a3f..1e7419e3c 100644 --- a/projects/aca-playwright-shared/src/page-objects/components/viewer.component.ts +++ b/projects/aca-playwright-shared/src/page-objects/components/viewer.component.ts @@ -36,7 +36,6 @@ export class ViewerComponent extends BaseComponent { public pdfViewerContentPages = this.getChild('.adf-pdf-viewer__content .page'); public shareButton = this.getChild('button[id="share-action-button"]'); public downloadButton = this.getChild('button[id="app.viewer.download"]'); - public allButtons = this.getChild('button'); public unknownFormat = this.getChild(`adf-viewer-unknown-format .adf-viewer__unknown-format-view`); public viewerImage = this.viewerLocator.locator('.cropper-canvas img'); public viewerDocument = this.viewerLocator.locator('.adf-pdf-viewer__content [role="document"]');