Skip to content
Snippets Groups Projects
Commit 9531ea2b authored by OZGCloud's avatar OZGCloud
Browse files

stabilize e2e test

parent e870202b
No related branches found
No related tags found
No related merge requests found
......@@ -31,16 +31,11 @@ describe('Interceptor unauthorized', () => {
const BASE_PATH: string = '*/vorgangs/';
const statusCode: number = 401;
const interceptorResponseUnauthorized: string = 'getVorgangWithEingang';
const interceptorResponseOk: string = 'getVorgangWithEingang';
beforeEach(() => {
const url: string = BASE_PATH + vorgang._id.$oid;
interceptWithResponse('GET', url, { statusCode }).as(interceptorResponseUnauthorized);
})
const interceptorResponseUnauthorized: string = 'getVorgangWithEingangUnauthorized';
it('should reload page', () => {
interceptWithResponse('GET', BASE_PATH + vorgang._id.$oid, { statusCode }).as(interceptorResponseUnauthorized);
vorgangList.getListItem(vorgang.name).getRoot().click({ force: true });
waitOfInterceptor(interceptorResponseUnauthorized).then((interception) => {
......@@ -48,16 +43,19 @@ describe('Interceptor unauthorized', () => {
exist(vorgangPage.getSpinner());
vorgangPage.waitForSpinnerToDisappear();
})
})
interceptWithResponse('GET', BASE_PATH + vorgang._id.$oid, { statusCode: 200, body: vorgang }).as(interceptorResponseOk);
it('should show vorgang detail on successfully reload ', () => {
exist(vorgangPage.getSpinner());
interceptWithResponse('GET', BASE_PATH + vorgang._id.$oid, { statusCode: 200, body: vorgang });
vorgangPage.waitForSpinnerToDisappear();
waitOfInterceptor(interceptorResponseOk).then((interception) => {
assert(interception.response.statusCode, '200');
exist(vorgangHeader.getRoot());
contains(vorgangHeader.getName(), vorgang.name);
})
})
})
it('should navigate back on back button', () => {
subnavigation.clickBackButton();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment