mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ACA-3596] Fix e2e due to process header properties changes (#5873)
* [ACA-3596] Fix e2e due to process header properties changes * Change pages structure * Move the build demoshell as last step and exclude for PR * move more pages * change testing pkg * better JSON import * update script * move CLOUD in the right place * some logs and not used methods * retrycout Co-authored-by: maurizio vitale <maurizio.vitale@alfresco.com> Co-authored-by: Eugenio Romano <eugenio.romano@alfresco.com> Co-authored-by: Eugenio Romano <eromano@users.noreply.github.com>
This commit is contained in:
@@ -25,10 +25,10 @@ import {
|
||||
UserModel,
|
||||
UsersActions
|
||||
} from '@alfresco/adf-testing';
|
||||
import { SearchResultsPage } from '../../pages/adf/search-results.page';
|
||||
import { SearchFiltersPage } from '../../pages/adf/search-filters.page';
|
||||
import { SearchDialogPage } from '../../pages/adf/dialog/search-dialog.page';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';
|
||||
import { SearchResultsPage } from '../pages/search-results.page';
|
||||
import { SearchFiltersPage } from '../pages/search-filters.page';
|
||||
import { SearchDialogPage } from '../pages/search-dialog.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { SearchConfiguration } from '../search.config';
|
||||
import { browser } from 'protractor';
|
||||
|
||||
|
@@ -17,10 +17,10 @@
|
||||
|
||||
import { DataTableComponentPage, DatePickerCalendarPage, DateUtil, LocalStorageUtil, LoginPage } from '@alfresco/adf-testing';
|
||||
import { browser, ElementFinder } from 'protractor';
|
||||
import { SearchDialogPage } from '../../pages/adf/dialog/search-dialog.page';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';
|
||||
import { SearchFiltersPage } from '../../pages/adf/search-filters.page';
|
||||
import { SearchResultsPage } from '../../pages/adf/search-results.page';
|
||||
import { SearchDialogPage } from '../pages/search-dialog.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { SearchFiltersPage } from '../pages/search-filters.page';
|
||||
import { SearchResultsPage } from '../pages/search-results.page';
|
||||
import { SearchConfiguration } from '../search.config';
|
||||
|
||||
describe('Search Date Range Filter', () => {
|
||||
|
@@ -25,10 +25,10 @@ import {
|
||||
UserModel,
|
||||
UsersActions
|
||||
} from '@alfresco/adf-testing';
|
||||
import { SearchDialogPage } from '../../pages/adf/dialog/search-dialog.page';
|
||||
import { SearchResultsPage } from '../../pages/adf/search-results.page';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';
|
||||
import { SearchFiltersPage } from '../../pages/adf/search-filters.page';
|
||||
import { SearchDialogPage } from '../pages/search-dialog.page';
|
||||
import { SearchResultsPage } from '../pages/search-results.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { SearchFiltersPage } from '../pages/search-filters.page';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import { browser, ElementFinder } from 'protractor';
|
||||
import { SearchConfiguration } from '../search.config';
|
||||
|
@@ -25,10 +25,10 @@ import {
|
||||
UserModel,
|
||||
UsersActions
|
||||
} from '@alfresco/adf-testing';
|
||||
import { SearchFiltersPage } from '../../pages/adf/search-filters.page';
|
||||
import { SearchResultsPage } from '../../pages/adf/search-results.page';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';
|
||||
import { SearchDialogPage } from '../../pages/adf/dialog/search-dialog.page';
|
||||
import { SearchFiltersPage } from '../pages/search-filters.page';
|
||||
import { SearchResultsPage } from '../pages/search-results.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { SearchDialogPage } from '../pages/search-dialog.page';
|
||||
import { SearchConfiguration } from '../search.config';
|
||||
import { browser } from 'protractor';
|
||||
|
||||
|
@@ -24,10 +24,10 @@ import {
|
||||
UserModel,
|
||||
UsersActions
|
||||
} from '@alfresco/adf-testing';
|
||||
import { SearchDialogPage } from '../../pages/adf/dialog/search-dialog.page';
|
||||
import { SearchResultsPage } from '../../pages/adf/search-results.page';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';
|
||||
import { SearchFiltersPage } from '../../pages/adf/search-filters.page';
|
||||
import { SearchDialogPage } from '../pages/search-dialog.page';
|
||||
import { SearchResultsPage } from '../pages/search-results.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { SearchFiltersPage } from '../pages/search-filters.page';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import { browser, ElementFinder } from 'protractor';
|
||||
import { SearchConfiguration } from '../search.config';
|
||||
|
@@ -24,11 +24,11 @@ import {
|
||||
UserModel,
|
||||
UsersActions
|
||||
} from '@alfresco/adf-testing';
|
||||
import { SearchDialogPage } from '../../pages/adf/dialog/search-dialog.page';
|
||||
import { SearchResultsPage } from '../../pages/adf/search-results.page';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';
|
||||
import { SearchFiltersPage } from '../../pages/adf/search-filters.page';
|
||||
import { ContentServicesPage } from '../../pages/adf/content-services.page';
|
||||
import { SearchDialogPage } from '../pages/search-dialog.page';
|
||||
import { SearchResultsPage } from '../pages/search-results.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { SearchFiltersPage } from '../pages/search-filters.page';
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
import { browser } from 'protractor';
|
||||
import { SearchConfiguration } from '../search.config';
|
||||
|
||||
|
@@ -27,10 +27,10 @@ import {
|
||||
UserModel,
|
||||
UsersActions
|
||||
} from '@alfresco/adf-testing';
|
||||
import { SearchDialogPage } from '../../pages/adf/dialog/search-dialog.page';
|
||||
import { SearchResultsPage } from '../../pages/adf/search-results.page';
|
||||
import { SearchFiltersPage } from '../../pages/adf/search-filters.page';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigation-bar.page';
|
||||
import { SearchDialogPage } from '../pages/search-dialog.page';
|
||||
import { SearchResultsPage } from '../pages/search-results.page';
|
||||
import { SearchFiltersPage } from '../pages/search-filters.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
|
||||
import { SearchConfiguration } from '../search.config';
|
||||
|
||||
|
102
e2e/search/pages/search-dialog.page.ts
Normal file
102
e2e/search/pages/search-dialog.page.ts
Normal file
@@ -0,0 +1,102 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser, by, element, ElementFinder, protractor } from 'protractor';
|
||||
import { BrowserVisibility, BrowserActions } from '@alfresco/adf-testing';
|
||||
|
||||
export class SearchDialogPage {
|
||||
|
||||
searchIcon = element(by.css(`button[class*='adf-search-button']`));
|
||||
searchBar = element(by.css(`adf-search-control input`));
|
||||
searchBarExpanded = element(by.css(`adf-search-control mat-form-field[class*="mat-focused"] input`));
|
||||
noResultMessage = element(by.css(`p[class*='adf-search-fixed-text']`));
|
||||
rowsAuthor = by.css(`.mat-list-text p[class*='adf-search-fixed-text']`);
|
||||
completeName = by.css(`h4[class*='adf-search-fixed-text']`);
|
||||
highlightName = by.css(`.adf-highlight`);
|
||||
searchDialog = element(by.css(`mat-list[id='autocomplete-search-result-list']`));
|
||||
|
||||
async pressDownArrowAndEnter(): Promise<void> {
|
||||
await element(by.css(`adf-search-control div input`)).sendKeys(protractor.Key.ARROW_DOWN);
|
||||
await browser.actions().sendKeys(protractor.Key.ENTER).perform();
|
||||
}
|
||||
|
||||
async clickOnSearchIcon(): Promise<void> {
|
||||
await BrowserActions.click(this.searchIcon);
|
||||
}
|
||||
|
||||
async checkSearchIconIsVisible(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.searchIcon);
|
||||
}
|
||||
|
||||
async checkSearchBarIsVisible(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.searchBar);
|
||||
}
|
||||
|
||||
async checkSearchBarIsNotVisible(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(this.searchBarExpanded);
|
||||
}
|
||||
|
||||
async checkNoResultMessageIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.noResultMessage);
|
||||
}
|
||||
|
||||
async checkNoResultMessageIsNotDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(this.noResultMessage);
|
||||
}
|
||||
|
||||
async enterText(text: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.searchBar);
|
||||
await this.searchBar.sendKeys(text);
|
||||
}
|
||||
|
||||
async enterTextAndPressEnter(text: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.searchBar);
|
||||
await this.searchBar.sendKeys(text);
|
||||
await this.searchBar.sendKeys(protractor.Key.ENTER);
|
||||
}
|
||||
|
||||
async resultTableContainsRow(name: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.searchDialog);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.getRowByRowName(name));
|
||||
}
|
||||
|
||||
async clickOnSpecificRow(name: string): Promise<void> {
|
||||
await this.resultTableContainsRow(name);
|
||||
await BrowserActions.click(this.getRowByRowName(name));
|
||||
}
|
||||
|
||||
getRowByRowName(name: string): ElementFinder {
|
||||
return element(by.css(`mat-list-item[data-automation-id='autocomplete_for_${name}']`));
|
||||
}
|
||||
|
||||
async getSpecificRowsHighlightName(name: string): Promise<string> {
|
||||
return BrowserActions.getText(this.getRowByRowName(name).element(this.highlightName));
|
||||
}
|
||||
|
||||
async getSpecificRowsCompleteName(name: string): Promise<string> {
|
||||
return BrowserActions.getText(this.getRowByRowName(name).element(this.completeName));
|
||||
}
|
||||
|
||||
async getSpecificRowsAuthor(name: string): Promise<string> {
|
||||
return BrowserActions.getText(this.getRowByRowName(name).element(this.rowsAuthor));
|
||||
}
|
||||
|
||||
async clearText(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.searchBar);
|
||||
await this.searchBar.clear();
|
||||
}
|
||||
}
|
238
e2e/search/pages/search-filters.page.ts
Normal file
238
e2e/search/pages/search-filters.page.ts
Normal file
@@ -0,0 +1,238 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { BrowserVisibility, DateRangeFilterPage, NumberRangeFilterPage, SearchCategoriesPage, SearchCheckListPage, SearchRadioPage, SearchSliderPage, SearchTextPage } from '@alfresco/adf-testing';
|
||||
import { by, element } from 'protractor';
|
||||
|
||||
export class SearchFiltersPage {
|
||||
|
||||
searchCategoriesPage: SearchCategoriesPage = new SearchCategoriesPage();
|
||||
|
||||
searchFilters = element(by.css('adf-search-filter'));
|
||||
fileTypeFilter = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-SEARCH.FACET_FIELDS.TYPE"]'));
|
||||
creatorFilter = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-SEARCH.FACET_FIELDS.CREATOR"]'));
|
||||
fileSizeFilter = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-SEARCH.FACET_FIELDS.SIZE"]'));
|
||||
nameFilter = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-Name"]'));
|
||||
checkListFilter = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-Check List"]'));
|
||||
createdDateRangeFilter = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-Created Date (range)"]'));
|
||||
typeFilter = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-Type"]'));
|
||||
sizeRangeFilter = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-Content Size (range)"]'));
|
||||
sizeSliderFilter = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-Content Size"]'));
|
||||
facetQueriesDefaultGroup = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-SEARCH.FACET_QUERIES.MY_FACET_QUERIES"],' +
|
||||
'mat-expansion-panel[data-automation-id="expansion-panel-My facet queries"]'));
|
||||
facetQueriesTypeGroup = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-Type facet queries"]'));
|
||||
facetQueriesSizeGroup = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-Size facet queries"]'));
|
||||
facetIntervalsByCreated = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-The Created"]'));
|
||||
facetIntervalsByModified = element(by.css('mat-expansion-panel[data-automation-id="expansion-panel-TheModified"]'));
|
||||
|
||||
async checkSearchFiltersIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.searchFilters);
|
||||
}
|
||||
|
||||
sizeRangeFilterPage(): NumberRangeFilterPage {
|
||||
return SearchCategoriesPage.numberRangeFilter(this.sizeRangeFilter);
|
||||
}
|
||||
|
||||
createdDateRangeFilterPage(): DateRangeFilterPage {
|
||||
return SearchCategoriesPage.dateRangeFilter(this.createdDateRangeFilter);
|
||||
}
|
||||
|
||||
textFiltersPage(): SearchTextPage {
|
||||
return SearchCategoriesPage.textFiltersPage(this.nameFilter);
|
||||
}
|
||||
|
||||
checkListFiltersPage(): SearchCheckListPage {
|
||||
return SearchCategoriesPage.checkListFiltersPage(this.checkListFilter);
|
||||
}
|
||||
|
||||
creatorCheckListFiltersPage(): SearchCheckListPage {
|
||||
return SearchCategoriesPage.checkListFiltersPage(this.creatorFilter);
|
||||
}
|
||||
|
||||
fileTypeCheckListFiltersPage(): SearchCheckListPage {
|
||||
return SearchCategoriesPage.checkListFiltersPage(this.fileTypeFilter);
|
||||
}
|
||||
|
||||
typeFiltersPage(): SearchRadioPage {
|
||||
return SearchCategoriesPage.radioFiltersPage(this.typeFilter);
|
||||
}
|
||||
|
||||
async checkCustomFacetFieldLabelIsDisplayed(fieldLabel: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(element(by.css(`mat-expansion-panel[data-automation-id="expansion-panel-${fieldLabel}"]`)));
|
||||
}
|
||||
|
||||
sizeSliderFilterPage(): SearchSliderPage {
|
||||
return SearchCategoriesPage.sliderFilter(this.sizeSliderFilter);
|
||||
}
|
||||
|
||||
async checkCheckListFilterIsDisplayed(): Promise<void> {
|
||||
await this.searchCategoriesPage.checkFilterIsDisplayed(this.checkListFilter);
|
||||
}
|
||||
|
||||
async checkNameFilterIsExpanded(): Promise<void> {
|
||||
await this.searchCategoriesPage.checkFilterIsExpanded(this.nameFilter);
|
||||
}
|
||||
|
||||
async checkNameFilterIsDisplayed(): Promise<void> {
|
||||
await this.searchCategoriesPage.checkFilterIsDisplayed(this.nameFilter);
|
||||
}
|
||||
|
||||
async checkDefaultFacetQueryGroupIsDisplayed(): Promise<void> {
|
||||
await this.searchCategoriesPage.checkFilterIsDisplayed(this.facetQueriesDefaultGroup);
|
||||
}
|
||||
|
||||
async checkTypeFacetQueryGroupIsDisplayed(): Promise<void> {
|
||||
await this.searchCategoriesPage.checkFilterIsDisplayed(this.facetQueriesTypeGroup);
|
||||
}
|
||||
|
||||
async checkSizeFacetQueryGroupIsDisplayed(): Promise<void> {
|
||||
await this.searchCategoriesPage.checkFilterIsDisplayed(this.facetQueriesSizeGroup);
|
||||
}
|
||||
|
||||
async checkFacetIntervalsByCreatedIsDisplayed(): Promise<void> {
|
||||
await this.searchCategoriesPage.checkFilterIsDisplayed(this.facetIntervalsByCreated);
|
||||
}
|
||||
|
||||
async checkFacetIntervalsByModifiedIsDisplayed(): Promise<void> {
|
||||
await this.searchCategoriesPage.checkFilterIsDisplayed(this.facetIntervalsByModified);
|
||||
}
|
||||
|
||||
async isTypeFacetQueryGroupPresent(): Promise<boolean> {
|
||||
return this.facetQueriesTypeGroup.isPresent();
|
||||
}
|
||||
|
||||
async isSizeFacetQueryGroupPresent(): Promise<boolean> {
|
||||
return this.facetQueriesSizeGroup.isPresent();
|
||||
}
|
||||
|
||||
async clickCheckListFilter(): Promise<void> {
|
||||
await this.searchCategoriesPage.clickFilter(this.checkListFilter);
|
||||
}
|
||||
|
||||
async clickFileTypeListFilter(): Promise<void> {
|
||||
await this.searchCategoriesPage.clickFilter(this.fileTypeFilter);
|
||||
}
|
||||
|
||||
async clickFileSizeFilterHeader(): Promise<void> {
|
||||
await this.searchCategoriesPage.clickFilterHeader(this.fileSizeFilter);
|
||||
}
|
||||
|
||||
async checkFileSizeFilterIsCollapsed(): Promise<void> {
|
||||
await this.searchCategoriesPage.checkFilterIsCollapsed(this.fileSizeFilter);
|
||||
}
|
||||
|
||||
async checkFileTypeFilterIsCollapsed(): Promise<void> {
|
||||
await this.searchCategoriesPage.checkFilterIsCollapsed(this.fileTypeFilter);
|
||||
}
|
||||
|
||||
async checkCheckListFilterIsCollapsed(): Promise<void> {
|
||||
await this.searchCategoriesPage.checkFilterIsCollapsed(this.checkListFilter);
|
||||
}
|
||||
|
||||
async checkCheckListFilterIsExpanded(): Promise<void> {
|
||||
await this.searchCategoriesPage.checkFilterIsExpanded(this.checkListFilter);
|
||||
}
|
||||
|
||||
async checkCreatedRangeFilterIsDisplayed(): Promise<void> {
|
||||
await this.searchCategoriesPage.checkFilterIsDisplayed(this.createdDateRangeFilter);
|
||||
}
|
||||
|
||||
async clickCreatedRangeFilterHeader(): Promise<void> {
|
||||
await this.searchCategoriesPage.clickFilterHeader(this.createdDateRangeFilter);
|
||||
}
|
||||
|
||||
async checkCreatedRangeFilterIsExpanded(): Promise<void> {
|
||||
await this.searchCategoriesPage.checkFilterIsExpanded(this.createdDateRangeFilter);
|
||||
}
|
||||
|
||||
async checkTypeFilterIsDisplayed(): Promise<void> {
|
||||
await this.searchCategoriesPage.checkFilterIsDisplayed(this.typeFilter);
|
||||
}
|
||||
|
||||
async checkTypeFilterIsCollapsed(): Promise<void> {
|
||||
await this.searchCategoriesPage.checkFilterIsCollapsed(this.typeFilter);
|
||||
}
|
||||
|
||||
async clickTypeFilterHeader(): Promise<void> {
|
||||
await this.searchCategoriesPage.clickFilterHeader(this.typeFilter);
|
||||
}
|
||||
|
||||
async checkSizeRangeFilterIsDisplayed(): Promise<void> {
|
||||
await this.searchCategoriesPage.checkFilterIsDisplayed(this.createdDateRangeFilter);
|
||||
}
|
||||
|
||||
async clickSizeRangeFilterHeader(): Promise<void> {
|
||||
await this.searchCategoriesPage.clickFilterHeader(this.sizeRangeFilter);
|
||||
}
|
||||
|
||||
async checkSizeRangeFilterIsExpanded(): Promise<void> {
|
||||
await this.searchCategoriesPage.checkFilterIsExpanded(this.sizeRangeFilter);
|
||||
}
|
||||
|
||||
async checkSizeRangeFilterIsCollapsed(): Promise<void> {
|
||||
await this.searchCategoriesPage.checkFilterIsCollapsed(this.sizeRangeFilter);
|
||||
}
|
||||
|
||||
async checkSizeSliderFilterIsDisplayed(): Promise<void> {
|
||||
await this.searchCategoriesPage.checkFilterIsDisplayed(this.sizeSliderFilter);
|
||||
}
|
||||
|
||||
async clickSizeSliderFilterHeader(): Promise<void> {
|
||||
await this.searchCategoriesPage.clickFilterHeader(this.sizeSliderFilter);
|
||||
}
|
||||
|
||||
async checkSizeSliderFilterIsExpanded(): Promise<void> {
|
||||
await this.searchCategoriesPage.checkFilterIsExpanded(this.sizeSliderFilter);
|
||||
}
|
||||
|
||||
async checkSizeSliderFilterIsCollapsed(): Promise<void> {
|
||||
await this.searchCategoriesPage.checkFilterIsCollapsed(this.sizeSliderFilter);
|
||||
}
|
||||
|
||||
async checkFacetIntervalsByCreatedIsExpanded(): Promise<void> {
|
||||
await this.searchCategoriesPage.checkFilterIsExpanded(this.facetIntervalsByCreated);
|
||||
}
|
||||
|
||||
async checkFacetIntervalsByCreatedIsCollapsed(): Promise<void> {
|
||||
await this.searchCategoriesPage.checkFilterIsCollapsed(this.facetIntervalsByCreated);
|
||||
}
|
||||
|
||||
async clickFacetIntervalsByCreatedFilterHeader(): Promise<void> {
|
||||
await this.searchCategoriesPage.clickFilterHeader(this.facetIntervalsByCreated);
|
||||
}
|
||||
|
||||
async checkFacetIntervalsByModifiedIsExpanded(): Promise<void> {
|
||||
await this.searchCategoriesPage.checkFilterIsExpanded(this.facetIntervalsByModified);
|
||||
}
|
||||
|
||||
async checkFacetIntervalsByModifiedIsCollapsed(): Promise<void> {
|
||||
await this.searchCategoriesPage.checkFilterIsCollapsed(this.facetIntervalsByModified);
|
||||
}
|
||||
|
||||
async clickFacetIntervalsByModifiedFilterHeader(): Promise<void> {
|
||||
await this.searchCategoriesPage.clickFilterHeader(this.facetIntervalsByModified);
|
||||
}
|
||||
|
||||
async checkFileTypeFacetLabelIsDisplayed(fileType: string | RegExp): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.fileTypeFilter.element(by.cssContainingText('.adf-facet-label', fileType)));
|
||||
}
|
||||
|
||||
async checkFileTypeFacetLabelIsNotDisplayed(fileType: string | RegExp): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(this.fileTypeFilter.element(by.cssContainingText('.adf-facet-label', fileType)));
|
||||
}
|
||||
|
||||
}
|
89
e2e/search/pages/search-results.page.ts
Normal file
89
e2e/search/pages/search-results.page.ts
Normal file
@@ -0,0 +1,89 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { BrowserVisibility, DataTableComponentPage, SearchSortingPickerPage } from '@alfresco/adf-testing';
|
||||
import { by, element } from 'protractor';
|
||||
import { ContentServicesPage } from '../../core/pages/content-services.page';
|
||||
|
||||
export class SearchResultsPage {
|
||||
|
||||
noResultsMessage = element(by.css('.app-no-result-message'));
|
||||
dataTable = new DataTableComponentPage();
|
||||
searchSortingPicker = new SearchSortingPickerPage();
|
||||
contentServices = new ContentServicesPage();
|
||||
|
||||
getNodeHighlight(content: string) {
|
||||
return this.dataTable.getCellByRowContentAndColumn('Display name', content, 'Search');
|
||||
}
|
||||
|
||||
async tableIsLoaded(): Promise<void> {
|
||||
await this.dataTable.tableIsLoaded();
|
||||
}
|
||||
|
||||
async checkContentIsDisplayed(content: string): Promise<void> {
|
||||
await this.dataTable.checkContentIsDisplayed('Display name', content);
|
||||
}
|
||||
|
||||
async numberOfResultsDisplayed(): Promise<number> {
|
||||
return this.dataTable.numberOfRows();
|
||||
}
|
||||
|
||||
async checkContentIsNotDisplayed(content: string): Promise<void> {
|
||||
await this.dataTable.checkContentIsNotDisplayed('Display name', content);
|
||||
}
|
||||
|
||||
async checkNoResultMessageIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.noResultsMessage);
|
||||
}
|
||||
|
||||
async checkNoResultMessageIsNotDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(this.noResultsMessage);
|
||||
}
|
||||
|
||||
async navigateToFolder(content: string): Promise<void> {
|
||||
await this.dataTable.doubleClickRow('Display name', content);
|
||||
}
|
||||
|
||||
async deleteContent(content: string): Promise<void> {
|
||||
await this.contentServices.deleteContent(content);
|
||||
}
|
||||
|
||||
async sortByName(sortOrder: string): Promise<void> {
|
||||
await this.searchSortingPicker.sortBy(sortOrder, 'Name');
|
||||
}
|
||||
|
||||
async sortByAuthor(sortOrder: string): Promise<void> {
|
||||
await this.searchSortingPicker.sortBy(sortOrder, 'Author');
|
||||
}
|
||||
|
||||
async sortByCreated(sortOrder: string): Promise<void> {
|
||||
await this.searchSortingPicker.sortBy(sortOrder, 'Created');
|
||||
}
|
||||
|
||||
async sortBySize(sortOrder: string): Promise<void> {
|
||||
await this.searchSortingPicker.sortBy(sortOrder, 'Size');
|
||||
}
|
||||
|
||||
async checkListIsOrderedByNameAsc(): Promise<any> {
|
||||
return this.contentServices.contentList.dataTablePage().checkListIsSorted('ASC', 'Display name');
|
||||
}
|
||||
|
||||
async checkListIsOrderedByNameDesc(): Promise<any> {
|
||||
return this.contentServices.contentList.dataTablePage().checkListIsSorted('DESC', 'Display name');
|
||||
}
|
||||
|
||||
}
|
@@ -28,12 +28,12 @@ import {
|
||||
UsersActions,
|
||||
ViewerPage
|
||||
} from '@alfresco/adf-testing';
|
||||
import { SearchDialogPage } from '../pages/adf/dialog/search-dialog.page';
|
||||
import { ContentServicesPage } from '../pages/adf/content-services.page';
|
||||
import { SearchResultsPage } from '../pages/adf/search-results.page';
|
||||
import { SearchDialogPage } from './pages/search-dialog.page';
|
||||
import { ContentServicesPage } from '../core/pages/content-services.page';
|
||||
import { SearchResultsPage } from './pages/search-results.page';
|
||||
import { FileModel } from '../models/ACS/file.model';
|
||||
import { FolderModel } from '../models/ACS/folder.model';
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
|
||||
import { SearchConfiguration } from './search.config';
|
||||
|
||||
describe('Search component - Search Bar', () => {
|
||||
|
@@ -15,11 +15,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { SearchDialogPage } from '../pages/adf/dialog/search-dialog.page';
|
||||
import { SearchFiltersPage } from '../pages/adf/search-filters.page';
|
||||
import { SearchResultsPage } from '../pages/adf/search-results.page';
|
||||
import { SearchDialogPage } from './pages/search-dialog.page';
|
||||
import { SearchFiltersPage } from './pages/search-filters.page';
|
||||
import { SearchResultsPage } from './pages/search-results.page';
|
||||
import { FileModel } from '../models/ACS/file.model';
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
|
||||
import {
|
||||
ApiService,
|
||||
BrowserActions,
|
||||
|
@@ -17,11 +17,11 @@
|
||||
|
||||
import { ApiService, LoginPage, StringUtil, UploadActions, UserModel, UsersActions } from '@alfresco/adf-testing';
|
||||
import { browser } from 'protractor';
|
||||
import { SearchDialogPage } from '../pages/adf/dialog/search-dialog.page';
|
||||
import { SearchResultsPage } from '../pages/adf/search-results.page';
|
||||
import { SearchFiltersPage } from '../pages/adf/search-filters.page';
|
||||
import { SearchDialogPage } from './pages/search-dialog.page';
|
||||
import { SearchResultsPage } from './pages/search-results.page';
|
||||
import { SearchFiltersPage } from './pages/search-filters.page';
|
||||
import { FileModel } from '../models/ACS/file.model';
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
|
||||
import CONSTANTS = require('../util/constants');
|
||||
|
||||
describe('Search Component - Multi-Select Facet', () => {
|
||||
|
@@ -19,12 +19,12 @@ import { browser } from 'protractor';
|
||||
|
||||
import { ApiService, LoginPage, StringUtil, UploadActions, UserModel, UsersActions } from '@alfresco/adf-testing';
|
||||
|
||||
import { SearchDialogPage } from '../pages/adf/dialog/search-dialog.page';
|
||||
import { ContentServicesPage } from '../pages/adf/content-services.page';
|
||||
import { SearchResultsPage } from '../pages/adf/search-results.page';
|
||||
import { SearchDialogPage } from './pages/search-dialog.page';
|
||||
import { ContentServicesPage } from '../core/pages/content-services.page';
|
||||
import { SearchResultsPage } from './pages/search-results.page';
|
||||
import { FolderModel } from '../models/ACS/folder.model';
|
||||
import { FileModel } from '../models/ACS/file.model';
|
||||
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
|
||||
import { NavigationBarPage } from '../core/pages/navigation-bar.page';
|
||||
|
||||
describe('Search component - Search Page', () => {
|
||||
const search = {
|
||||
|
Reference in New Issue
Block a user