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;
// 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'] });
});

View File

@ -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(() => {

View File

@ -13,14 +13,15 @@ export const promisifiedTreeKill: (
export async function killPort(port: number): Promise<boolean> {
if (await portCheck(port)) {
let killPortResult;
try {
logInfo(`Attempting to close port ${port}`);
await kill(port);
killPortResult = await kill(port);
await new Promise<void>((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;