mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
speed up search test (#4626)
This commit is contained in:
@@ -20,7 +20,6 @@ import { SearchDialog } from '../../pages/adf/dialog/searchDialog';
|
||||
import { DataTableComponentPage } from '@alfresco/adf-testing';
|
||||
import { SearchResultsPage } from '../../pages/adf/searchResultsPage';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
import { ConfigEditorPage } from '../../pages/adf/configEditorPage';
|
||||
import { SearchFiltersPage } from '../../pages/adf/searchFiltersPage';
|
||||
|
||||
import TestConfig = require('../../test.config');
|
||||
@@ -32,6 +31,7 @@ import { FileModel } from '../../models/ACS/fileModel';
|
||||
import { browser } from 'protractor';
|
||||
import resources = require('../../util/resources');
|
||||
import { SearchConfiguration } from '../search.config';
|
||||
import { setConfigField } from '../../proxy';
|
||||
|
||||
describe('Search Number Range Filter', () => {
|
||||
|
||||
@@ -41,7 +41,6 @@ describe('Search Number Range Filter', () => {
|
||||
const sizeSliderFilter = searchFilters.sizeSliderFilterPage();
|
||||
const searchResults = new SearchResultsPage();
|
||||
const navigationBar = new NavigationBarPage();
|
||||
const configEditor = new ConfigEditorPage();
|
||||
const dataTable = new DataTableComponentPage();
|
||||
|
||||
const acsUser = new AcsUserModel();
|
||||
@@ -164,13 +163,12 @@ describe('Search Number Range Filter', () => {
|
||||
jsonFile = searchConfiguration.getConfiguration();
|
||||
});
|
||||
|
||||
it('[C276983] Should be able to disable thumb label in Search Size Slider', () => {
|
||||
it('[C276983] Should be able to disable thumb label in Search Size Slider', async() => {
|
||||
navigationBar.clickContentServicesButton();
|
||||
|
||||
jsonFile.categories[2].component.settings.thumbLabel = false;
|
||||
|
||||
navigationBar.clickConfigEditorButton();
|
||||
configEditor.clickSearchConfiguration();
|
||||
configEditor.clickClearButton();
|
||||
configEditor.enterBigConfigurationText(JSON.stringify(jsonFile)).clickSaveButton();
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.checkSearchIconIsVisible()
|
||||
.clickOnSearchIcon()
|
||||
@@ -183,14 +181,13 @@ describe('Search Number Range Filter', () => {
|
||||
sizeSliderFilter.checkSliderWithThumbLabelIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C276985] Should be able to set min value for Search Size Slider', () => {
|
||||
it('[C276985] Should be able to set min value for Search Size Slider', async() => {
|
||||
navigationBar.clickContentServicesButton();
|
||||
|
||||
const minSize = 3;
|
||||
jsonFile.categories[2].component.settings.min = minSize;
|
||||
|
||||
navigationBar.clickConfigEditorButton();
|
||||
configEditor.clickSearchConfiguration();
|
||||
configEditor.clickClearButton();
|
||||
configEditor.enterBigConfigurationText(JSON.stringify(jsonFile)).clickSaveButton();
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.checkSearchIconIsVisible()
|
||||
.clickOnSearchIcon()
|
||||
@@ -205,14 +202,13 @@ describe('Search Number Range Filter', () => {
|
||||
expect(sizeSliderFilter.getMinValue()).toEqual(`${minSize}`);
|
||||
});
|
||||
|
||||
it('[C276986] Should be able to set max value for Search Size Slider', () => {
|
||||
it('[C276986] Should be able to set max value for Search Size Slider', async() => {
|
||||
navigationBar.clickContentServicesButton();
|
||||
|
||||
const maxSize = 50;
|
||||
jsonFile.categories[2].component.settings.max = maxSize;
|
||||
|
||||
navigationBar.clickConfigEditorButton();
|
||||
configEditor.clickSearchConfiguration();
|
||||
configEditor.clickClearButton();
|
||||
configEditor.enterBigConfigurationText(JSON.stringify(jsonFile)).clickSaveButton();
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.checkSearchIconIsVisible()
|
||||
.clickOnSearchIcon()
|
||||
@@ -227,14 +223,13 @@ describe('Search Number Range Filter', () => {
|
||||
expect(sizeSliderFilter.getMaxValue()).toEqual(`${maxSize}`);
|
||||
});
|
||||
|
||||
it('[C276987] Should be able to set steps for Search Size Slider', () => {
|
||||
it('[C276987] Should be able to set steps for Search Size Slider', async() => {
|
||||
navigationBar.clickContentServicesButton();
|
||||
|
||||
const step = 10;
|
||||
jsonFile.categories[2].component.settings.step = step;
|
||||
|
||||
navigationBar.clickConfigEditorButton();
|
||||
configEditor.clickSearchConfiguration();
|
||||
configEditor.clickClearButton();
|
||||
configEditor.enterBigConfigurationText(JSON.stringify(jsonFile)).clickSaveButton();
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.checkSearchIconIsVisible()
|
||||
.clickOnSearchIcon()
|
||||
|
||||
Reference in New Issue
Block a user