Skip to content

chore: deprecate .end() command#6431

Merged
mschile merged 6 commits intorelease/15.15.0from
mschile/sleepy-shtern-33f81a
May 1, 2026
Merged

chore: deprecate .end() command#6431
mschile merged 6 commits intorelease/15.15.0from
mschile/sleepy-shtern-33f81a

Conversation

@mschile
Copy link
Copy Markdown
Contributor

@mschile mschile commented Apr 30, 2026

Summary

  • Marks the .end() command as deprecated in Cypress 15.15.0.
  • Adds a deprecated sidebar label on the command's doc page and a :::caution banner with before/after examples that recommend starting a new cy chain instead.
  • Adds a deprecated badge next to .end() in the API table of contents.
  • Removes the .end() reference from the introduction-to-cypress chaining example.

Files changed

  • docs/api/commands/end.mdx — frontmatter + deprecation banner; updated examples to use cy.get(...).
  • docs/api/table-of-contents.mdx — added <Badge type="caution">deprecated</Badge> next to .end().
  • docs/app/core-concepts/introduction-to-cypress.mdx — dropped the trailing .end() reference in the cy.clearCookies() chaining note.
Screenshot 2026-04-30 at 3 16 05 PM Screenshot 2026-04-30 at 3 42 38 PM Screenshot 2026-04-30 at 3 17 10 PM

Note: I think we need to add a yellow color for the deprecated_label which currently shows as red. However, this matches what our Cypress.env deprecation currently looks like.

Test plan

  • Run the dev server and confirm the sidebar shows the red "Deprecated" tag next to end.
  • Confirm the .end() page renders the caution banner with Before/After code examples.
  • Confirm the API table of contents shows the deprecated badge on the .end() row.
  • Confirm the introduction-to-cypress page reads correctly without the .end() reference.

Note

Low Risk
Low risk documentation-only change that adds deprecation messaging and adjusts examples; no runtime behavior is modified.

Overview
Marks the cy.end()/.end() command docs as deprecated (Cypress 15.15.0) by adding a deprecation banner, sidebar deprecation label, and updated guidance to start a fresh command chain from cy.

Updates the API table of contents to show a deprecated badge for .end(), and removes the .end() mention from the chaining explanation in the Introduction guide while tweaking related examples to use cy.get(...) selectors.

Reviewed by Cursor Bugbot for commit 313e54d. Bugbot is set up for automated code reviews on this repo. Configure here.

mschile added 6 commits April 30, 2026 15:06
Marks the `.end()` command as deprecated in 15.15.0 and recommends
starting a new `cy` chain as the migration path. Adds the deprecated
sidebar label, a caution banner with before/after examples on the
command page, and a deprecated badge in the API table of contents.
Fix prettier formatting on `docs/api/commands/end.mdx` and
`docs/api/table-of-contents.mdx`. Also adjusts the deprecation banner
copy on `end.mdx` to match the wording used elsewhere in the file.
Aligns the sidebar deprecation tag with the yellow/orange `caution`
badge used in inline content so deprecation indicators are visually
consistent across the sidebar and page content. Affects every page
with `deprecated_label: true`.
Aligns the Cypress.env row with the deprecated badge placement now used
for .end() — the badge sits next to the property name rather than in
front of the description.
@cypress
Copy link
Copy Markdown

cypress Bot commented Apr 30, 2026

cypress-documentation    Run #1068

Run Properties:  status check passed Passed #1068  •  git commit 313e54de31: chore: move Cypress.env deprecated badge to property column
Project cypress-documentation
Branch Review mschile/sleepy-shtern-33f81a
Run status status check passed Passed #1068
Run duration 05m 55s
Commit git commit 313e54de31: chore: move Cypress.env deprecated badge to property column
Committer Matthew Schile
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 322
View all changes introduced in this branch ↗︎
UI Coverage  47.51%
  Untested elements 337  
  Tested elements 3  
Accessibility  96.89%
  Failed rules  1 critical   3 serious   4 moderate   1 minor
  Failed elements 37  

@mschile mschile self-assigned this Apr 30, 2026
@mschile mschile merged commit ac7d403 into release/15.15.0 May 1, 2026
12 checks passed
@mschile mschile deleted the mschile/sleepy-shtern-33f81a branch May 1, 2026 17:49
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