From 8779158297e18770c54631f6230203c9ec26ecb9 Mon Sep 17 00:00:00 2001 From: Richard Cox Date: Fri, 19 Feb 2021 15:49:37 +0000 Subject: [PATCH] =?UTF-8?q?E2E=20test=20debug=20-=20This=20works=20fine=20?= =?UTF-8?q?locally=20```=20=20=20=20=20=20=20=20=2000:00:50=20-=20?= =?UTF-8?q?=E2=9C=97=20should=20reach=20the=20endpoints=20page=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20-=20Failed:=20Cannot=20read=20property=20'?= =?UTF-8?q?forEach'=20of=20null=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20at=20/home/travis/build/cloudfoundry/stratos/src/test-e2e/he?= =?UTF-8?q?lpers/reset-helpers.ts:142:12=20```?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/test-e2e/endpoints/endpoints-connect-e2e.spec.ts | 2 +- src/test-e2e/helpers/reset-helpers.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/test-e2e/endpoints/endpoints-connect-e2e.spec.ts b/src/test-e2e/endpoints/endpoints-connect-e2e.spec.ts index 97bd995955..84f1b6828c 100644 --- a/src/test-e2e/endpoints/endpoints-connect-e2e.spec.ts +++ b/src/test-e2e/endpoints/endpoints-connect-e2e.spec.ts @@ -12,7 +12,7 @@ import { SnackBarPo } from '../po/snackbar.po'; import { ConnectDialogComponent } from './connect-dialog.po'; import { EndpointMetadata, EndpointsPage } from './endpoints.po'; -describe('Endpoints', () => { +fdescribe('Endpoints', () => { const endpointsPage = new EndpointsPage(); const snackBar = new SnackBarPo(); diff --git a/src/test-e2e/helpers/reset-helpers.ts b/src/test-e2e/helpers/reset-helpers.ts index 4f3579fc53..6f4caba4e6 100644 --- a/src/test-e2e/helpers/reset-helpers.ts +++ b/src/test-e2e/helpers/reset-helpers.ts @@ -133,11 +133,15 @@ export class ResetsHelpers { */ removeAllEndpoints(req) { return reqHelpers.sendRequest(req, { method: 'GET', url: 'api/v1/endpoints' }).then((data) => { + console.warn('reset-helpers.ts: removeAllEndpoints: raw response', data); + if (!data || !data.length) { return; } data = data.trim(); + console.warn('reset-helpers.ts: removeAllEndpoints: trimmed response', data); data = JSON.parse(data); + console.warn('reset-helpers.ts: removeAllEndpoints: parsed response', data); const p = promise.fulfilled({}); data.forEach((c) => { p.then(() => reqHelpers.sendRequest(req, { method: 'DELETE', url: 'api/v1/endpoints/' + c.guid }, null, {}));