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

misc: convert server/lib/modes files to ts + add more cli options to Cloud terminal error outputs #31211

Merged
merged 6 commits into from
Mar 6, 2025

Conversation

jennifer-shehane
Copy link
Member

@jennifer-shehane jennifer-shehane commented Mar 3, 2025

Additional details

  • Converting the server/lib/modes and related files to TypeScript
  • The record.ts file could be better, but I did as much as I could

Steps to test

How has the user experience changed?

PR Tasks

@@ -68,7 +68,7 @@ const toUploadReportPayload = (acc: {
type UploadArtifactOptions = {
protocolManager?: ProtocolManager
videoUploadUrl?: string
video?: string // filepath to the video artifact
video?: string | null // filepath to the video artifact
Copy link
Member Author

Choose a reason for hiding this comment

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

I saw where we set this null in another file, so this is possible

const warning = (code, args) => {
const debug = Debug('cypress:server:cypress')

type Mode = 'exit' | 'info' | 'interactive' | 'pkg' | 'record' | 'results' | 'run' | 'smokeTest' | 'version' | 'returnPkg' | 'exitWithCode'
Copy link
Member Author

@jennifer-shehane jennifer-shehane Mar 3, 2025

Choose a reason for hiding this comment

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

This type may be more than is actually supported. It was hard to tell the definitive list by how this is called.

Comment on lines +102 to +103
parallel: `${parallel}`,
autoCancelAfterFailures: `${autoCancelAfterFailures}`,
Copy link
Member Author

Choose a reason for hiding this comment

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

These error messages only accept strings

@jennifer-shehane jennifer-shehane self-assigned this Mar 3, 2025
Copy link

cypress bot commented Mar 3, 2025

cypress    Run #60735

Run Properties:  status check passed Passed #60735  •  git commit 5b78bc4a87: Add changelog entry.
Project cypress
Branch Review js-to-ts-server-2
Run status status check passed Passed #60735
Run duration 18m 29s
Commit git commit 5b78bc4a87: Add changelog entry.
Committer Jennifer Shehane
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 7
Tests that did not run due to a developer annotating a test with .skip  Pending 1232
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 32101
View all changes introduced in this branch ↗︎
UI Coverage  46.44%
  Untested elements 183  
  Tested elements 163  
Accessibility  92.55%
  Failed rules  3 critical   8 serious   2 moderate   2 minor
  Failed elements 877  

@@ -1397,7 +1398,6 @@ export const AllCypressErrors = {
https://on.cypress.io/test-retries
`
},
// TODO: test this
Copy link
Member Author

Choose a reason for hiding this comment

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

there is a test for this!

@jennifer-shehane jennifer-shehane changed the title chore: convert server/lib/modes files to ts misc: convert server/lib/modes files to ts + add more cli options to Cloud terminal error outputs Mar 5, 2025
@jennifer-shehane jennifer-shehane merged commit 6bd522b into develop Mar 6, 2025
87 of 90 checks passed
@jennifer-shehane jennifer-shehane deleted the js-to-ts-server-2 branch March 6, 2025 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants