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 #66995

Run Properties:  status check passed Passed #66995  •  git commit 92f7b8eff0: Merge branch 'develop' into refactor/visibility-tests
Project cypress
Branch Review refactor/visibility-tests
Run status status check passed Passed #66995
Run duration 16m 10s
Commit git commit 92f7b8eff0: Merge branch 'develop' into refactor/visibility-tests
Committer Cacie Prins
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 11
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 636
View all changes introduced in this branch ↗︎
UI Coverage  0%
  Untested elements 4  
  Tested elements 0  
Accessibility  100%
  Failed rules  0 critical   0 serious   0 moderate   0 minor
  Failed elements 0  

@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