Skip to content

Conversation

@cacieprins
Copy link
Contributor

@cacieprins cacieprins commented Oct 27, 2025

  • Closes

Additional details

In preparation for testing visibility algorithm modifications, this refactors the visibility.cy.ts spec. It now uses static html fixtures, and a declarative testing style that makes it easier to determine what should and should not be visible.

Steps to test

How has the user experience changed?

PR Tasks


Note

Rewrites DOM visibility tests to use static HTML fixtures with declarative expectations and shared helpers, expanding coverage across CSS, forms, overflow, positioning, transforms, and reason messages.

  • Test Refactor (Cypress e2e):
    • Visibility spec overhaul in packages/driver/cypress/e2e/dom/visibility.cy.ts:
      • Introduces helpers assertVisibilityForEl, prepareFixtureSection, assertVisibilityForSections and groups tests into scenario suites.
      • Switches from ad-hoc DOM construction to visiting fixtures and asserting via cy-expect/cy-legacy-expect.
      • Adds focused checks for html/body overrides and updates #getReasonIsHidden assertions to read from fixtures.
    • New fixture set under packages/driver/cypress/fixtures/visibility/:
      • basic-css-properties.html, form-elements.html, overflow.html, positioning.html, transforms.html, empty.html, table-visibility.html.
      • Shared assets: style.css (section visibility and highlighting) and ux.js (in-page nav/section activation).
    • Coverage expansion:
      • Validates visibility across CSS properties (display, visibility, opacity), form/select/optgroup cases, overflow clipping/scroll, absolute/fixed/sticky positioning, transforms (scale/rotate/skew/matrix/perspective/backface), and detailed "reason hidden" messages.

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

@cypress
Copy link

cypress bot commented Oct 27, 2025

cypress    Run #66958

Run Properties:  status check failed Failed #66958  •  git commit 4573e146f7: add non-display-none html/body tests
Project cypress
Branch Review refactor/visibility-tests
Run status status check failed Failed #66958
Run duration 16m 05s
Commit git commit 4573e146f7: add non-display-none html/body tests
Committer Cacie Prins
View all properties for this run ↗︎

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

Warning

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

UI Coverage  45.48%
  Untested elements 188  
  Tested elements 161  
Accessibility  97.98%
  Failed rules  4 critical   8 serious   2 moderate   2 minor
  Failed elements 101  

Tests for review

Failed  commands/cookies.cy.js • 0 failed tests • 5x-driver-electron

View Output

Test Artifacts
Failed  commands/assertions.cy.js • 0 failed tests • 5x-driver-electron

View Output

Test Artifacts
Failed  commands/actions/check.cy.ts • 0 failed tests • 5x-driver-electron

View Output

Test Artifacts
Failed  commands/actions/type_events.cy.ts • 0 failed tests • 5x-driver-electron

View Output

Test Artifacts
Failed  e2e/origin/origin.cy.ts • 0 failed tests • 5x-driver-electron

View Output

Test Artifacts

The first 5 failed specs are shown, see all 882 specs in Cypress Cloud.

Flakiness  cypress/e2e/e2e/origin/cookie_login.cy.ts • 1 flaky test • 5x-driver-firefox

View Output

Test Artifacts
... > past Max-Age, before Expires -> not logged in
    </td>
  </tr></table>
Flakiness  cypress/e2e/commands/net_stubbing.cy.ts • 1 flaky test • 5x-driver-firefox

View Output

Test Artifacts
... > stops waiting when an xhr request is canceled
    </td>
  </tr></table>
Flakiness  src/navigation/SidebarNavigation.cy.tsx • 1 flaky test • app-ct

View Output

Test Artifacts
SidebarNavigation > expands the bar when clicking the expand button Test Replay Screenshots

@cacieprins cacieprins marked this pull request as ready for review October 27, 2025 20:39
cursor[bot]

This comment was marked as outdated.


expect(this.$tableVisCollapse.find('tr.collapse')).to.be.hidden
expect(this.$tableVisCollapse.find('tr.collapse')).to.not.be.visible
describe('html is display none', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did we remove the test where html/body are not display none?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added back in 4573e14

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.

3 participants