cleanup(testing): re-enable cypress e2e tests (#21604)

This commit is contained in:
Leosvel Pérez Espinosa 2024-02-05 19:30:54 +01:00 committed by GitHub
parent bca5b70553
commit 0d9997a213
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 6 deletions

View File

@ -9,8 +9,7 @@ import {
const TEN_MINS_MS = 600_000; const TEN_MINS_MS = 600_000;
// TODO(crystal, @leosvelperez): Still need to investigate why this is failing on CI describe('Cypress E2E Test runner (legacy)', () => {
xdescribe('Cypress E2E Test runner (legacy)', () => {
beforeAll(() => { beforeAll(() => {
newProject({ packages: ['@nx/angular', '@nx/react'] }); newProject({ packages: ['@nx/angular', '@nx/react'] });
}); });

View File

@ -12,8 +12,8 @@ import {
} from '@nx/e2e/utils'; } from '@nx/e2e/utils';
const TEN_MINS_MS = 600_000; 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'); const myapp = uniq('myapp');
beforeAll(() => { beforeAll(() => {

View File

@ -13,14 +13,15 @@ export const promisifiedTreeKill: (
export async function killPort(port: number): Promise<boolean> { export async function killPort(port: number): Promise<boolean> {
if (await portCheck(port)) { if (await portCheck(port)) {
let killPortResult;
try { try {
logInfo(`Attempting to close port ${port}`); logInfo(`Attempting to close port ${port}`);
await kill(port); killPortResult = await kill(port);
await new Promise<void>((resolve) => await new Promise<void>((resolve) =>
setTimeout(() => resolve(), KILL_PORT_DELAY) setTimeout(() => resolve(), KILL_PORT_DELAY)
); );
if (await portCheck(port)) { if (await portCheck(port)) {
logError(`Port ${port} still open`); logError(`Port ${port} still open`, JSON.stringify(killPortResult));
} else { } else {
logSuccess(`Port ${port} successfully closed`); logSuccess(`Port ${port} successfully closed`);
return true; return true;