Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dependency: Update jQuery to latest #30345

Open
wants to merge 23 commits into
base: release/14.0.0
Choose a base branch
from

Conversation

jennifer-shehane
Copy link
Member

@jennifer-shehane jennifer-shehane commented Oct 2, 2024

Additional details

Keeping the width/height patch we intended originally to remove

  • With the upgrade of jQuery to 3.2.0+ in dependency: Update jquery to 3.4.1 #29837, we needed to patch some of the jQuery 3.2+ logic on how they calculate height/width of elements in order to not introduce a breaking change.
  • In trying to remove the patch, it was discovered that the current way that jQuery calculates width/height is inconsistent across certain CSS models and certain browsers (mainly Firefox) [see issue], where it seems the intention from jQuery is to reverse these changes so that scrollbar-gutters are not ignored in width and height calculations in a 4.x version.
  • We will maintain the patch we previously had, so jQuery width/height calculations WILL DIFFER from Cypress's jQuery width/height calculations, but this will not in itself introduce a breaking change.

Bumping jQuery

This PR bumps jQuery to 3.7.1 which is latest. 4.0.0 of jQuery is still in Beta.

  • This means we can remove the patch logic around overriding the 'unload' event since this was fixed in jQuery 3.7.1 here.
  • This may introduce some breaking changes to users, namely: jQuery changed their behavior in 3.5.0 to address an XSS security issue where they no longer fix incorrect DOM. Since we had some incorrect DOM structure in our visibility tests, this required updating or our tests would fail.

Steps to test

All tests should pass

How has the user experience changed?

PR Tasks

BREAKING: remove the patch that was preventing width/height calculation changes
@jennifer-shehane jennifer-shehane self-assigned this Oct 2, 2024
Copy link

cypress bot commented Oct 2, 2024

cypress    Run #57610

Run Properties:  status check failed Failed #57610  •  git commit fc9aef2df0: Merge branch 'remove-jquery-patch' of https://github.com/cypress-io/cypress into...
Project cypress
Run status status check failed Failed #57610
Run duration 23m 30s
Commit git commit fc9aef2df0: Merge branch 'remove-jquery-patch' of https://github.com/cypress-io/cypress into...
Committer Jennifer Shehane
View all properties for this run ↗︎

Test results
Tests that failed  Failures 4
Tests that were flaky  Flaky 7
Tests that did not run due to a developer annotating a test with .skip  Pending 1326
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 29386
UI Coverage  44.77%
  Untested elements 201  
  Tested elements 167  
Accessibility  91.3%
  Failed rules  5 critical   10 serious   2 moderate   2 minor
  Failed elements 938  

Tests for review

Failed  cypress/e2e/e2e/focus_blur.cy.js • 1 failed test • 5x-driver-electron

View Output

Test Artifacts
intercept blur methods correctly > focus <iframe> Test Replay
Failed  cypress/e2e/e2e/focus_blur.cy.js • 1 failed test • 5x-driver-chrome:beta

View Output

Test Artifacts
intercept blur methods correctly > focus <iframe> Test Replay
Failed  cypress/e2e/e2e/focus_blur.cy.js • 1 failed test • 5x-driver-firefox

View Output

Test Artifacts
intercept blur methods correctly > focus <iframe>
    </td>
  </tr></table>
Failed  cypress/e2e/e2e/focus_blur.cy.js • 1 failed test • 5x-driver-chrome

View Output

Test Artifacts
intercept blur methods correctly > focus <iframe> Test Replay
Flakiness  waiting.cy.js • 2 flaky tests • 5x-driver-chrome:beta

View Output

Test Artifacts
... > errors > throws when route is never resolved Test Replay
... > errors > throws when waiting for 2nd response to route Test Replay
Flakiness  querying/querying.cy.js • 1 flaky test • 5x-driver-chrome

View Output

Test Artifacts
... > throws after timing out after a .wait() alias reference Test Replay
Flakiness  waiting.cy.js • 1 flaky test • 5x-driver-chrome

View Output

Test Artifacts
... > errors > throws when waiting for 2nd response to route Test Replay
Flakiness  net_stubbing.cy.ts • 3 flaky tests • 5x-driver-webkit

View Output

Test Artifacts
network stubbing > intercepting request > can delay and throttle a StaticResponse
    </td>
  </tr>
  <tr>
    <td colspan="2">
      <a href="https://cloud.cypress.io/projects/ypt4pf/runs/57610/overview/55052b61-31c8-4fef-9ca2-791f487769d5?reviewViewBy=FLAKY&utm_source=github&utm_medium=failed&utm_campaign=view%20test">
        ... > with `resourceType` > can match a proxied image request by resourceType
      </a>
    </td>
    <td>
      
    </td>
  </tr>
  <tr>
    <td colspan="2">
      <a href="https://cloud.cypress.io/projects/ypt4pf/runs/57610/overview/e97a5432-ec71-4bfe-82c4-d2f3fc0f4124?reviewViewBy=FLAKY&utm_source=github&utm_medium=failed&utm_campaign=view%20test">
        ... > stops waiting when an xhr request is canceled
      </a>
    </td>
    <td>
      
    </td>
  </tr></table>

@jennifer-shehane jennifer-shehane changed the title breaking: Remove patch of jQuery - updating width/height calculations for elements breaking: Update jQuery to latest Oct 8, 2024
@jennifer-shehane jennifer-shehane added the type: breaking change Requires a new major release version label Oct 8, 2024
@jennifer-shehane jennifer-shehane changed the title breaking: Update jQuery to latest dependency: Update jQuery to latest Oct 8, 2024
@jennifer-shehane jennifer-shehane added the Cypress 14 Issues scoped for Cypress 14 label Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cypress 14 Issues scoped for Cypress 14 type: breaking change Requires a new major release version
Projects
Status: Building
Development

Successfully merging this pull request may close these issues.

1 participant