Skip to content

Commit

Permalink
cleanup(misc): cleanup misc e2e tests (#21704)
Browse files Browse the repository at this point in the history
  • Loading branch information
leosvelperez authored Feb 9, 2024
1 parent 27faa7d commit e810f82
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
7 changes: 3 additions & 4 deletions e2e/angular-core/src/projects.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ describe('Angular Projects', () => {
);

// check e2e tests
if (runE2ETests()) {
if (runE2ETests('cypress')) {
const e2eResults = runCLI(`e2e ${app1}-e2e`);
expect(e2eResults).toContain('All specs passed!');
expect(await killPort(4200)).toBeTruthy();
Expand All @@ -152,15 +152,14 @@ describe('Angular Projects', () => {
await killProcessAndPorts(esbProcess.pid, appPort);
}, 1000000);

// TODO: enable this when tests are passing again.
xit('should successfully work with playwright for e2e tests', async () => {
it('should successfully work with playwright for e2e tests', async () => {
const app = uniq('app');

runCLI(
`generate @nx/angular:app ${app} --e2eTestRunner=playwright --project-name-and-root-format=as-provided --no-interactive`
);

if (runE2ETests()) {
if (runE2ETests('playwright')) {
const e2eResults = runCLI(`e2e ${app}-e2e`);
expect(e2eResults).toContain(
`Successfully ran target e2e for project ${app}-e2e`
Expand Down
12 changes: 6 additions & 6 deletions e2e/angular-extensions/src/cypress-component-tests.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('Angular Cypress Component Tests', () => {
runCLI(
`generate @nx/angular:cypress-component-configuration --project=${appName} --generate-tests --no-interactive`
);
if (runE2ETests()) {
if (runE2ETests('cypress')) {
expect(runCLI(`component-test ${appName}`)).toContain(
'All specs passed!'
);
Expand All @@ -53,7 +53,7 @@ describe('Angular Cypress Component Tests', () => {
runCLI(
`generate @nx/angular:cypress-component-configuration --project=${usedInAppLibName} --generate-tests --no-interactive`
);
if (runE2ETests()) {
if (runE2ETests('cypress')) {
expect(runCLI(`component-test ${usedInAppLibName}`)).toContain(
'All specs passed!'
);
Expand All @@ -73,7 +73,7 @@ describe('Angular Cypress Component Tests', () => {
runCLI(
`generate @nx/angular:cypress-component-configuration --project=${buildableLibName} --generate-tests --build-target=${appName}:build --no-interactive`
);
if (runE2ETests()) {
if (runE2ETests('cypress')) {
expect(runCLI(`component-test ${buildableLibName}`)).toContain(
'All specs passed!'
);
Expand All @@ -95,7 +95,7 @@ describe('Angular Cypress Component Tests', () => {
}
);

if (runE2ETests()) {
if (runE2ETests('cypress')) {
expect(runCLI(`component-test ${buildableLibName}`)).toContain(
'All specs passed!'
);
Expand All @@ -111,7 +111,7 @@ describe('Angular Cypress Component Tests', () => {

updateBuilableLibTestsToAssertAppStyles(appName, buildableLibName);

if (runE2ETests()) {
if (runE2ETests('cypress')) {
expect(runCLI(`component-test ${buildableLibName}`)).toContain(
'All specs passed!'
);
Expand All @@ -123,7 +123,7 @@ describe('Angular Cypress Component Tests', () => {
checkFilesExist('tailwind.config.js');
checkFilesDoNotExist(`${buildableLibName}/tailwind.config.js`);

if (runE2ETests()) {
if (runE2ETests('cypress')) {
expect(runCLI(`component-test ${buildableLibName}`)).toContain(
'All specs passed!'
);
Expand Down
4 changes: 2 additions & 2 deletions e2e/angular-module-federation/src/module-federation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ describe('Angular Module Federation', () => {
const buildRemoteOutput = runCLI(`build ${remote}`);
expect(buildRemoteOutput).toContain('Successfully ran target build');

if (runE2ETests()) {
if (runE2ETests('cypress')) {
const e2eProcess = await runCommandUntil(
`e2e ${host}-e2e --no-watch`,
(output) => output.includes('All specs passed!')
Expand Down Expand Up @@ -468,7 +468,7 @@ describe('Angular Module Federation', () => {
const buildRemoteOutput = runCLI(`build ${remote}`);
expect(buildRemoteOutput).toContain('Successfully ran target build');

if (runE2ETests()) {
if (runE2ETests('cypress')) {
const e2eProcess = await runCommandUntil(
`e2e ${host}-e2e --no-watch`,
(output) => output.includes('All specs passed!')
Expand Down
2 changes: 1 addition & 1 deletion e2e/cypress/src/cypress-legacy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('Cypress E2E Test runner (legacy)', () => {
TEN_MINS_MS
);

xit(
it(
`should allow CT and e2e in same project - react`,
async () => {
const appName = uniq(`react-cy-app`);
Expand Down

0 comments on commit e810f82

Please sign in to comment.