Skip to content

Conversation

cacieprins
Copy link
Contributor

@cacieprins cacieprins commented Oct 2, 2025

  • Closes

Additional details

System tests currently fetch typescript definitions and example payloads for API endpoints when they run. This ensures our api calls are supported properly by the server.

This adds the same functionality to packages/server, so we can make sure our api functions use up-to-date typedefs from Cypress Cloud

Steps to test

How has the user experience changed?

PR Tasks


Note

Switches server API to Cloud-provided request/response types and adds a script + build hooks to sync those types; also tightens typings and refactors posting instance tests error handling.

  • Cloud API typing:
    • Replace local interfaces with Cloud validation types in lib/cloud/api/index.ts and lib/cloud/api/create_instance.ts (e.g., PostRunRequest_v3Type, PostRunInstanceRequest_v2Type, results/stdout/artifacts types).
    • Add explicit return/param types across API methods and minor guard for protocol setup based on testingType.
  • Record flow:
    • Refactor _postInstanceTests to async/try-catch and update onTestsReceived to handle failures via exception path, emit skip handling without sentinel.
  • Tooling:
    • Add scripts/sync-cloud-validations.sh to fetch Cloud TypeScript definitions into lib/validations and ignore them in .gitignore.
    • Wire into package.json (postinstall, build-prod, check-ts) via sync-cloud-validations/ensure-cloud-validations; add zod dep.

Written by Cursor Bugbot for commit a720aef. This will update automatically on new commits. Configure here.

Copy link

cypress bot commented Oct 2, 2025

cypress    Run #66266

Run Properties:  status check passed Passed #66266  •  git commit a720aefc5b: Merge branch 'develop' into chore/use-api-typedefs
Project cypress
Branch Review chore/use-api-typedefs
Run status status check passed Passed #66266
Run duration 19m 48s
Commit git commit a720aefc5b: Merge branch 'develop' into chore/use-api-typedefs
Committer Cacie Prins
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 14
Tests that did not run due to a developer annotating a test with .skip  Pending 1102
Tests that did not run due to a failure in a mocha hook  Skipped 4
Tests that passed  Passing 26704
View all changes introduced in this branch ↗︎

Warning

Partial Report: The results for the Application Quality reports may be incomplete.

UI Coverage  45.56%
  Untested elements 185  
  Tested elements 159  
Accessibility  97.97%
  Failed rules  4 critical   8 serious   2 moderate   2 minor
  Failed elements 101  

@cacieprins cacieprins marked this pull request as ready for review October 3, 2025 15:09
@cacieprins cacieprins self-assigned this Oct 3, 2025
cursor[bot]

This comment was marked as outdated.

return cb(response)
} catch (err: unknown) {
onError(err)
debug('postInstanceTests failed, allowing browser to hang until it is killed: Error %o', { err })
Copy link

Choose a reason for hiding this comment

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

Bug: Test Execution Hangs on Error

An error from _postInstanceTests in onTestsReceived now causes test execution to hang. The catch block calls onError(err) but returns without invoking the main callback, preventing browser progression.

Fix in Cursor Fix in Web

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.

1 participant