-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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: Check project dependencies for CT compatibility #26497
Conversation
34 flaky tests on run #45550 ↗︎Details:
|
Test | Artifacts | |
---|---|---|
network stubbing > intercepting request > can delay and throttle a StaticResponse |
Output
|
e2e/origin/commands/navigation.cy.ts • 1 flaky test • 5x-driver-firefox
Test | Artifacts | |
---|---|---|
cy.origin navigation > #consoleProps > .go() |
Output
|
commands/waiting.cy.js • 1 flaky test • 5x-driver-firefox
Test | Artifacts | |
---|---|---|
... > errors > throws when waiting for 2nd response to route |
Output
|
e2e/origin/config_env.cy.ts • 1 flaky test • 5x-driver-firefox
Test | Artifacts | |
---|---|---|
cy.origin- Cypress.config() > serializable > overwrites different values in secondary, even if the Cypress.config() value does not exist in the primary |
Output
|
e2e/origin/commands/assertions.cy.ts • 1 flaky test • 5x-driver-firefox
Test | Artifacts | |
---|---|---|
cy.origin assertions > #consoleProps > .should() and .and() |
Output
|
The first 5 flaky specs are shown, see all 23 specs in Cypress Cloud.
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.
Originally planned to move the dependency check logic into a new source within DataContext so it could be shared in a more centralized way, but that change ballooned pretty significantly and ended up having knock-on effects into our public API for the third-party framework stuff |
@mike-plummer Edit: just realized that it looks like this request gets fired again after I select a project, nevermind |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this out locally - it worked as expected for me 👍🏻 code looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, looks good!
|
||
debug('Checking %d dependencies in project', dependenciesToCheck.length) | ||
// Check all dependencies of interest in parallel | ||
const dependencyResults = await Promise.allSettled( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardly see allSettled
, nice! I think we could have got away with Promise.all
and return undefined
with a filter instead of throwing an error and using fulfilled
, but fine with this, too.
@@ -18,4 +19,8 @@ export class UtilDataSource { | |||
// which is what will be used here | |||
return fetch(input, { agent, ...init }) | |||
} | |||
|
|||
isDependencyInstalled (dependency: Cypress.CypressComponentDependency, projectPath: string) { | |||
return isDependencyInstalled(dependency, projectPath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice to see we could leverage isDependencyInstalled
making this PR pretty straight forward 👍
* feat/protocol: (45 commits) chore: adding support for url:changed (#26519) chore: adding viewport:changed to protocol (#26508) chore: Reduce dependencies and binary size, add circle ci detector (#26522) chore: 12.10.0 release (#26517) test: fix flaky tests (#26505) chore: Check project dependencies for CT compatibility (#26497) chore: update vm2 to 3.9.16 (#26489) chore: enable builds on feat/protocol branch (#26506) chore: [skip ci] update to labels looked at by stalebot (#26496) chore: connecting to electron browser (#26471) chore: [skip ci] turning on stale bot (#26488) chore: fix issue with logs without wallClockUpdatedAt (#26473) Update triage_add_to_project.yml chore: Update Chrome (stable) to 112.0.5615.49 and Chrome (beta) to 113.0.5672.24 (#26434) feat: display framework definition errors (#26183) fix: correctly resolve dependencies for CT onboarding when using Yarn Plug n Play (#26452) fix: Subscribe to framework detection changes in wizard (#26437) fix: make clicks on type('{enter}') composed (#26395) chore: update add-to-project workflow (#26439) chore: Pass telemetry resources from the node process to the browser (#26468) ...
Related to cypress-io/cypress-services#5578
Additional details
Check project dependencies to detect potential compatibility for component testing to help identify & assist projects that are using e2e tests that could benefit from using CT instead or in addition
Steps to test
DEBUG=cypress:data-context:sources:VersionsDataSource
x-dependencies
header is included in loggingcypress
,lodash
, etc), verify nox-dependencies
header is included in loggingvite
,react
,svelte
), verify all matching CT dependencies are included in thex-dependencies
header in the format{package}@{majorVersion},....
(react@18,react-dom@18,vite@4
)How has the user experience changed?
No user-facing change
PR Tasks
cypress-documentation
?type definitions
?