mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACS-6794] protractor to playwright e2e test suites search filters add filters classes (#3722)
* [ACS-6794] First test push with added classes * [ACS-6794] Added search filters classes with locators
This commit is contained in:
@@ -36,6 +36,13 @@ export * from './viewer.component';
|
||||
export * from './search/search-input.component';
|
||||
export * from './search/search-overlay.components';
|
||||
export * from './search/search-sorting-picker.components';
|
||||
export * from './search/search-filters.component';
|
||||
export * from './search/search-filters/search-filters-categories.component';
|
||||
export * from './search/search-filters/search-filters-date.component';
|
||||
export * from './search/search-filters/search-filters-location.component';
|
||||
export * from './search/search-filters/search-filters-logic.component';
|
||||
export * from './search/search-filters/search-filters-properties.component';
|
||||
export * from './search/search-filters/search-filters-tags.component';
|
||||
export * from './breadcrumb/breadcrumb.component';
|
||||
export * from './sidenav.component';
|
||||
export * from './aca-header.component';
|
||||
|
@@ -0,0 +1,47 @@
|
||||
/*!
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { BaseComponent } from '../base.component';
|
||||
import { Page } from '@playwright/test';
|
||||
|
||||
export class SearchFilters extends BaseComponent {
|
||||
private static rootElement = '.aca-content__advanced-filters';
|
||||
|
||||
constructor(page: Page) {
|
||||
super(page, SearchFilters.rootElement);
|
||||
}
|
||||
|
||||
public filtersButtons = this.page.locator('adf-search-widget-chip');
|
||||
public logicFilter = this.page.locator('adf-search-widget-chip', { hasText: 'Logic' });
|
||||
public propertiesFilter = this.page.locator('adf-search-widget-chip', { hasText: 'Properties' });
|
||||
public dateFilter = this.page.locator('adf-search-widget-chip', { hasText: 'Date' });
|
||||
public locationFilter = this.page.locator('adf-search-widget-chip', { hasText: 'Location' });
|
||||
public tagsFilter = this.page.locator('adf-search-widget-chip', { hasText: 'Tags' });
|
||||
public categoriesFilter = this.page.locator('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');
|
||||
}
|
@@ -0,0 +1,36 @@
|
||||
/*!
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { BaseComponent } from '../../base.component';
|
||||
import { Page } from '@playwright/test';
|
||||
|
||||
export class SearchFiltersCategories extends BaseComponent {
|
||||
private static rootElement = '.adf-search-filter-menu-card';
|
||||
|
||||
constructor(page: Page) {
|
||||
super(page, SearchFiltersCategories.rootElement);
|
||||
}
|
||||
|
||||
public addOptionInput = this.getChild(`[data-automation-id$='adf-search-chip-autocomplete-input']`);
|
||||
}
|
@@ -0,0 +1,44 @@
|
||||
/*!
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { BaseComponent } from '../../base.component';
|
||||
import { Page } from '@playwright/test';
|
||||
|
||||
export class SearchFiltersDate extends BaseComponent {
|
||||
private static rootElement = '.adf-search-filter-menu-card';
|
||||
|
||||
constructor(page: Page) {
|
||||
super(page, SearchFiltersDate.rootElement);
|
||||
}
|
||||
|
||||
public createdTab = this.getChild(`[role='tab']`, { hasText: 'Created' });
|
||||
public modifiedTab = this.getChild(`[role='tab']`, { hasText: 'Modified' });
|
||||
public anytimeButton = this.getChild(`[data-automation-id$='date-range-anytime']`);
|
||||
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 betweenStartDate = this.getChild(`[data-automation-id$='date-range-between-start-input']`);
|
||||
public betweenEndDate = this.getChild(`[data-automation-id$='date-range-between-end-input']`);
|
||||
}
|
@@ -0,0 +1,36 @@
|
||||
/*!
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { BaseComponent } from '../../base.component';
|
||||
import { Page } from '@playwright/test';
|
||||
|
||||
export class SearchFiltersLocation extends BaseComponent {
|
||||
private static rootElement = '.adf-search-filter-menu-card';
|
||||
|
||||
constructor(page: Page) {
|
||||
super(page, SearchFiltersLocation.rootElement);
|
||||
}
|
||||
|
||||
public addOptionInput = this.getChild(`[data-automation-id$='adf-search-chip-autocomplete-input']`);
|
||||
}
|
@@ -0,0 +1,39 @@
|
||||
/*!
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { BaseComponent } from '../../base.component';
|
||||
import { Page } from '@playwright/test';
|
||||
|
||||
export class SearchFiltersLogic extends BaseComponent {
|
||||
private static rootElement = '.adf-search-filter-menu-card';
|
||||
|
||||
constructor(page: Page) {
|
||||
super(page, SearchFiltersLogic.rootElement);
|
||||
}
|
||||
|
||||
public matchAllInput = this.getChild(`[placeholder$='Results will match all words entered here']`);
|
||||
public matchAnyInput = this.getChild(`[placeholder$='Results will match any words entered here']`);
|
||||
public excludeInput = this.getChild(`[placeholder$='Results will exclude matches with these words']`);
|
||||
public matchExactInput = this.getChild(`[placeholder$='Results will match this entire phrase']`);
|
||||
}
|
@@ -0,0 +1,39 @@
|
||||
/*!
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { BaseComponent } from '../../base.component';
|
||||
import { Page } from '@playwright/test';
|
||||
|
||||
export class SearchFiltersProperties extends BaseComponent {
|
||||
private static rootElement = '.adf-search-filter-menu-card';
|
||||
|
||||
constructor(page: Page) {
|
||||
super(page, SearchFiltersProperties.rootElement);
|
||||
}
|
||||
|
||||
public operatorButton = this.getChild(`.adf-search-properties-file-size-operator`);
|
||||
public fileSizeInput = this.getChild(`[placeholder$='Results will match all words entered here']`);
|
||||
public unitButton = this.getChild(`.adf-search-properties-file-size-unit`);
|
||||
public fileTypeInput = this.getChild(`[placeholder$='Results will exclude matches with these words']`);
|
||||
}
|
@@ -0,0 +1,36 @@
|
||||
/*!
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Alfresco Example Content Application
|
||||
*
|
||||
* This file is part of the Alfresco Example Content Application.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { BaseComponent } from '../../base.component';
|
||||
import { Page } from '@playwright/test';
|
||||
|
||||
export class SearchFiltersTags extends BaseComponent {
|
||||
private static rootElement = '.adf-search-filter-menu-card';
|
||||
|
||||
constructor(page: Page) {
|
||||
super(page, SearchFiltersTags.rootElement);
|
||||
}
|
||||
|
||||
public addOptionInput = this.getChild(`[data-automation-id$='adf-search-chip-autocomplete-input']`);
|
||||
}
|
@@ -24,7 +24,7 @@
|
||||
|
||||
import { Page } from '@playwright/test';
|
||||
import { BasePage } from './base.page';
|
||||
import { DataTableComponent, MatMenuComponent, ViewerComponent, SearchInputComponent, SearchOverlayComponent, SidenavComponent, SearchSortingPicker } from '../components';
|
||||
import { DataTableComponent, MatMenuComponent, ViewerComponent, SearchInputComponent, SearchOverlayComponent, SidenavComponent, SearchSortingPicker, SearchFilters, SearchFiltersTags, SearchFiltersCategories, SearchFiltersDate, SearchFiltersLocation, SearchFiltersLogic, SearchFiltersProperties } from '../components';
|
||||
import { AcaHeader } from '../components/aca-header.component';
|
||||
import { AdfConfirmDialogComponent, AdfFolderDialogComponent } from '../components/dialogs';
|
||||
|
||||
@@ -45,6 +45,13 @@ export class SearchPage extends BasePage {
|
||||
public searchInput = new SearchInputComponent(this.page);
|
||||
public searchOverlay = new SearchOverlayComponent(this.page);
|
||||
public searchSortingPicker = new SearchSortingPicker(this.page);
|
||||
public searchFilters = new SearchFilters(this.page);
|
||||
public searchFiltersTags = new SearchFiltersTags(this.page);
|
||||
public searchFiltersCategories = new SearchFiltersCategories(this.page);
|
||||
public searchFiltersDate = new SearchFiltersDate(this.page);
|
||||
public searchFiltersLocation = new SearchFiltersLocation(this.page);
|
||||
public searchFiltersProperties = new SearchFiltersProperties(this.page);
|
||||
public searchFiltersLogic = new SearchFiltersLogic(this.page);
|
||||
public sidenav = new SidenavComponent(this.page);
|
||||
public confirmDialogComponent = new AdfConfirmDialogComponent(this.page);
|
||||
|
||||
|
Reference in New Issue
Block a user