From 0d9997a213f151c40d2553c55c1e9800ce6ab04f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leosvel=20P=C3=A9rez=20Espinosa?= Date: Mon, 5 Feb 2024 19:30:54 +0100 Subject: [PATCH] cleanup(testing): re-enable cypress e2e tests (#21604) --- e2e/cypress/src/cypress-legacy.test.ts | 3 +-- e2e/cypress/src/cypress.test.ts | 4 ++-- e2e/utils/process-utils.ts | 5 +++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/e2e/cypress/src/cypress-legacy.test.ts b/e2e/cypress/src/cypress-legacy.test.ts index 9977bc9c82..b927b2933a 100644 --- a/e2e/cypress/src/cypress-legacy.test.ts +++ b/e2e/cypress/src/cypress-legacy.test.ts @@ -9,8 +9,7 @@ import { const TEN_MINS_MS = 600_000; -// TODO(crystal, @leosvelperez): Still need to investigate why this is failing on CI -xdescribe('Cypress E2E Test runner (legacy)', () => { +describe('Cypress E2E Test runner (legacy)', () => { beforeAll(() => { newProject({ packages: ['@nx/angular', '@nx/react'] }); }); diff --git a/e2e/cypress/src/cypress.test.ts b/e2e/cypress/src/cypress.test.ts index 5a07e8b848..a244d7146c 100644 --- a/e2e/cypress/src/cypress.test.ts +++ b/e2e/cypress/src/cypress.test.ts @@ -12,8 +12,8 @@ import { } from '@nx/e2e/utils'; const TEN_MINS_MS = 600_000; -// TODO(crystal, @leosvelperez): Still need to investigate why this is failing on CI -xdescribe('Cypress E2E Test runner', () => { + +describe('Cypress E2E Test runner', () => { const myapp = uniq('myapp'); beforeAll(() => { diff --git a/e2e/utils/process-utils.ts b/e2e/utils/process-utils.ts index e17997c0a5..e3dfea00f7 100644 --- a/e2e/utils/process-utils.ts +++ b/e2e/utils/process-utils.ts @@ -13,14 +13,15 @@ export const promisifiedTreeKill: ( export async function killPort(port: number): Promise { if (await portCheck(port)) { + let killPortResult; try { logInfo(`Attempting to close port ${port}`); - await kill(port); + killPortResult = await kill(port); await new Promise((resolve) => setTimeout(() => resolve(), KILL_PORT_DELAY) ); if (await portCheck(port)) { - logError(`Port ${port} still open`); + logError(`Port ${port} still open`, JSON.stringify(killPortResult)); } else { logSuccess(`Port ${port} successfully closed`); return true;