[no-issue] Parallel run e2e and e2e common action refactoring (#4702)

This commit is contained in:
Eugenio Romano
2019-05-13 04:44:35 +02:00
committed by GitHub
parent a48bfc3714
commit 898e3b5a80
288 changed files with 8704 additions and 5130 deletions

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { LoginPage } from '@alfresco/adf-testing';
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
import { SearchResultsPage } from '../../pages/adf/searchResultsPage';
import { SearchFiltersPage } from '../../pages/adf/searchFiltersPage';
import { SearchDialog } from '../../pages/adf/dialog/searchDialog';
@@ -81,9 +81,9 @@ describe('Search Checklist Component', () => {
await browser.driver.sleep(15000);
loginPage.loginToContentServicesUsingUserModel(acsUser);
await loginPage.loginToContentServicesUsingUserModel(acsUser);
browser.get(TestConfig.adf.url + '/search;q=' + randomName + '');
BrowserActions.getUrl(TestConfig.adf.url + '/search;q=' + randomName + '');
done();
});
@@ -139,8 +139,7 @@ describe('Search Checklist Component', () => {
let jsonFile;
beforeEach(() => {
const searchConfiguration = new SearchConfiguration();
jsonFile = searchConfiguration.getConfiguration();
jsonFile = SearchConfiguration.getConfiguration();
});
it('[C277143] Should be able to click show more/less button with pageSize set as default', async () => {
@@ -283,12 +282,11 @@ describe('Search Checklist Component', () => {
let jsonFile;
beforeEach(() => {
const searchConfiguration = new SearchConfiguration();
jsonFile = searchConfiguration.getConfiguration();
jsonFile = SearchConfiguration.getConfiguration();
});
beforeAll(async (done) => {
loginPage.loginToContentServicesUsingUserModel(acsUser);
await loginPage.loginToContentServicesUsingUserModel(acsUser);
done();
});

View File

@@ -191,8 +191,7 @@ describe('Search Date Range Filter', () => {
let jsonFile;
beforeAll(() => {
const searchConfiguration = new SearchConfiguration();
jsonFile = searchConfiguration.getConfiguration();
jsonFile = SearchConfiguration.getConfiguration();
});
it('[C277117] Should be able to change date format', async () => {

View File

@@ -392,8 +392,7 @@ describe('Search Number Range Filter', () => {
let jsonFile;
beforeEach(() => {
const searchConfiguration = new SearchConfiguration();
jsonFile = searchConfiguration.getConfiguration();
jsonFile = SearchConfiguration.getConfiguration();
});
it('[C276928] Should be able to change the field property for number range', async () => {

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { LoginPage } from '@alfresco/adf-testing';
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
import { SearchFiltersPage } from '../../pages/adf/searchFiltersPage';
import { SearchResultsPage } from '../../pages/adf/searchResultsPage';
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
@@ -67,9 +67,7 @@ describe('Search Radio Component', () => {
});
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
createdFolder = await this.alfrescoJsApi.nodes.addNode('-my-', {
@@ -83,9 +81,9 @@ describe('Search Radio Component', () => {
await browser.driver.sleep(15000);
loginPage.loginToContentServicesUsingUserModel(acsUser);
await loginPage.loginToContentServicesUsingUserModel(acsUser);
browser.get(TestConfig.adf.url + '/search;q=' + randomName);
BrowserActions.getUrl(TestConfig.adf.url + '/search;q=' + randomName);
done();
});
@@ -138,8 +136,7 @@ describe('Search Radio Component', () => {
let jsonFile;
beforeEach(() => {
const searchConfiguration = new SearchConfiguration();
jsonFile = searchConfiguration.getConfiguration();
jsonFile = SearchConfiguration.getConfiguration();
});
it('[C277147] Should be able to customise the pageSize value', async () => {
@@ -259,12 +256,11 @@ describe('Search Radio Component', () => {
let jsonFile;
beforeEach(() => {
const searchConfiguration = new SearchConfiguration();
jsonFile = searchConfiguration.getConfiguration();
jsonFile = SearchConfiguration.getConfiguration();
});
beforeAll(async (done) => {
loginPage.loginToContentServicesUsingUserModel(acsUser);
await loginPage.loginToContentServicesUsingUserModel(acsUser);
done();
});

View File

@@ -78,8 +78,11 @@ describe('Search Number Range Filter', () => {
});
afterAll(async (done) => {
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, file2Bytes.entry.id);
try {
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
await uploadActions.deleteFilesOrFolder(this.alfrescoJsApi, file2Bytes.entry.id);
} catch (error) {
}
done();
});
@@ -158,8 +161,7 @@ describe('Search Number Range Filter', () => {
let jsonFile;
beforeEach(() => {
const searchConfiguration = new SearchConfiguration();
jsonFile = searchConfiguration.getConfiguration();
jsonFile = SearchConfiguration.getConfiguration();
});
it('[C276983] Should be able to disable thumb label in Search Size Slider', async () => {

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { LoginPage, LocalStorageUtil } from '@alfresco/adf-testing';
import { LoginPage, LocalStorageUtil, BrowserActions } from '@alfresco/adf-testing';
import { SearchDialog } from '../../pages/adf/dialog/searchDialog';
import { SearchResultsPage } from '../../pages/adf/searchResultsPage';
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
@@ -98,7 +98,7 @@ describe('Search Sorting Picker', () => {
});
afterEach(async (done) => {
await browser.get(TestConfig.adf.url);
await BrowserActions.getUrl(TestConfig.adf.url);
done();
});
@@ -112,8 +112,7 @@ describe('Search Sorting Picker', () => {
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();
jsonFile = SearchConfiguration.getConfiguration();
jsonFile.sorting.options.push({
'key': 'Modifier',
'label': 'Modifier',
@@ -135,8 +134,7 @@ describe('Search Sorting Picker', () => {
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();
jsonFile = SearchConfiguration.getConfiguration();
const removedOption = jsonFile.sorting.options.splice(0, 1);
await LocalStorageUtil.setConfigField('search', JSON.stringify(jsonFile));
@@ -153,8 +151,7 @@ describe('Search Sorting Picker', () => {
it('[C277273] Should be able to set a default order for a search sorting option', async () => {
navigationBar.clickContentServicesButton();
const searchConfiguration = new SearchConfiguration();
jsonFile = searchConfiguration.getConfiguration();
jsonFile = SearchConfiguration.getConfiguration();
jsonFile.sorting.options[0].ascending = false;
jsonFile.sorting.defaults[0] = {
'key': 'Size',
@@ -220,8 +217,7 @@ describe('Search Sorting Picker', () => {
it('[C277288] Should be able to sort the search results by "Modified Date" ASC', async () => {
navigationBar.clickContentServicesButton();
const searchConfiguration = new SearchConfiguration();
jsonFile = searchConfiguration.getConfiguration();
jsonFile = SearchConfiguration.getConfiguration();
jsonFile.sorting.options.push({
'key': 'Modified Date',
'label': 'Modified Date',
@@ -254,8 +250,7 @@ describe('Search Sorting Picker', () => {
it('[C277301] Should be able to change default sorting option for the search results', async () => {
navigationBar.clickContentServicesButton();
const searchConfiguration = new SearchConfiguration();
jsonFile = searchConfiguration.getConfiguration();
jsonFile = SearchConfiguration.getConfiguration();
jsonFile.sorting.options.push({
'key': 'createdByUser',
'label': 'Author',

View File

@@ -24,7 +24,7 @@ import TestConfig = require('../../test.config');
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
import { LoginPage, LocalStorageUtil } from '@alfresco/adf-testing';
import { LoginPage, LocalStorageUtil, BrowserActions } from '@alfresco/adf-testing';
import { SearchDialog } from '../../pages/adf/dialog/searchDialog';
import { SearchResultsPage } from '../../pages/adf/searchResultsPage';
import { SearchFiltersPage } from '../../pages/adf/searchFiltersPage';
@@ -68,13 +68,13 @@ describe('Search component - Text widget', () => {
await browser.driver.sleep(15000);
loginPage.loginToContentServicesUsingUserModel(acsUser);
await loginPage.loginToContentServicesUsingUserModel(acsUser);
done();
});
it('[C289329] Placeholder should be displayed in the widget when the input string is empty', () => {
browser.get(TestConfig.adf.url + '/search;q=*');
BrowserActions.getUrl(TestConfig.adf.url + '/search;q=*');
searchResultPage.tableIsLoaded();
searchFiltersPage.checkNameFilterIsDisplayed();
@@ -86,12 +86,11 @@ describe('Search component - Text widget', () => {
let jsonFile;
beforeAll(() => {
const searchConfiguration = new SearchConfiguration();
jsonFile = searchConfiguration.getConfiguration();
jsonFile = SearchConfiguration.getConfiguration();
});
it('[C289330] Should be able to change the Field setting', async () => {
browser.get(TestConfig.adf.url + '/search;q=*');
BrowserActions.getUrl(TestConfig.adf.url + '/search;q=*');
searchResultPage.tableIsLoaded();
searchFiltersPage.checkCheckListFilterIsDisplayed();