Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(testing): address flakiness of cypress e2e test when using --port=cypress-auto #19712

Merged
merged 1 commit into from
Oct 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions e2e/cypress/src/cypress.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,6 @@ describe('env vars', () => {
it(
'should run e2e in parallel',
async () => {
// ensure ports are free before running tests
await killPort(4200);
await killPort(4201);

const ngAppName = uniq('ng-app');
runCLI(
`generate @nx/angular:app ${ngAppName} --e2eTestRunner=cypress --linter=eslint --no-interactive`
Expand All @@ -171,13 +167,7 @@ describe('env vars', () => {
const results = runCLI(
`run-many --target=e2e --parallel=2 --port=cypress-auto --output-style=stream`
);
expect(results).toContain('Using port 4200');
expect(results).toContain('Using port 4201');
expect(results).toContain('Successfully ran target e2e for 2 projects');
checkFilesDoNotExist(
`node_modules/@nx/cypress/src/executors/cypress/4200.txt`,
`node_modules/@nx/cypress/src/executors/cypress/4201.txt`
);
}
},
TEN_MINS_MS
Expand Down