[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, ErrorPage } from '@alfresco/adf-testing';
import { LoginPage, ErrorPage, BrowserActions } from '@alfresco/adf-testing';
import { AcsUserModel } from '../models/ACS/acsUserModel';
import TestConfig = require('../test.config');
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
@@ -34,24 +34,22 @@ describe('Error Component', () => {
});
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
loginPage.loginToContentServicesUsingUserModel(acsUser);
await loginPage.loginToContentServicesUsingUserModel(acsUser);
done();
});
it('[C277302] Should display the error 403 when access to unauthorized page - My Change', () => {
browser.get(TestConfig.adf.url + '/error/403');
BrowserActions.getUrl(TestConfig.adf.url + '/error/403');
expect(errorPage.getErrorCode()).toBe('403');
expect(errorPage.getErrorTitle()).toBe('You don\'t have permission to access this server.');
expect(errorPage.getErrorDescription()).toBe('You\'re not allowed access to this resource on the server.');
});
it('[C280563] Should back home button navigate to the home page', () => {
browser.get(TestConfig.adf.url + '/error/404');
BrowserActions.getUrl(TestConfig.adf.url + '/error/404');
errorPage.clickBackButton();
@@ -59,7 +57,7 @@ describe('Error Component', () => {
});
it('[C280564] Should secondary button by default redirect to report-issue URL', () => {
browser.get(TestConfig.adf.url + '/error/403');
BrowserActions.getUrl(TestConfig.adf.url + '/error/403');
errorPage.clickSecondButton();
@@ -67,14 +65,14 @@ describe('Error Component', () => {
});
it('[C277304] Should display the error 404 when access to not found page', () => {
browser.get(TestConfig.adf.url + '/error/404');
BrowserActions.getUrl(TestConfig.adf.url + '/error/404');
expect(errorPage.getErrorCode()).toBe('404');
expect(errorPage.getErrorTitle()).toBe('An error occurred.');
expect(errorPage.getErrorDescription()).toBe('We couldnt find the page you were looking for.');
});
it('[C307029] Should display Unknown message when error is undefined', () => {
browser.get(TestConfig.adf.url + '/error/501');
BrowserActions.getUrl(TestConfig.adf.url + '/error/501');
expect(errorPage.getErrorCode()).toBe('UNKNOWN');
expect(errorPage.getErrorTitle()).toBe('We hit a problem.');
expect(errorPage.getErrorDescription()).toBe('Looks like something went wrong.');