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

breaking: remove support for Angular <17.2.0 for Cypress Component Testing #30539

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

AtofStryker
Copy link
Contributor

@AtofStryker AtofStryker commented Nov 4, 2024

Additional details

Removes CT support for angular versions under 17.2.0. This is needed in order to merge the angular-signals test harness into the main test harness #29606. This also updates the cypress-schematic to have a peer dependency on angular 17.2.0 and up and updates the tests to use the latest devkit and leverages vitest in band instead of mocha/chai

Steps to test

How has the user experience changed?

PR Tasks

@AtofStryker AtofStryker changed the base branch from develop to release/14.0.0 November 4, 2024 20:36
@AtofStryker AtofStryker added npm: @cypress/angular @cypress/angular package issues type: breaking change Requires a new major release version Cypress 14 Issues scoped for Cypress 14 labels Nov 4, 2024
@AtofStryker AtofStryker self-assigned this Nov 4, 2024
@AtofStryker AtofStryker force-pushed the breaking/remove_angular_under_17_2 branch from 675b156 to 47ea457 Compare November 4, 2024 20:48
Copy link

cypress bot commented Nov 4, 2024

cypress    Run #58203

Run Properties:  status check passed Passed #58203  •  git commit 74f853bc1e: breaking: remove support for angular 13,14,15, and 16. minimum version is now 17...
Project cypress
Branch Review breaking/remove_angular_under_17_2
Run status status check passed Passed #58203
Run duration 17m 29s
Commit git commit 74f853bc1e: breaking: remove support for angular 13,14,15, and 16. minimum version is now 17...
Committer AtofStryker
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 4
Tests that did not run due to a developer annotating a test with .skip  Pending 1327
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 29317
View all changes introduced in this branch ↗︎
UI Coverage  46.67%
  Untested elements 187  
  Tested elements 168  
Accessibility  92.55%
  Failed rules  3 critical   8 serious   2 moderate   2 minor
  Failed elements 893  

@AtofStryker AtofStryker force-pushed the breaking/remove_angular_under_17_2 branch 8 times, most recently from abd9411 to a6c2708 Compare November 5, 2024 19:44
@@ -7,29 +7,28 @@
"build": "tsc -p tsconfig.json",
"build:watch": "tsc -p tsconfig.json --watch",
"lint": "eslint --ext .ts,.json, .",
"test": "mocha -r @packages/ts/register --reporter mocha-multi-reporters --reporter-options configFile=../../mocha-reporter-config.json src/**/*.spec.ts"
"test": "vitest run --no-file-parallelism"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated cypress-schematic to use vitest as the mocking library is much easier to use and it can run ts files natively. I wound up not needing the mocking but still think this a good addition

})

it('should create cypress component tests alongside components', async () => {
return schematicRunner.runSchematicAsync('specs-ct', { project: 'sandbox' }, appTree).pipe(take(1)).subscribe((tree: UnitTestTree) => expect(tree.files).to.contain('/projects/sandbox/app/src/app.component.cy.ts'))
const tree = await schematicRunner.runSchematic('specs-ct', { project: 'sandbox' }, appTree)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this test was previously passing when it shouldn't have. I cannot mock the file system easily, so I added a projects/sandbox/src with a .gitkeep to make this test mock generate the cypress test correctly.

@AtofStryker AtofStryker marked this pull request as ready for review November 5, 2024 21:21
cli/CHANGELOG.md Outdated Show resolved Hide resolved
…n is now 17.2.0

breaking: cypress-schematic only supports angular 17.2.0 and up [run ci]

fix updates missed [run ci]
@AtofStryker AtofStryker force-pushed the breaking/remove_angular_under_17_2 branch from a6c2708 to 74f853b Compare November 6, 2024 19:06
@AtofStryker
Copy link
Contributor Author

@cypress/schematic looks to function as intended as well as dependency checking from CLI. @cypress/schematic will need some more testing once the package is released but everything in this PR looks good (will add to checklist or prerelease/release items)

@AtofStryker AtofStryker merged commit 3141d12 into release/14.0.0 Nov 6, 2024
81 of 83 checks passed
@AtofStryker AtofStryker deleted the breaking/remove_angular_under_17_2 branch November 6, 2024 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cypress 14 Issues scoped for Cypress 14 npm: @cypress/angular @cypress/angular package issues type: breaking change Requires a new major release version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove support for older versions of Angular in relation to Component Testing
2 participants