mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACS-6693] Migration to NG15 (#3959)
* [ACS-6693] Angular 15 migration initial point
* [ACS-6693] Angular 15 - update ADF dependencies from the ng15-start branch (#3712)
* [ACS-6693] Angular 15 - adding mat core (#3715)
* Stylelint fix
* Migration - added stylePrepocessor for material selectors
* Skip unit tests from branch release until errors are fixed
* [ACS-7285] - [ACA] Angular 15 - Left sidebar + table (#3719)
* [ACS-7286] Fix topbar user info issues (#3720)
* [ACS-6693] Bump peerDependencies in ACA libs
* [ACS-7330] edit rules dialog fixes (#3723)
* [ACS-6693] Fix peer dependencies in ACA packages
* [ACS-7328] Fix searchbar display (#3729)
* [ACS-7631] Fix broken filters (#3735)
* [ACS-7331] - Angular 15 - Edit aspects modal [ACA]
* [ACS-7449] Fix broken filter labels styling (#3745)
* [ACS-7351] ng15 Manage rules fixes (#3751)
* [ACS-7351] ng15 manage rules fixes
* [ACS-7351] cr fix
* [ACS-7351] cr fix
* [ACS-7370] - [ACA] Leave library dialog misses some padding (#3749)
* [ACS-6693] Bump ADF version
* [ACS-7372] - user profile page issues (#3757)
* [ACS-7372] - [ACA] User profile page issues
* [ACS-7415] - Move file dialog (#3755)
* [ACS-7452] - Small screen notification banner [ACS-7418] About page (#3760)
* [ACS-7452] - Small screen notification banner
* [ACS-7452] - Small screen notification banner [ACS-7418] About page
* [ACS-7511] Subfont for dialogs, make darker (#3765)
* [ACS-7448] Fix wrong notifications colors (#3761)
* [ACS-7448] Fix notifications colors, move them from adf to aca (#3771)
* [ACS-7375] - Share link dialog issues (#3774)
* [ACS-7517] - Notifications box (#3775)
* [ACS-7373] ng15 permission tab fixes (#3762)
* [ACS-7368] Fix unit tests for aca-content (#3779)
* [ACS-7410] - Locked files overflow issues (#3780)
* [ACS-7528] - Notification and user icons are a bit different (#3782)
* [ACS-7529] - Columns visibility dropdown has broken styles (#3783)
* [ACS-7537] - Share dialog (#3789)
* Use latest ADF alpha
* Post rebase unit test fix
* Disable stylelint
* Calendar button fix
* [ACS-7369] ng15 migration - fix e2es (#3796)
* [ACS-7369] e2e fixes
* [ACS-7369] cr fix
* [ACS-7331] - Angular 15 - View details sidebar (#3731)
* [ACS-7542] - Upload new version dialog (#3800)
* [ACS-7575] create library dialog e2e fix (#3803)
* [ACS-7534] folder dialog e2e fixes (#3804)
* [ACS-7574] Rules dialog edit (#3801)
* [ACS-7571] Comments (#3810)
* [ACS-7555] Added blue outline to focused checkboxes (#3813)
* [ACS-7582] File upload dialog, fix button weight label globally (#3814)
* [ACS-7531] - Search page (#3816)
* [ACS-7559] Conext menus icons (#3818)
* [ACS-6693] Bump ADF
* Temporary lint disable
* [ACS-7572] link rules dialog (#3817)
* [ACS-7533] - Advanced search chips dropdowns (#3821)
* [ACS-7560] Corrected background color for info snackbar (#3824)
* [ACS-7558] - Toolbar and buttons (#3833)
* [ACS-7573] folder rules fixes (#3836)
* [ACS-7573] folder rules fixes
* [ACS-7573] cr fix
* [ACS-7561] - Permissions page (#3840)
* [ACS-7768] unify inputs and selects across the app (#3845)
* ACS-7768 Style inputs in create from template dialog
* ACS-7768 Used globally configured outline appearance for inputs
* ACS-7768 Style inputs for profile page
* ACS-7768 Style inputs for library metadata form
* ACS-7768 Style inputs for folder rules dialog
* ACS-7768 Style inputs for manage rules page
* ACS-7768 Set outline appearance for input, fix small issue
* ACS-7768 Addressed comment
* Revert "[ACS-7768] unify inputs and selects across the app (#3845)" (#3850)
This reverts commit 6a5ef73283
.
* [ACS-8043] fix js api dependencies (#3855)
* [ACS-8020] Fixed inputs for create from template dialog (#3857)
* [ACS-8027] Inputs for create rules (#3860)
* [ACS-8052] inputs for general info for libraries (#3863)
* [ACS-8052] Inputs for general info for libraries
* Fix after CR
* [ACS-8059] Inputs for view rules (#3865)
* [ACS-8026] Fixed Task form rendering (#3864)
* Updating to the latest package of 6.10 from ADF
* Updating to the latest ADF/JS-API - updating dependency rule
* Regenerated package lock
* [ACS-8082] fix search e2e (#3876)
* Using latest ADF with BC of ConfirmDialogComponent
* [ACS-8099] [ACA] Testing Angular 15 - Accessibility for search text area (#3883)
* [ACS-8100] [ACA] Testing Angular 15 - Accessibility for search facet and filter (#3887)
* [ACS-8158] Resolved issue where long tag names were not getting word wrapped in ACA. Fixed alignment issue with tag chip cross button (#3890)
* [ACS-8101] [ACA] Testing Angular 15 - Manage rule popup visual changes (#3891)
* [ACS-8191] Updated codebase to use variables from mat-selectors.scss file (#3889)
* [ACS-8191] Updated ACA codebase to use selectors from mat-selectors.scss file instead of hardcoded selectors
* [ACS-8191] Resolved configuration issue where running unit test on aca-shared failed due to not finding adf-core styles
* Update ADF dependencies (#3897)
* Upgrading ADF packages
* Use latest ADF
* Updated packages version
* Updated packages version
* Updated packages version
* Updated packages version
* Updated packages version
* Updated packages version
* Updated packages version
* [ACS-8253] viewer file name change position on navigation (#3914)
* Updated ADF version
* Use latest ADF
* Package lock fix
* Build fix
* Restore release branch build and unit tests
* E2Es fix
* Fix SonarCloud issues
* Stylelint fix
* Stylelint fix
* [ACS-8442] Remove additional checkbox label
* First batch of E2E fixes
* Bump ADF
* Second round of E2E locators fixes
* Locator fix
* [ACS-8443] Fix incorrect focus style for checkboxes
* E2Es locators fixes
* E2E locator fixes
* [ACS-6693] locator fix upload new version title
* E2E locator fix
* E2E locator fix
* [ACS-6693] locator fix upload new version file
---------
Co-authored-by: jacekpluta <73617938+jacekpluta@users.noreply.github.com>
Co-authored-by: Vito Albano <vito.albano@hyland.com>
Co-authored-by: tomson <nastalytomasz@gmail.com>
Co-authored-by: Mykyta Maliarchuk <84377976+nikita-web-ua@users.noreply.github.com>
Co-authored-by: Jacek Pluta <jacek.pluta@hyland.com>
Co-authored-by: dominikiwanekhyland <141320833+dominikiwanekhyland@users.noreply.github.com>
Co-authored-by: tomson <tomasz.nastaly@hyland.com>
Co-authored-by: AleksanderSklorz <115619721+AleksanderSklorz@users.noreply.github.com>
Co-authored-by: swapnil-verma-gl <92505353+swapnil-verma-gl@users.noreply.github.com>
Co-authored-by: VitoAlbano <vito.albano.123@gmail.com>
Co-authored-by: Akash Rathod <41251473+akashrathod28@users.noreply.github.com>
Co-authored-by: Ehsan Rezaei <ehsan.rezaei@hyland.com>
Co-authored-by: akash.rathod@hyland.com <akash.rathod@hyland.com>
This commit is contained in:
@@ -52,8 +52,7 @@ export enum ActionType {
|
||||
export class ActionsDropdownComponent extends BaseComponent {
|
||||
private static rootElement = 'aca-edit-rule-dialog aca-rule-action-list';
|
||||
|
||||
private getOptionLocator = (optionName: string): Locator =>
|
||||
this.page.locator('.mat-select-panel .mat-option-text', { hasText: optionName }).first();
|
||||
private getOptionLocator = (optionName: string): Locator => this.page.locator('.mat-mdc-select-panel .mdc-list-item__primary-text', { hasText: optionName }).first();
|
||||
private ruleActionLocator = this.getChild('aca-rule-action');
|
||||
private addActionButtonLocator = this.getChild('[data-automation-id="rule-action-list-add-action-button"]');
|
||||
private actionDropdownLocator = this.getChild('[data-automation-id="rule-action-select"]');
|
||||
@@ -61,7 +60,7 @@ export class ActionsDropdownComponent extends BaseComponent {
|
||||
private actionCheckInInputLocator = '[data-automation-id="header-description"] input';
|
||||
private actionAutoDeclareLocator = '[data-automation-id="header-version"] mat-select';
|
||||
private actionSimpleWorkflowStepInputLocator = '[data-automation-id="header-approve-step"] input';
|
||||
private actionSimpleWorkflowApproveFolderLocator = `[data-automation-id="header-approve-folder"] input`;
|
||||
private actionSimpleWorkflowApproveFolderLocator = `[data-automation-id="header-approve-folder"] mat-icon`;
|
||||
private actionSimpleWorkflowActionChoiceLocator = '[data-automation-id="content-node-selector-actions-choose"]';
|
||||
private actionSimpleWorkflowLabelApproveLocator = `[data-automation-id="card-boolean-label-approve-move"]`;
|
||||
private actionSimpleWorkflowSRejectStepLocator = '[data-automation-id="header-reject-step"] input';
|
||||
|
@@ -32,10 +32,10 @@ export class AdfInfoDrawerComponent extends BaseComponent {
|
||||
super(page, AdfInfoDrawerComponent.rootElement);
|
||||
}
|
||||
|
||||
public getNameField = (labelText: string) => this.getChild('[data-automation-id="library-name-properties-wrapper"]', { hasText: labelText });
|
||||
public getIdField = (labelText: string) => this.getChild('[data-automation-id="library-id-properties-wrapper"]', { hasText: labelText });
|
||||
public getNameField = (labelText: string) => this.getChild(`[data-automation-id="library-name-properties-wrapper"] input[placeholder='${labelText}']`);
|
||||
public getIdField = (labelText: string) => this.getChild(`[data-automation-id="library-id-properties-wrapper"] input[placeholder='${labelText}']`);
|
||||
public getVisibilityField = (labelText: string) =>
|
||||
this.getChild('[data-automation-id="library-visibility-properties-wrapper"]', { hasText: labelText });
|
||||
this.getChild(`[data-automation-id="library-visibility-properties-wrapper"] mat-select[ng-reflect-placeholder='${labelText}']`);
|
||||
public getDescriptionField = this.getChild('[data-automation-id="library-description-properties-wrapper"] textarea');
|
||||
public propertiesTab = this.page.getByRole('tab', { name: 'Properties' });
|
||||
public commentsTab = this.page.getByRole('tab', { name: 'Comments' });
|
||||
@@ -52,14 +52,14 @@ export class AdfInfoDrawerComponent extends BaseComponent {
|
||||
public editButton = this.page.getByRole('button', { name: 'Edit' });
|
||||
public cancelButton = this.page.getByRole('button', { name: 'Cancel' });
|
||||
public updateButton = this.page.getByRole('button', { name: 'Update' });
|
||||
public hintMessage = this.page.locator('.mat-hint');
|
||||
public errorMessage = this.page.locator('.mat-error');
|
||||
public hintMessage = this.page.locator('mat-hint');
|
||||
public errorMessage = this.page.locator('mat-error');
|
||||
public expandDetailsButton = this.getChild(`button[title='Expand panel']`);
|
||||
public expandedDetailsTabs = this.page.locator('.aca-details-container .mat-tab-label-content');
|
||||
public expandedDetailsTabs = this.page.locator('.aca-details-container .mdc-tab__text-label');
|
||||
public expandedDetailsPermissionsTab = this.expandedDetailsTabs.getByText('Permissions');
|
||||
public nameField = this.page.locator('label', { hasText: 'Name' });
|
||||
public idField = this.page.locator('label', { hasText: 'Library ID' });
|
||||
public descriptionField = this.page.locator('label', { hasText: 'Description' });
|
||||
public nameField = this.page.locator('input[placeholder=Name]');
|
||||
public idField = this.page.locator(`input[placeholder='Library ID']`);
|
||||
public descriptionField = this.page.locator('textarea[placeholder=Description]');
|
||||
public visibilityField = this.infoDrawerPanel.getByRole('combobox');
|
||||
public selectVisibility = (visibilityOption: string) => this.page.getByRole('listbox').getByRole('option', { name: visibilityOption }).click();
|
||||
|
||||
|
@@ -43,7 +43,7 @@ export enum Comparator {
|
||||
}
|
||||
|
||||
export class ConditionComponent extends ManageRulesDialogComponent {
|
||||
private getOptionLocator = (optionName: string): Locator => this.page.locator(`.cdk-overlay-pane .mat-option span`, { hasText: optionName });
|
||||
private getOptionLocator = (optionName: string): Locator => this.page.locator(`.cdk-overlay-pane .mat-mdc-option span`, { hasText: optionName });
|
||||
|
||||
private async selectField(fields: Partial<Field>, index: number): Promise<void> {
|
||||
await this.fieldDropDown.nth(index).click();
|
||||
|
@@ -135,7 +135,7 @@ export class DataTableComponent extends BaseComponent {
|
||||
*
|
||||
* @returns reference to checkbox placed in row localized by the name
|
||||
*/
|
||||
getCheckboxForElement = (item: string): Locator => this.getRowByName(item).locator('mat-checkbox');
|
||||
getCheckboxForElement = (item: string): Locator => this.getRowByName(item).locator('.mat-mdc-checkbox');
|
||||
|
||||
getColumnHeaderByTitleLocator = (headerTitle: string): Locator => this.getChild('[role="columnheader"]', { hasText: headerTitle });
|
||||
|
||||
@@ -241,23 +241,23 @@ export class DataTableComponent extends BaseComponent {
|
||||
const isSelected = await this.isRowSelected(name);
|
||||
if (!isSelected) {
|
||||
let row = this.getRowByName(name);
|
||||
await row.locator('mat-checkbox').click();
|
||||
await row.locator('.mat-checkbox-checked').waitFor({ state: 'attached' });
|
||||
await row.locator('.mat-mdc-checkbox').click();
|
||||
await row.locator('.mat-mdc-checkbox-checked').waitFor({ state: 'attached' });
|
||||
}
|
||||
}
|
||||
|
||||
async selectMultiItem(...names: string[]): Promise<void> {
|
||||
for (const name of names) {
|
||||
let row = this.getRowByName(name);
|
||||
await row.locator('mat-checkbox').click();
|
||||
await row.locator('.mat-checkbox-checked').waitFor({ state: 'attached' });
|
||||
await row.locator('.mat-mdc-checkbox').click();
|
||||
await row.locator('.mat-mdc-checkbox-checked').waitFor({ state: 'attached' });
|
||||
await this.page.waitForTimeout(1000);
|
||||
}
|
||||
}
|
||||
|
||||
async isRowSelected(itemName: string): Promise<boolean> {
|
||||
const row = this.getRowByName(itemName);
|
||||
return await row.locator('.adf-datatable-checkbox .mat-checkbox-checked').isVisible();
|
||||
return await row.locator('.adf-datatable-checkbox .mat-mdc-checkbox-checked').isVisible();
|
||||
}
|
||||
|
||||
async getColumnHeaders(): Promise<Array<string>> {
|
||||
|
@@ -26,7 +26,7 @@ import { Page, expect } from '@playwright/test';
|
||||
import { BaseComponent } from '../base.component';
|
||||
|
||||
export class MatMenuComponent extends BaseComponent {
|
||||
private static rootElement = '.mat-menu-content';
|
||||
private static rootElement = '.mat-mdc-menu-content';
|
||||
|
||||
constructor(page: Page) {
|
||||
super(page, MatMenuComponent.rootElement);
|
||||
@@ -39,8 +39,8 @@ export class MatMenuComponent extends BaseComponent {
|
||||
public createFileFromTemplate = this.getChild('[id="app.create.fileFromTemplate"]');
|
||||
public createLibrary = this.getChild('[id="app.create.library"]');
|
||||
public getButtonByText = (text: string) => this.getChild('button', { hasText: text });
|
||||
public cancelEditingAction = this.getChild(`.mat-menu-item[title='Cancel Editing']`);
|
||||
public editOfflineAction = this.getChild(`.mat-menu-item[title='Edit Offline']`);
|
||||
public cancelEditingAction = this.getChild(`.mat-mdc-menu-item[title='Cancel Editing']`);
|
||||
public editOfflineAction = this.getChild(`.mat-mdc-menu-item[title='Edit Offline']`);
|
||||
|
||||
async clickMenuItem(menuItem: string): Promise<void> {
|
||||
const menuElement = this.getButtonByText(menuItem);
|
||||
@@ -56,11 +56,11 @@ export class MatMenuComponent extends BaseComponent {
|
||||
}
|
||||
|
||||
async verifyActualMoreActions(expectedToolbarMore: string[]): Promise<void> {
|
||||
await this.page.locator('.mat-menu-content').waitFor({ state: 'attached' });
|
||||
let menus = await this.page.$$('.mat-menu-content .mat-menu-item');
|
||||
await this.page.locator('.mat-mdc-menu-content').waitFor({ state: 'attached' });
|
||||
let menus = await this.page.$$('.mat-mdc-menu-content .mat-mdc-menu-item');
|
||||
let actualMoreActions: string[] = await Promise.all(
|
||||
menus.map(async (button) => {
|
||||
const title = await (await button.$('span')).innerText();
|
||||
const title = await (await button.$('.mdc-list-item__primary-text span')).innerText();
|
||||
return title || '';
|
||||
})
|
||||
);
|
||||
|
@@ -40,6 +40,7 @@ export class AdfFolderDialogComponent extends BaseComponent {
|
||||
}
|
||||
|
||||
public getLabelText = (text: string) => this.getChild('label', { hasText: text });
|
||||
public getRequiredMarker = (text: string) => this.getLabelText(text).locator('.mat-mdc-form-field-required-marker');
|
||||
|
||||
/**
|
||||
* This method is used when we want to fill in Create new Folder Dialog and choose Create button
|
||||
|
@@ -37,7 +37,8 @@ export class AdfLibraryDialogComponent extends BaseComponent {
|
||||
}
|
||||
|
||||
public getLabelText = (text: string) => this.getChild('label', { hasText: text });
|
||||
public getDialogTitle = (text: string) => this.getChild('.mat-dialog-title', { hasText: text });
|
||||
public getRequiredMarker = (text: string) => this.getLabelText(text).locator('.mat-mdc-form-field-required-marker');
|
||||
public getDialogTitle = (text: string) => this.getChild('.mat-mdc-dialog-title', { hasText: text });
|
||||
public getErrorByText = (text: string): Locator => this.page.locator('mat-error', {hasText: text});
|
||||
|
||||
/**
|
||||
@@ -49,9 +50,9 @@ export class AdfLibraryDialogComponent extends BaseComponent {
|
||||
* @param visibility visibility of the library
|
||||
*/
|
||||
async createLibraryWithNameAndId(nameInput: string, libraryIdInput: string, descriptionInput?: string, visibility?: string): Promise<void> {
|
||||
await this.getLabelText('Name *').fill(nameInput);
|
||||
await this.getLabelText('Library ID *').clear();
|
||||
await this.getLabelText('Library ID *').fill(libraryIdInput);
|
||||
await this.getLabelText('Name').fill(nameInput);
|
||||
await this.getLabelText('Library ID').clear();
|
||||
await this.getLabelText('Library ID').fill(libraryIdInput);
|
||||
if (descriptionInput) { await this.getLabelText('Description').fill(descriptionInput); }
|
||||
if (visibility) { await this.getLabelText(visibility).click(); }
|
||||
await this.createButton.click();
|
||||
|
@@ -34,9 +34,9 @@ export class ContentNodeSelectorDialog extends BaseComponent {
|
||||
|
||||
public cancelButton = this.getChild('[data-automation-id="content-node-selector-actions-cancel"]');
|
||||
public actionButton = this.getChild('[data-automation-id="content-node-selector-actions-choose"]');
|
||||
public locationDropDown = this.getChild('[id="site-dropdown-container"]');
|
||||
public locationDropDown = this.getChild('[id="site-dropdown-container"] mat-form-field');
|
||||
private selectedRow = this.getChild('.adf-is-selected');
|
||||
getOptionLocator = (optionName: string): Locator => this.page.locator('.mat-select-panel .mat-option-text', { hasText: optionName });
|
||||
getOptionLocator = (optionName: string): Locator => this.page.locator('.mat-mdc-select-panel .mdc-list-item__primary-text', { hasText: optionName });
|
||||
private getRowByName = (name: string | number): Locator => this.getChild(`adf-datatable-row`, { hasText: name.toString() });
|
||||
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 });
|
||||
|
@@ -35,7 +35,7 @@ export class LinkRulesDialog extends BaseComponent {
|
||||
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('.mat-select-panel .mat-option-text', { hasText: optionName });
|
||||
getOptionLocator = (optionName: string): Locator => this.page.locator('.mat-mdc-select-panel .mdc-list-item__primary-text', { hasText: optionName });
|
||||
private getRowByName = (name: string | number): Locator => this.getChild(`adf-datatable-row`, { hasText: name.toString() });
|
||||
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 });
|
||||
|
@@ -33,7 +33,7 @@ export class UploadNewVersionDialog extends BaseComponent {
|
||||
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(' .mat-dialog-title');
|
||||
public title = this.getChild(' [data-automation-id="new-version-uploader-dialog-title"]');
|
||||
|
||||
constructor(page: Page) {
|
||||
super(page, UploadNewVersionDialog.rootElement);
|
||||
|
@@ -29,8 +29,8 @@ export class ManageRules extends BaseComponent {
|
||||
private static rootElement = '.aca-manage-rules';
|
||||
|
||||
public getGroupsList = (optionName: string): Locator => this.getChild('.aca-rule-list-item__header', { hasText: optionName });
|
||||
public ruleToggle = this.getChild('.aca-manage-rules__container .mat-slide-toggle-bar').first();
|
||||
public ruleToggleFalse = this.getChild('aca-rule-list-grouping input[type="checkbox"][aria-checked="false"]').first();
|
||||
public ruleToggle = this.getChild('.aca-manage-rules__container .mdc-switch').first();
|
||||
public ruleToggleFalse = this.getChild('aca-rule-list-grouping aca-rule-list-item .mdc-switch--unselected').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');
|
||||
@@ -59,7 +59,7 @@ export class ManageRules extends BaseComponent {
|
||||
async checkIfRuleIsOnTheList(ruleName: string): Promise<void> {
|
||||
await expect(this.getGroupsList(ruleName)).toBeVisible({ timeout: 5000 });
|
||||
}
|
||||
|
||||
|
||||
async countConditionsInGroup(): Promise<number> {
|
||||
return await this.ruleConditionsInGroup.count();
|
||||
}
|
||||
|
@@ -100,7 +100,7 @@ export class SearchFiltersDate extends BaseComponent {
|
||||
startDay,
|
||||
endDay
|
||||
} = params;
|
||||
|
||||
|
||||
await searchPage.searchWithin(searchPhrase, searchType);
|
||||
await searchPage.searchFilters.dateFilter.click();
|
||||
|
||||
@@ -139,4 +139,12 @@ export class SearchFiltersDate extends BaseComponent {
|
||||
await expect(searchPage.searchFilters.dateFilter).toContainText(dateText, { ignoreCase: true });
|
||||
}
|
||||
}
|
||||
|
||||
async isModifiedTabSelected(): Promise<string> {
|
||||
return this.modifiedTab.getAttribute('aria-selected');
|
||||
}
|
||||
|
||||
async isSearchTabSelected(): Promise<string> {
|
||||
return this.createdTab.getAttribute('aria-selected');
|
||||
}
|
||||
}
|
||||
|
@@ -37,13 +37,13 @@ export class SearchFiltersProperties extends BaseComponent {
|
||||
public fileSizeInput = this.getChild(`[placeholder$='Enter file size']`);
|
||||
public unitButton = this.getChild(`.adf-search-properties-file-size-unit`);
|
||||
public fileTypeInput = this.getChild(`[placeholder$='File Type']`);
|
||||
public atLeastOption = this.page.locator(`.mat-option`, { hasText: 'At Least' });
|
||||
public atMostOption = this.page.locator(`.mat-option`, { hasText: 'At Most' });
|
||||
public exactlyOption = this.page.locator(`.mat-option`, { hasText: 'Exactly' });
|
||||
public kbUnit = this.page.locator(`.mat-option`, { hasText: 'KB' });
|
||||
public mbUnit = this.page.locator(`.mat-option`, { hasText: 'MB' });
|
||||
public gbUnit = this.page.locator(`.mat-option`, { hasText: 'GB' });
|
||||
public dropdownOptions = this.page.locator(`.mat-option`);
|
||||
public atLeastOption = this.page.locator(`mat-option`, { hasText: 'At Least' });
|
||||
public atMostOption = this.page.locator(`mat-option`, { hasText: 'At Most' });
|
||||
public exactlyOption = this.page.locator(`mat-option`, { hasText: 'Exactly' });
|
||||
public kbUnit = this.page.locator(`mat-option`, { hasText: 'KB' });
|
||||
public mbUnit = this.page.locator(`mat-option`, { hasText: 'MB' });
|
||||
public gbUnit = this.page.locator(`mat-option`, { hasText: 'GB' });
|
||||
public dropdownOptions = this.page.locator(`mat-option`);
|
||||
|
||||
async setPropertiesParameters(
|
||||
page: SearchPage,
|
||||
|
@@ -28,9 +28,9 @@ import { BaseComponent } from '.././base.component';
|
||||
export class SearchOverlayComponent extends BaseComponent {
|
||||
private static rootElement = '.cdk-overlay-pane';
|
||||
|
||||
public searchFilesOption = this.getChild('label[for="content-input"]');
|
||||
public searchFoldersOption = this.getChild('label[for="folder-input"]');
|
||||
public searchLibrariesOption = this.getChild('label[for="libraries-input"]');
|
||||
public searchFilesOption = this.getChild('input#content-input');
|
||||
public searchFoldersOption = this.getChild('input#folder-input');
|
||||
public searchLibrariesOption = this.getChild('input#libraries-input');
|
||||
public searchInput = this.page.locator('#app-control-input');
|
||||
public searchButton = this.page.locator('#app-search-button');
|
||||
public searchInputControl = this.page.locator('.app-search-control');
|
||||
@@ -42,17 +42,17 @@ export class SearchOverlayComponent extends BaseComponent {
|
||||
|
||||
async isFoldersOptionChecked() {
|
||||
const optClass = await this.searchFoldersOption.getAttribute('class');
|
||||
return optClass.includes('mat-checkbox-checked');
|
||||
return optClass.includes('.mat-mdc-checkbox-checked');
|
||||
}
|
||||
|
||||
async isFilesOptionChecked() {
|
||||
const optClass = await this.searchFilesOption.getAttribute('class');
|
||||
return optClass.includes('mat-checkbox-checked');
|
||||
return optClass.includes('.mat-mdc-checkbox-checked');
|
||||
}
|
||||
|
||||
async isLibrariesOptionChecked() {
|
||||
const optClass = await this.searchLibrariesOption.getAttribute('class');
|
||||
return optClass.includes('mat-checkbox-checked');
|
||||
return optClass.includes('.mat-mdc-checkbox-checked');
|
||||
}
|
||||
|
||||
async clearOptions() {
|
||||
|
@@ -33,8 +33,8 @@ export class SearchSortingPicker extends BaseComponent {
|
||||
|
||||
public actionMenu = this.page.locator('[data-automation-id="auto_header_content_id_$thumbnail"]');
|
||||
public sortOrderButton = this.page.locator('#aca-button-sorting-menu');
|
||||
public sortByDropdownExpanded = this.page.locator('.mat-menu-panel').first();
|
||||
public sortByList = this.page.locator('.mat-menu-panel button');
|
||||
public sortByDropdownExpanded = this.page.locator('.mat-mdc-menu-panel').first();
|
||||
public sortByList = this.page.locator('.mat-mdc-menu-panel button');
|
||||
|
||||
constructor(page: Page, rootElement = SearchSortingPicker.rootElement) {
|
||||
super(page, rootElement);
|
||||
@@ -76,7 +76,7 @@ export class SearchSortingPicker extends BaseComponent {
|
||||
await this.clickSortByDropdown();
|
||||
}
|
||||
const elem = this.sortByList.getByText(option);
|
||||
const optionId = await elem.getAttribute('id');
|
||||
const optionId = await elem.locator("..").getAttribute('id');
|
||||
await elem.click();
|
||||
const directionSortElement = this.page.locator(`[id="${optionId}-${direction.toLocaleLowerCase()}"]`);
|
||||
await directionSortElement.click();
|
||||
|
Reference in New Issue
Block a user