Unify hash url strategy (#5866)

* unify hash url startegy

* improve
This commit is contained in:
Eugenio Romano
2020-07-14 16:00:32 +01:00
committed by GitHub
parent 8ac683d164
commit d1672596ba
182 changed files with 476 additions and 520 deletions

View File

@@ -15,14 +15,14 @@
* limitations under the License.
*/
import { ApiService, BrowserActions, ErrorPage, LoginSSOPage, UserModel, UsersActions } from '@alfresco/adf-testing';
import { ApiService, BrowserActions, ErrorPage, LoginPage, UserModel, UsersActions } from '@alfresco/adf-testing';
import { browser } from 'protractor';
import { NavigationBarPage } from '../pages/adf/navigation-bar.page';
describe('Error Component', () => {
const acsUser = new UserModel();
const loginPage = new LoginSSOPage();
const loginPage = new LoginPage();
const errorPage = new ErrorPage();
const navigationBarPage = new NavigationBarPage();
@@ -40,21 +40,21 @@ describe('Error Component', () => {
});
it('[C277302] Should display the error 403 when access to unauthorized page - My Change', async () => {
await BrowserActions.getUrl(browser.params.testConfig.adf.url + '/error/403');
await BrowserActions.getUrl(browser.baseUrl + '/error/403');
await expect(await errorPage.getErrorCode()).toBe('403');
await expect(await errorPage.getErrorTitle()).toBe('You don\'t have permission to access this server.');
await expect(await errorPage.getErrorDescription()).toBe('You\'re not allowed access to this resource on the server.');
});
it('[C277304] Should display the error 404 when access to not found page', async () => {
await BrowserActions.getUrl(browser.params.testConfig.adf.url + '/error/404');
await BrowserActions.getUrl(browser.baseUrl + '/error/404');
await expect(await errorPage.getErrorCode()).toBe('404');
await expect(await errorPage.getErrorTitle()).toBe('An error occurred.');
await expect(await errorPage.getErrorDescription()).toBe('We couldnt find the page you were looking for.');
});
it('[C307029] Should display Unknown message when error is undefined', async () => {
await BrowserActions.getUrl(browser.params.testConfig.adf.url + '/error/501');
await BrowserActions.getUrl(browser.baseUrl + '/error/501');
await expect(await errorPage.getErrorCode()).toBe('UNKNOWN');
await expect(await errorPage.getErrorTitle()).toBe('We hit a problem.');
await expect(await errorPage.getErrorDescription()).toBe('Looks like something went wrong.');