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

E2E: Update dependency cypress to v12 #60117

Closed
wants to merge 36 commits into from
Closed

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Dec 9, 2022

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
cypress 9.5.1 -> 12.11.0 age adoption passing confidence

Release Notes

cypress-io/cypress

v12.11.0

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​12-11-0

v12.10.0

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​12-10-0

v12.9.0

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​12-9-0

v12.8.1

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​12-8-1

v12.8.0

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​12.8.0

v12.7.0

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​12.7.0

v12.6.0

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​12.6.0

v12.5.1

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​12-5-1

v12.5.0

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​12-5-0

v12.4.1

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​12-4-1

v12.4.0

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​12-4-0

v12.3.0

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​12-3-0

v12.2.0

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​12-2-0

v12.1.0

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​12-1-0

v12.0.2

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​12-0-2

v12.0.1

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​12-0-1

v12.0.0

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​12-0-0

v11.2.0

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​11-2-0

v11.1.0

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​11-1-0

v11.0.1

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​11-0-1

v11.0.0

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​11-0-0

v10.11.0

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​10-11-0

v10.10.0

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​10-10-0

v10.9.0

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​10-9-0

v10.8.0

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​10-8-0

v10.7.0

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​10-7-0

v10.6.0

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​10-6-0

v10.5.0

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​10-5-0

v10.4.0

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​10-4-0

v10.3.1

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​10-3-1

v10.3.0

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​10-3-0

v10.2.0

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​10-2-0

v10.1.0

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​10-1-0

v10.0.3

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​10-0-3

v10.0.2

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​10-0-2

v10.0.1

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​10-0-1

v10.0.0

Compare Source

Changelog: https://docs.cypress.io/guides/references/changelog#​10-0-0

v9.7.0

Compare Source

Released 5/23/2022

Features:

  • The Electron version and shipped Chromium browser version has been updated.
    Addressed in #​21418.

Deprecations:

  • The Cypress.Cookies.preserveOnce() and Cypress.Cookies.defaults() Cypress
    APIs have been deprecated. In a future release, support for
    Cypress.Cookies.preserveOnce() and Cypress.Cookies.defaults() will be
    removed. Consider using the experimental
    cy.session() command instead to cache and restore
    cookies and other sessions details between tests. Fixed
    #​21333.

Bugfixes:

  • Updated the cy.contains() command to correctly
    error and retry if the provided regex pattern begins with an equal sign and a
    match was not initially found. Previously the command would incorrectly fail
    with a syntax error. Fixed
    #​21108.
  • Corrected the cy.session() command log grouping and validation verbiage.
    This change provides better insights to logs associated with the command.
    Fixed #​21377.
  • Removed eventemitter2 third-party type definitions from cy and Cypress
    that were unintentionally exposed. Fixed
    #​20556.

Dependency Updates:

  • Upgraded the bundled node version shipped with Cypress from 16.5.0 to
    16.13.2. Addressed in
    #​21418.
  • Upgraded the Chromium browser version used during cypress run and when
    selecting Electron browser in cypress open from 94.0.4606.81 to
    100.0.4896.75. Addressed in
    #​21418.
  • Upgraded electron dependency from 15.5.1 to 18.0.4. Addressed in
    #​21418.

v9.6.1: 9.6.1

Compare Source

Released 5/9/2022

Bugfixes:

  • Cypress can now launch on systems where Firefox is installed via Snapcraft.
    Fixed #​19793.
  • Updates were made to ensure XHR calls are properly displaying the response
    body in the command log. Fixed
    #​21361.
  • Fixed cy.contains() and
    .should('contain', ...) to handle finding text that
    contains backslash characters. Fixed
    #​19116
  • Updated .type('{enter}') to support sending the Enter
    keystroke to submit buttons that are not rendered within a form html element,
    but are associated with a form via the form attribute. Fixed
    #​21163.
  • Fixed an issue with cy.session() such that re-running tests in open mode
    will now correctly recreate a session. Before this change, an error was thrown
    indicating the saved setup function was not a function because it was
    serialized. Fixed
    #​17805.

v9.6.0: 9.6.0

Compare Source

Released 4/25/2022

Features:

  • Now you can easily test multi-domain workflows by using the experimental
    cy.origin() command. This feature allows you to test
    across different origins or domains within a single test. This experiment was
    designed to work side-by-side with the cy.session()
    experimental feature. You can turn on use of this command by setting the
    experimentalSessionAndOrigin configuration
    option to true. For more details, read
    our blog post.
    Addressed #​17336 and
    #​944.
    • Added a new configuration option called experimentalSessionAndOrigin. This
      option enables support for cy.session() and
      cy.origin().
    • The experimentalSessionSupport configuration option has been removed and
      replaced by the experimentalSessionAndOrigin configuration option. Please
      update your configuration to use the new experimentalSessionAndOrigin
      option to continue to opt-in to this experimental feature.
    • When experimentalSessionAndOrigin is enabled, cross-origin requests will
      no longer immediately fail, but instead, time out based on the
      pageLoadTimeout
      configuration. This allows the request to be appropriately handled by the
      cy.origin() command.
    • When experimentalSessionAndOrigin is enabled, Cypress will no longer wait
      on page loads between hooks before moving on to the next test.

Bugfixes:

  • Fixed an issue with Firefox 98+ where the Enter keystroke was not being sent
    to an input element when using .type('{enter}'). Fixed
    #​21033.
  • We now verify if an interruption while running tests was signaled by the user
    or if it came from an error in a plugin before showing the error message.
    Fixed #​21010.
  • Improved the error message observed on Windows platforms when unzipping the
    Cypress binary and the max file length is exceeded. Fixed in
    #​21047.
  • Updated the Cypress.Commands.add() TypeScript types to better reflect the
    attributes of the .add() utility and the JQuery element, a possible previous
    subject type. #​20376.

Dependency Updates:

  • Upgraded electron dependency from 15.3.5 to 15.5.1 to consume fixes
    related to
    improve performance on
    macOS Big Sur and later. Addressed
    #​21068.

v9.5.4: 9.5.4

Compare Source

Released 4/11/2022

Bugfixes:

  • Updates were made to silence Electron warnings related to being unable to
    connect to dbus. These errors are normal and expected, and do not result in
    test failures. Because they are always present when running Electron inside
    docker containers, it has incorrectly led people to believe it is the
    root-cause of an error within their test run. By silencing these errors, it
    will improve the debug experience to allow users to focus on meaningful
    warning and error messages. Fixed
    #​19299.
  • Updates were made to ensure that all *.enable events are sent if Cypress
    becomes disconnected from the Chrome DevTools Protocol and must re-establish a
    connection to ensure all command logs are displayed to the user. This fixes an
    issue where some command logs, like download or network events, are missing
    once Cypress has disconnected and then reconnected to the Chrome DevTools
    Protocol. Fixed #​20618.
  • Fixed an issue where cy.type('{enter}') was not sending the Enter key for
    Firefox v98+. This was not an issue with Firefox v97 and below. Fixed
    #​20562.
  • Fixed a regression in 9.3.0 where glob
    patterns provided to the --spec CLI parameter was incorrectly splitting the
    patterns in unexpected places when it should have split on commas. Fixes
    #​20794.
  • Fixed an issue with cy.root() to respect the
    timeout option passed to the command.
    Previously, when the timeout option was provided, it was ignored and the
    default timeout was used. Fixed
    #​19985.
  • Updates were made to decrease the length of the Cypress cache path for Windows
    to ensure
    installing pre-release versions
    of the Cypress binary are within the maximum path length of 260 characters.
    Fixed in #​20961.
  • Fixed a regression in 8.6.0 which
    prevented .pause() from correctly executing when passing the
    --headed --no-exit CLI flags to cypress run. Fixed
    #​20745.
  • Fixed a regression in 9.2.0 which would
    sometimes throw an expected error on navigation with cy.back() and
    cy.go(). Fixed #​19749
    and #​20539.
  • Corrected the Typescript type for a cookie which was incorrectly typed as
    any when the correct type is Cookie. Fixed in
    #​20513.
  • Added the missing Cypress.Command.addAll() Typescript types. Fixed
    #​18886.
  • Fixed an uncommon error observed in cy.session() where an error was thrown
    when no cookies had been set for the session and the user clicks the session
    command log to view additional details in the DevTools console. Fixed in
    #​20946.

Misc:

  • A minor visual update was made to the cy.session() command log visuals.
    Fixed #​20433.

Dependency Updates:

  • Upgraded ansi-regex dependency from 4.1.0 to 4.1.1 to address the
    CVE-2021-3807 NVD security
    vulnerability. Addressed in
    #​20807.
  • Upgraded plist dependency from 3.0.4 to 3.0.5 to address the
    CVE-2022-22912 NVD security
    vulnerability. Addressed in
    #​20808.

v9.5.3: 9.5.3

Compare Source

Released 3/28/2022

Bugfixes:

  • Corrected a logging issue with cy.intercept() where the response status code
    and response body were sometimes missing from the log details in open mode.
    Fixed #​18757.
  • Fixed an issue in cy.readFile() where the command would not retry or provide
    a meaningful error message if null encoding was used and the file was not
    found. Fixed #​20683.
  • Updated the Cypress Keyboard shortcuts to only run the shortcut when the
    pressed shortcut key was not used in conjunction with either the alt,
    ctrl, or shift modifier keys. This fixed an issue where the Cypress
    shortcut handler would override the browser native keyboard shortcut for
    search (ctrl + f). Fixed
    #​20222.
  • Updates were made to correctly escape dollar signs in the
    CYPRESS_DOWNLOAD_PATH_TEMPLATE environment variable. Issues were seen
    utilizing this template when the env was provided from a package manager file.
    Fixed #​19914.
  • Fix the Cypress.Buffer TypeScript type to reference the static constructor
    of Buffer, instead of incorrectly referencing the Buffer instance which
    caused Type errors. Fixes
    #​20542.

Dependency Updates:

  • Upgraded electron dependency from 15.3.4 to 15.3.5 to address the
    CVE-2022-21718 NVD security
    vulnerability. Addressed in
    #​20750.
  • Upgraded minimist dependency from 1.2.5 to 1.2.6. Addressed in
    #​20756.
  • Upgraded nanoid dependency from 3.1.20 to 3.1.31 to address the
    CVE-2021-23566 NVD security
    vulnerability. Addressed in
    #​20726.
  • Upgraded node-forge dependency from 1.0.0 to 1.3.0 to address the
    CVE-2022-24771 NVD security
    vulnerability. Addressed in
    #​20727.

v9.5.2: 9.5.2

Compare Source

Released 3/14/2022

Bugfixes:

  • Fixed an issue with .type() where click events could be fired on the
    incorrect target element because the target focus changed within a key-down
    event handler callback. Fixed in
    #​20525.
  • Fixed a regression in 9.5.0 where ANSI
    colors were not removed from the FireFox warning message about the
    chromeWebSecurity configuration option having no effect on the Firefox
    browser. Fixes #​20496.
  • Updates were made to the pre-release build setup such that Cypress will use a
    unique cache folder for each
    pre-release installation
    on a machine. This removes the need to run cypress clear cache before
    installing a new pre-release version of Cypress or before installing a new
    released version of Cypress after a pre-release version had been installed.
    Addressed in #​20296.

Misc:

  • Updates were made to explicitly disable the Origin-Agent-Cluster header for
    proxied responses to ensure document.domain can continue to be set with
    Chrome v106+. This was necessary because Chrome is planning to make
    document.domain immutable
    in v106+ to relax the same-origin policy by interpreting the
    Origin-Agent-Cluster as true, whereas it is currently interpreted as
    false. Addresses
    #​20147.

Dependency Updates:


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

Release notice breaking change

E2E package now exports a base config file as well as a support file. In order to have cypress running in your plugin there are some changes that you need to do.

  1. Add dev dependency ts-loader. yarn add -D ts-loader
  2. Change the the scripts in package.json to
    "e2e": "cypress run",
    "e2e:open": "cypress open",
    "e2e:update": "cypress run --env UPDATE_SCREENSHOTS=1",
  1. Create a cypress.config.ts. Add any of your custom config to this.
import conf from '@grafana/e2e/cypress.config.js';
import { defineConfig } from 'cypress';

export default defineConfig({
  ...conf,
  e2e: {
    ...conf.e2e,
    specPattern: 'cypress/integration/**/*.spec.ts',
  },
});
  1. Create a support file in cypress/support/e2e.ts with a content below.
import '@grafana/e2e/cypress/support';
  1. Change the tsconfig.json under the cypress directory to
{
  "compilerOptions": {
    "target": "es5",
    "lib": ["es5", "dom"],
    "types": ["cypress", "node"]
  },
  "include": ["**/*.ts"]
}

Cypress also had breaking changes, please see the Migration Guide for the changes.

@renovate renovate bot requested a review from a team as a code owner December 9, 2022 17:49
@renovate renovate bot requested review from kaydelaney and removed request for a team December 9, 2022 17:49
@renovate renovate bot added area/frontend dependencies Pull requests that update a dependency file no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes labels Dec 9, 2022
@renovate renovate bot requested a review from a team as a code owner December 12, 2022 17:57
@renovate renovate bot requested review from yaelleC and JoaoSilvaGrafana and removed request for a team December 12, 2022 17:57
@ashharrison90 ashharrison90 requested a review from a team December 13, 2022 15:39
@grafanabot grafanabot added the type/ci Tasks related to Continuous Integration workflow label Dec 13, 2022
@zoltanbedi zoltanbedi added this to the 9.4.0 milestone Jan 13, 2023
@zoltanbedi
Copy link
Member

zoltanbedi commented Jan 13, 2023

Here are my changes:

  • Upgrade Cypress to latest version 12.3.0
  • Changed some uses of within in a test where it was necessary. See the migration guide for more details
  • integrationFolder and testFiles options are removed and specPattern is used in the future for finding test files
  • cypress.json is not supported anymore and the config file should be either a js or ts file. I wanted to have ts file but failed because of yarn v3 see the issue here Cannot consume ES module based cypress config when using Yarn 3  cypress-io/cypress#22747
    So I went with a js config and because of this I had to convert the files under benchmark to js as well.
  • The plugins file is not supported anymore and anything that was in plugins/index.js moved to cypress.config.js See the guide about it. Moved every plugin except the extendConfig not sure if it is used anymore.

Wanted to verify if it is still working with plugins but sadly no. We are blocked by
cypress-io/cypress#23616 Support file from node_modules are not supported, because of this test fails by not finding the logsToConsole function.

@grafanabot
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 2 weeks if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@grafanabot grafanabot added the stale Issue with no recent activity label Mar 24, 2023
@jackw
Copy link
Contributor

jackw commented Jun 20, 2023

@zoltanbedi apologies for not getting back to you sooner. OK, if it's not possible we're gonna have to do a bit of magic in create-plugin then I think to help plugin devs migrate to the new and shiny. I've opened an issue here to support this work.

@gtk-grafana
Copy link
Contributor

Hey! So I'm blocked from running any cypress tests locally because of the emulation on apple silicon pre 10.2.0.
I created this lil' PR and while my tests are still flaking locally, they flake in about 1/3 the time. #70772

Tl;DR if v12 is a breaking change can we just update to v10.20?

@academo academo marked this pull request as draft July 13, 2023 15:03
@github-actions
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 2 weeks if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions bot added the stale Issue with no recent activity label Aug 13, 2023
@github-actions
Copy link
Contributor

This pull request has been automatically closed because it has not had activity in the last 2 weeks. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions bot closed this Aug 27, 2023
@guicaulada guicaulada modified the milestones: 10.1.x, 10.1.1 Aug 29, 2023
@zerok zerok removed this from the 10.1.1 milestone Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add to changelog area/backend area/frontend breaking change Relevant for changelog generation dependencies Pull requests that update a dependency file enterprise-ok no-backport Skip backport of PR stale Issue with no recent activity type/ci Tasks related to Continuous Integration workflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants