mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Added a new LocalStorageUtil and using the setConfigMethod to set the local storage variables (#4575)
* added a new LocalStorageUtil and using the setConfigMethod to set the localstorage variables, instead of using hte settings ui page. * linting fix * fixing import paths * update new path LocalStorageUtil * fix problems after rebase * fix async loadin and clear * local storage fix * fix lint * fix cs tests * fix tag navigation and rename file appNavigation to processTabNavigation * fix lint * fix process test * fix lint Signed-off-by: Eugenio Romano <eugenio.romano@alfresco.com> * fix start process cloud * inc timeout
This commit is contained in:
committed by
Eugenio Romano
parent
97ad54a4f8
commit
e85b57876e
@@ -30,8 +30,7 @@ import { SearchConfiguration } from '../search.config';
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UploadActions } from '../../actions/ACS/upload.actions';
|
||||
import { browser } from 'protractor';
|
||||
import { StringUtil } from '@alfresco/adf-testing';
|
||||
import { setConfigField } from '../../proxy';
|
||||
import { StringUtil, LocalStorageUtil } from '@alfresco/adf-testing';
|
||||
|
||||
describe('Search Checklist Component', () => {
|
||||
|
||||
@@ -154,7 +153,7 @@ describe('Search Checklist Component', () => {
|
||||
});
|
||||
}
|
||||
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
browser.sleep(2000);
|
||||
searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().enterTextAndPressEnter(randomName);
|
||||
searchFiltersPage.clickCheckListFilter();
|
||||
@@ -191,7 +190,7 @@ describe('Search Checklist Component', () => {
|
||||
});
|
||||
}
|
||||
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().enterTextAndPressEnter(randomName);
|
||||
searchFiltersPage.clickCheckListFilter();
|
||||
@@ -203,7 +202,7 @@ describe('Search Checklist Component', () => {
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
jsonFile.categories[1].component.settings.pageSize = 11;
|
||||
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().enterTextAndPressEnter(randomName);
|
||||
searchFiltersPage.clickCheckListFilter();
|
||||
@@ -216,7 +215,7 @@ describe('Search Checklist Component', () => {
|
||||
|
||||
jsonFile.categories[1].component.settings.pageSize = 9;
|
||||
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().enterTextAndPressEnter(randomName);
|
||||
searchFiltersPage.clickCheckListFilter();
|
||||
@@ -238,7 +237,7 @@ describe('Search Checklist Component', () => {
|
||||
});
|
||||
}
|
||||
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().enterTextAndPressEnter(randomName);
|
||||
searchFiltersPage.clickCheckListFilter();
|
||||
@@ -259,7 +258,7 @@ describe('Search Checklist Component', () => {
|
||||
|
||||
delete jsonFile.categories[1].component.settings.pageSize;
|
||||
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().enterTextAndPressEnter(randomName);
|
||||
searchFiltersPage.clickCheckListFilter();
|
||||
@@ -299,7 +298,7 @@ describe('Search Checklist Component', () => {
|
||||
|
||||
jsonFile.categories[1].component.settings.operator = 'AND';
|
||||
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().enterTextAndPressEnter(randomName);
|
||||
searchFiltersPage.clickCheckListFilter();
|
||||
@@ -324,7 +323,7 @@ describe('Search Checklist Component', () => {
|
||||
'value': "TYPE:'cm:auditable'"
|
||||
});
|
||||
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().enterTextAndPressEnter(randomName);
|
||||
searchFiltersPage.clickCheckListFilter();
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, LocalStorageUtil } from '@alfresco/adf-testing';
|
||||
import { SearchDialog } from '../../pages/adf/dialog/searchDialog';
|
||||
import { DataTableComponentPage } from '@alfresco/adf-testing';
|
||||
import { SearchResultsPage } from '../../pages/adf/searchResultsPage';
|
||||
@@ -29,7 +29,6 @@ import TestConfig = require('../../test.config');
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { browser } from 'protractor';
|
||||
import { DateUtil } from '../../util/dateUtil';
|
||||
import { setConfigField } from '../../proxy';
|
||||
|
||||
describe('Search Date Range Filter', () => {
|
||||
|
||||
@@ -201,7 +200,7 @@ describe('Search Date Range Filter', () => {
|
||||
|
||||
jsonFile.categories[4].component.settings.dateFormat = 'MM-DD-YY';
|
||||
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.clickOnSearchIcon().enterTextAndPressEnter('*');
|
||||
searchFilters.checkCreatedRangeFilterIsDisplayed()
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, LocalStorageUtil } from '@alfresco/adf-testing';
|
||||
import { SearchDialog } from '../../pages/adf/dialog/searchDialog';
|
||||
import { DataTableComponentPage } from '@alfresco/adf-testing';
|
||||
import { SearchResultsPage } from '../../pages/adf/searchResultsPage';
|
||||
@@ -32,7 +32,6 @@ import { browser } from 'protractor';
|
||||
import resources = require('../../util/resources');
|
||||
import { SearchConfiguration } from '../search.config';
|
||||
import { DateUtil } from '../../util/dateUtil';
|
||||
import { setConfigField } from '../../proxy';
|
||||
|
||||
describe('Search Number Range Filter', () => {
|
||||
|
||||
@@ -397,12 +396,12 @@ describe('Search Number Range Filter', () => {
|
||||
jsonFile = searchConfiguration.getConfiguration();
|
||||
});
|
||||
|
||||
it('[C276928] Should be able to change the field property for number range', async() => {
|
||||
it('[C276928] Should be able to change the field property for number range', async () => {
|
||||
navigationBar.clickContentServicesButton();
|
||||
|
||||
jsonFile.categories[3].component.settings.field = 'cm:created';
|
||||
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.checkSearchIconIsVisible()
|
||||
.clickOnSearchIcon()
|
||||
@@ -439,12 +438,12 @@ describe('Search Number Range Filter', () => {
|
||||
|
||||
});
|
||||
|
||||
it('[C277139] Should be able to set To field to be exclusive', async() => {
|
||||
it('[C277139] Should be able to set To field to be exclusive', async () => {
|
||||
navigationBar.clickContentServicesButton();
|
||||
|
||||
jsonFile.categories[3].component.settings.format = '[{FROM} TO {TO}>';
|
||||
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.checkSearchIconIsVisible()
|
||||
.clickOnSearchIcon()
|
||||
@@ -475,12 +474,12 @@ describe('Search Number Range Filter', () => {
|
||||
searchResults.checkContentIsDisplayed(file2BytesModel.name);
|
||||
});
|
||||
|
||||
it('[C277140] Should be able to set From field to be exclusive', async() => {
|
||||
it('[C277140] Should be able to set From field to be exclusive', async () => {
|
||||
navigationBar.clickContentServicesButton();
|
||||
|
||||
jsonFile.categories[3].component.settings.format = '<{FROM} TO {TO}]';
|
||||
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.checkSearchIconIsVisible()
|
||||
.clickOnSearchIcon()
|
||||
|
@@ -30,8 +30,7 @@ import { SearchConfiguration } from '../search.config';
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UploadActions } from '../../actions/ACS/upload.actions';
|
||||
import { browser } from 'protractor';
|
||||
import { StringUtil } from '@alfresco/adf-testing';
|
||||
import { setConfigField } from '../../proxy';
|
||||
import { StringUtil, LocalStorageUtil } from '@alfresco/adf-testing';
|
||||
|
||||
describe('Search Radio Component', () => {
|
||||
|
||||
@@ -73,7 +72,10 @@ describe('Search Radio Component', () => {
|
||||
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
|
||||
createdFolder = await this.alfrescoJsApi.nodes.addNode('-my-', {name: nodeNames.folder, nodeType: 'cm:folder'});
|
||||
createdFolder = await this.alfrescoJsApi.nodes.addNode('-my-', {
|
||||
name: nodeNames.folder,
|
||||
nodeType: 'cm:folder'
|
||||
});
|
||||
createdFile = await this.alfrescoJsApi.nodes.addNode('-my-', {
|
||||
name: nodeNames.document,
|
||||
nodeType: 'cm:content'
|
||||
@@ -140,7 +142,7 @@ describe('Search Radio Component', () => {
|
||||
jsonFile = searchConfiguration.getConfiguration();
|
||||
});
|
||||
|
||||
it('[C277147] Should be able to customise the pageSize value', async() => {
|
||||
it('[C277147] Should be able to customise the pageSize value', async () => {
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
|
||||
jsonFile.categories[5].component.settings.pageSize = 10;
|
||||
@@ -152,7 +154,7 @@ describe('Search Radio Component', () => {
|
||||
});
|
||||
}
|
||||
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().enterTextAndPressEnter(randomName);
|
||||
searchFiltersPage.clickTypeFilterHeader();
|
||||
@@ -163,7 +165,7 @@ describe('Search Radio Component', () => {
|
||||
|
||||
jsonFile.categories[5].component.settings.pageSize = 11;
|
||||
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().enterTextAndPressEnter(randomName);
|
||||
searchFiltersPage.clickTypeFilterHeader();
|
||||
@@ -173,7 +175,7 @@ describe('Search Radio Component', () => {
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
jsonFile.categories[5].component.settings.pageSize = 9;
|
||||
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().enterTextAndPressEnter(randomName);
|
||||
searchFiltersPage.clickTypeFilterHeader();
|
||||
@@ -186,7 +188,7 @@ describe('Search Radio Component', () => {
|
||||
browser.refresh();
|
||||
});
|
||||
|
||||
it('[C277148] Should be able to click show more/less button', async() => {
|
||||
it('[C277148] Should be able to click show more/less button', async () => {
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
|
||||
jsonFile.categories[5].component.settings.pageSize = 0;
|
||||
@@ -198,7 +200,7 @@ describe('Search Radio Component', () => {
|
||||
});
|
||||
}
|
||||
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().enterTextAndPressEnter(randomName);
|
||||
searchFiltersPage.clickTypeFilterHeader();
|
||||
@@ -225,7 +227,7 @@ describe('Search Radio Component', () => {
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
delete jsonFile.categories[5].component.settings.pageSize;
|
||||
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().enterTextAndPressEnter(randomName);
|
||||
searchFiltersPage.clickTypeFilterHeader();
|
||||
@@ -267,7 +269,7 @@ describe('Search Radio Component', () => {
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C277033] Should be able to add a new option', async() => {
|
||||
it('[C277033] Should be able to add a new option', async () => {
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
|
||||
jsonFile.categories[5].component.settings.options.push({
|
||||
@@ -275,7 +277,7 @@ describe('Search Radio Component', () => {
|
||||
'value': "TYPE:'cm:content'"
|
||||
});
|
||||
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.clickOnSearchIcon().checkSearchBarIsVisible().enterTextAndPressEnter(randomName);
|
||||
searchFiltersPage.clickTypeFilterHeader();
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, LocalStorageUtil } from '@alfresco/adf-testing';
|
||||
import { SearchDialog } from '../../pages/adf/dialog/searchDialog';
|
||||
import { DataTableComponentPage } from '@alfresco/adf-testing';
|
||||
import { SearchResultsPage } from '../../pages/adf/searchResultsPage';
|
||||
@@ -31,7 +31,6 @@ 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', () => {
|
||||
|
||||
@@ -163,12 +162,12 @@ describe('Search Number Range Filter', () => {
|
||||
jsonFile = searchConfiguration.getConfiguration();
|
||||
});
|
||||
|
||||
it('[C276983] Should be able to disable thumb label in Search Size Slider', async() => {
|
||||
it('[C276983] Should be able to disable thumb label in Search Size Slider', async () => {
|
||||
navigationBar.clickContentServicesButton();
|
||||
|
||||
jsonFile.categories[2].component.settings.thumbLabel = false;
|
||||
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.checkSearchIconIsVisible()
|
||||
.clickOnSearchIcon()
|
||||
@@ -181,13 +180,13 @@ describe('Search Number Range Filter', () => {
|
||||
sizeSliderFilter.checkSliderWithThumbLabelIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C276985] Should be able to set min value for Search Size Slider', async() => {
|
||||
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;
|
||||
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.checkSearchIconIsVisible()
|
||||
.clickOnSearchIcon()
|
||||
@@ -202,13 +201,13 @@ describe('Search Number Range Filter', () => {
|
||||
expect(sizeSliderFilter.getMinValue()).toEqual(`${minSize}`);
|
||||
});
|
||||
|
||||
it('[C276986] Should be able to set max value for Search Size Slider', async() => {
|
||||
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;
|
||||
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.checkSearchIconIsVisible()
|
||||
.clickOnSearchIcon()
|
||||
@@ -223,13 +222,13 @@ describe('Search Number Range Filter', () => {
|
||||
expect(sizeSliderFilter.getMaxValue()).toEqual(`${maxSize}`);
|
||||
});
|
||||
|
||||
it('[C276987] Should be able to set steps for Search Size Slider', async() => {
|
||||
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;
|
||||
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.checkSearchIconIsVisible()
|
||||
.clickOnSearchIcon()
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, LocalStorageUtil } from '@alfresco/adf-testing';
|
||||
import { SearchDialog } from '../../pages/adf/dialog/searchDialog';
|
||||
import { SearchResultsPage } from '../../pages/adf/searchResultsPage';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
@@ -32,7 +32,6 @@ import { browser } from 'protractor';
|
||||
import resources = require('../../util/resources');
|
||||
import { SearchConfiguration } from '../search.config';
|
||||
import { SearchSortingPickerPage } from '../../pages/adf/content-services/search/components/search-sortingPicker.page';
|
||||
import { setConfigField } from '../../proxy';
|
||||
|
||||
describe('Search Sorting Picker', () => {
|
||||
|
||||
@@ -111,7 +110,7 @@ describe('Search Sorting Picker', () => {
|
||||
searchSortingPicker.checkOrderArrowIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C277271] Should be able to add a custom search sorter in the "sort by" option', async() => {
|
||||
it('[C277271] Should be able to add a custom search sorter in the "sort by" option', async () => {
|
||||
navigationBar.clickContentServicesButton();
|
||||
const searchConfiguration = new SearchConfiguration();
|
||||
jsonFile = searchConfiguration.getConfiguration();
|
||||
@@ -122,7 +121,7 @@ describe('Search Sorting Picker', () => {
|
||||
'field': 'cm:modifier',
|
||||
'ascending': true
|
||||
});
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.checkSearchIconIsVisible()
|
||||
.clickOnSearchIcon()
|
||||
@@ -134,12 +133,12 @@ describe('Search Sorting Picker', () => {
|
||||
.checkOptionIsDisplayed('Modifier');
|
||||
});
|
||||
|
||||
it('[C277272] Should be able to exclude a standard search sorter from the sorting option', async() => {
|
||||
it('[C277272] Should be able to exclude a standard search sorter from the sorting option', async () => {
|
||||
navigationBar.clickContentServicesButton();
|
||||
const searchConfiguration = new SearchConfiguration();
|
||||
jsonFile = searchConfiguration.getConfiguration();
|
||||
const removedOption = jsonFile.sorting.options.splice(0, 1);
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.checkSearchIconIsVisible()
|
||||
.clickOnSearchIcon()
|
||||
@@ -151,7 +150,7 @@ describe('Search Sorting Picker', () => {
|
||||
.checkOptionIsNotDisplayed(removedOption[0].label);
|
||||
});
|
||||
|
||||
it('[C277273] Should be able to set a default order for a search sorting option', async() => {
|
||||
it('[C277273] Should be able to set a default order for a search sorting option', async () => {
|
||||
navigationBar.clickContentServicesButton();
|
||||
|
||||
const searchConfiguration = new SearchConfiguration();
|
||||
@@ -165,7 +164,7 @@ describe('Search Sorting Picker', () => {
|
||||
'ascending': true
|
||||
};
|
||||
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.checkSearchIconIsVisible()
|
||||
.clickOnSearchIcon()
|
||||
@@ -218,7 +217,7 @@ describe('Search Sorting Picker', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('[C277288] Should be able to sort the search results by "Modified Date" ASC', async() => {
|
||||
it('[C277288] Should be able to sort the search results by "Modified Date" ASC', async () => {
|
||||
navigationBar.clickContentServicesButton();
|
||||
|
||||
const searchConfiguration = new SearchConfiguration();
|
||||
@@ -230,7 +229,7 @@ describe('Search Sorting Picker', () => {
|
||||
'field': 'cm:modified',
|
||||
'ascending': true
|
||||
});
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.checkSearchIconIsVisible()
|
||||
.clickOnSearchIcon()
|
||||
@@ -252,7 +251,7 @@ describe('Search Sorting Picker', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('[C277301] Should be able to change default sorting option for the search results', async() => {
|
||||
it('[C277301] Should be able to change default sorting option for the search results', async () => {
|
||||
navigationBar.clickContentServicesButton();
|
||||
|
||||
const searchConfiguration = new SearchConfiguration();
|
||||
@@ -265,7 +264,7 @@ describe('Search Sorting Picker', () => {
|
||||
'ascending': true
|
||||
});
|
||||
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.checkSearchIconIsVisible()
|
||||
.clickOnSearchIcon()
|
||||
|
@@ -24,14 +24,13 @@ import TestConfig = require('../../test.config');
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
|
||||
import { LoginPage } from '@alfresco/adf-testing';
|
||||
import { LoginPage, LocalStorageUtil } from '@alfresco/adf-testing';
|
||||
import { SearchDialog } from '../../pages/adf/dialog/searchDialog';
|
||||
import { SearchResultsPage } from '../../pages/adf/searchResultsPage';
|
||||
import { SearchFiltersPage } from '../../pages/adf/searchFiltersPage';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
|
||||
import { SearchConfiguration } from '../search.config';
|
||||
import { setConfigField } from '../../proxy';
|
||||
|
||||
describe('Search component - Text widget', () => {
|
||||
|
||||
@@ -43,7 +42,7 @@ describe('Search component - Text widget', () => {
|
||||
const searchResultPage = new SearchResultsPage();
|
||||
|
||||
const acsUser = new AcsUserModel();
|
||||
const newFolderModel = new FolderModel({'name': 'newFolder', 'description': 'newDescription'});
|
||||
const newFolderModel = new FolderModel({ 'name': 'newFolder', 'description': 'newDescription' });
|
||||
|
||||
beforeAll(async (done) => {
|
||||
|
||||
@@ -91,7 +90,7 @@ describe('Search component - Text widget', () => {
|
||||
jsonFile = searchConfiguration.getConfiguration();
|
||||
});
|
||||
|
||||
it('[C289330] Should be able to change the Field setting', async() => {
|
||||
it('[C289330] Should be able to change the Field setting', async () => {
|
||||
browser.get(TestConfig.adf.url + '/search;q=*');
|
||||
searchResultPage.tableIsLoaded();
|
||||
|
||||
@@ -109,7 +108,7 @@ describe('Search component - Text widget', () => {
|
||||
jsonFile.categories[0].component.settings.field = 'cm:description';
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
await setConfigField('search', JSON.stringify(jsonFile));
|
||||
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
|
||||
|
||||
searchDialog.clickOnSearchIcon().enterTextAndPressEnter('*');
|
||||
searchResultPage.tableIsLoaded();
|
||||
|
Reference in New Issue
Block a user