Skip to content

Cypress: Code App - Editor - #4053

Open
geodem127 wants to merge 17 commits into
test/code-app-data-seedingfrom
test/code-app-editor-2
Open

Cypress: Code App - Editor#4053
geodem127 wants to merge 17 commits into
test/code-app-data-seedingfrom
test/code-app-editor-2

Conversation

@geodem127

@geodem127 geodem127 commented May 6, 2026

Copy link
Copy Markdown
Contributor
  • shows correct file contents
  • show version in file name
  • displays save/publish status
  • status changes when editing contents
  • show suggestions
  • show confirmation dialog when exiting without saving changes.
  • Save
  • Publish
  • Show Diff
  • Delete File

NOTE: This work is based on and requires #3899 to be merged first.


Closing out the remaining 7 checklist items (no GitHub issue backs this PR — planned directly from the checklist above). All 7 behaviors already existed in the app; this is purely new Cypress coverage in cypress/e2e/code/editor.spec.js, plus small additive data-cy attributes on the Diff Versions button, More Options menu/Delete File item, Differ version selects/Load/Save Version buttons, and the Delete dialog (no behavior changes).

Known follow-up, not a blocker: ad hoc manual UI verification against the live dev instance hit a one-off case where the Publish button didn't visually flip to "Published" immediately after a successful publish (toast + 200 response confirmed), while the underlying Cypress "Publish" test itself passes reliably. Looks like a pre-existing eventual-consistency gap between the publish/purge-cache call and the live-status refetch, likely surfaced by repeated automated hits against the shared dev instance rather than a regression from this change.

@geodem127
geodem127 changed the base branch from dev to test/code-app-data-seeding May 6, 2026 20:21
@geodem127
geodem127 force-pushed the test/code-app-editor-2 branch from 27eccf2 to 1d11773 Compare May 6, 2026 20:29
geodem127 and others added 5 commits July 21, 2026 03:30
- Use sdk.token instead of a bare getAuthToken() call, which only
  worked by relying on cached auth state from an earlier call
- Add missing content-type header on the script fetch POST, which
  the API needs to parse the JSON body (was silently failing)
- Simplify async flow to match content.ts conventions
- Add cypress/e2e/code/seed.spec.js plus view/stylesheet/script
  fixtures exercising all three seed:code branches

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Keeping the fixtures — other PRs building on this branch will use them.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Will be added in the actual PR that consumes them.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Addresses review: silent null returns turned real API failures into
confusing downstream null-reference errors in consuming tests.
Matches the fail-loud pattern content.ts already uses.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@geodem127
geodem127 force-pushed the test/code-app-data-seeding branch from cf17404 to 9b6cad5 Compare July 20, 2026 20:07
@geodem127
geodem127 marked this pull request as ready for review July 27, 2026 22:03
The Diff Versions button, More Options menu, its Delete File item, the
Differ's version selects/Load/Save Version buttons, and the Delete dialog's
root and Cancel button had no stable selector, making them untestable.
Additive only — no behavior changes.
Extends seed:code to accept {path, overrides} alongside the existing
string-path form, so a test can merge in a value only known at runtime
(e.g. a disposable contentModelZUID) without a hardcoded fixture value.
Backward compatible with the existing string-arg call site.

Adds the editor-suggestions fixture used by the new "Show suggestions"
Cypress coverage.
Closes out the remaining items on this PR's coverage checklist: unsaved
status on edit, Save, Publish, Show Diff, the unsaved-exit confirmation
dialog, Delete File, and Monaco's field-name autocomplete suggestions.
@geodem127
geodem127 force-pushed the test/code-app-data-seeding branch from 9b6cad5 to 95613a6 Compare July 27, 2026 22:29
Comment thread cypress/fixtures/code/editor-suggestions.json Outdated
Comment thread cypress/plugins/seeds/code.ts Outdated
Comment thread src/apps/code-editor/src/app/components/TopBar/DifferActions.tsx Outdated
@geodem127
geodem127 force-pushed the test/code-app-data-seeding branch 2 times, most recently from a16aa6a to 2380098 Compare July 31, 2026 13:54
geodem127 and others added 2 commits August 3, 2026 23:20
…ture

Drop the unused editor-suggestions fixture in favor of reusing editor.json
(nothing about the suggestions test depends on fixture content or view
type), and inline the DifferActions SelectDisplayProps casts instead of
hoisting them to module-level constants.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@geodem127
geodem127 requested a review from finnar-bin August 3, 2026 15:31
@geodem127 geodem127 self-assigned this Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants