-
Notifications
You must be signed in to change notification settings - Fork 16
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
chore(cypress): update to v13 #1466
Conversation
eea976f
to
9638bc7
Compare
Passing run #3339 ↗︎
Details:
Review all test suite changes for PR #1466 ↗︎ |
9638bc7
to
7cecb00
Compare
🚀 Deployed on https://pr-1466--dhis2-ui.netlify.app |
See also this PR btw, where I also upgraded to cypress v12: dhis2/scheduler-app#484 |
c0b9509
to
30ab769
Compare
components/select/src/single-select/features/duplicate_option_values/index.js
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks good to me, I think Ismay's points are the most important to address, especially upgrading to v13 instead since it shouldn't be a lot of extra effort, and no point doing all of this and still be a version behind.
In the PR description, I would just add a link to badeball/cypress-cucumber-preprocessor#689 and badeball/cypress-cucumber-preprocessor#821 to give a bit of context to why the changes were necessary, for anyone passing by this PR after us.
} | ||
|
||
Cypress.Commands.overwrite('find', find) | ||
Cypress.Commands.overwriteQuery( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you know why did we create this overwrite in the first place? seems a bit obscure/non-standard .. are we actively relying on it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an old and also used to be in our utility libraries. We then decided that this is not a good approach and ditched it. It's still in this lib though and could (should) be removed. But that's outside of the scope of this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll create a ticket for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -28,30 +28,32 @@ | |||
"scripts": { | |||
"setup": "./scripts/setup.js", | |||
"build": "./scripts/build-world.sh", | |||
"build:legacy": "NODE_OPTIONS=--openssl-legacy-provider ./scripts/build-world.sh", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to keep a separate :legacy
step in practice? What's the implication on consumers if we update the main steps with NODE_OPTIONS=...
and make it clear we support node 20+ LTS (with a breaking change)
If anything, for me, it's the original ones that need a :legacy
suffix since they're needed for legacy out of life versions of node
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just temporary and will be removed once we merge the storybook PR
|
||
- uses: c-hive/gha-yarn-cache@v1 | ||
- run: | | ||
yarn install --frozen-lockfile | ||
yarn setup | ||
NODE_OPTIONS=--openssl-legacy-provider yarn setup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't it be more consistent to add NODE_OPTIONS=--openssl-legacy-provider
as a an env variable applying to all the steps? and we get rid of it, once webpack/storybook is upgraded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment above
cf8351e
to
e390c5b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks good to me - happy for it to be merged once the remaining tests are updated, then can tackle story book after.
988a4fd
to
8b47655
Compare
…al "run all specs"
1363472
to
e1d1c1e
Compare
Description
We're still using cypress@^8, although our tooling has been upgraded to use v12 quite some time ago
Known issues
For some reasonimport '../common/index.js
doesn't work. It does work after changing it torequire('../common/index.js)
.I can't explain it yet because other import statements work just fine.
(Issue has been adressed)
How to review
Most files haven't changed except for import statements, these can be ignored.
Out of the 325 touched files, only the following 49 files have changes other than import-related changes (list of files further down).
There are two reasons why I had to touch so many feature files:
And
orBut
, so I had to change all occurrences ofAnd
toGiven
/When
/Then
. (see DeprecateAnd
andBut
functions for step definitions badeball/cypress-cucumber-preprocessor#821)TheBrainFamily/cypress-cucumber-preprocessor
badeball/cypress-cucumber-preprocessor#689)The config files and files I had to modify for the above reasons are:
.cypress-cucumber-preprocessorrc.json
.github/workflows/dhis2-preview-pr.yml
.github/workflows/dhis2-verify-lib.yml
collections/forms/i18n/en.pot
components/alert/src/alert-bar/features/api/hidden_callback.js
components/alert/src/alert-bar/features/api/index.js
components/alert/src/alert-bar/features/api/prop_message.js
components/alert/src/alert-bar/features/api/props_message.js
components/alert/src/alert-bar/features/api/props_permanent.js
components/alert/src/alert-bar/features/common/index.js
components/alert/src/alert-bar/features/hide/automatically.js
components/alert/src/alert-bar/features/hide/index.js
components/alert/src/alert-bar/features/hide/on_action.js
components/button/src/split-button/features/accepts_icon/index.js
components/calendar/src/features/supports_calendar_clear_button/supports_calendar_clear_button.js
components/calendar/src/features/supports_ethiopic_calendar/supports_ethiopic_calendar.js
components/calendar/src/features/supports_gregorian_calendar/supports_gregorian_calendar.js
components/calendar/src/features/supports_nepali_calendar/supports_nepali_calendar.js
components/header-bar/src/__e2e__/stories/common.js
components/header-bar/src/__e2e__/stories/modulesWithSpecialCharacters.js
components/header-bar/src/features/the_headerbar_can_display_online_status/the_headerbar_displays_online_status.js
components/header-bar/src/features/the_headerbar_contains_a_menu_to_all_apps/the_menu_is_closed_by_default.js
components/header-bar/src/features/the_headerbar_contains_a_profile_menu/the_user_can_log_out.js
components/header-bar/src/features/the_search_should_escape_regexp_character/the_user_searches_for_an_app_with_a_regex_character.js
components/organisation-unit-tree/src/__e2e__/common.js
components/organisation-unit-tree/src/__e2e__/get-organisation-unit-data.js
components/organisation-unit-tree/src/__e2e__/namespace.js
components/organisation-unit-tree/src/features/controlled_expanded/index.js
components/organisation-unit-tree/src/features/path_based_filtering/index.js
components/organisation-unit-tree/src/features/single_selection.feature
components/organisation-unit-tree/src/features/single_selection/index.js
components/organisation-unit-tree/src/features/sub_unit_as_root/index.js
components/select/src/multi-select/features/accepts_max_height/index.js
components/select/src/multi-select/features/allows_selecting/index.js
components/select/src/multi-select/features/can_be_disabled/index.js
components/select/src/single-select/features/accepts_max_height/index.js
components/select/src/single-select/features/duplicate_option_values/index.js
components/tooltip/src/features/scrolling_containers/index.js
components/transfer/src/features/disabled-transfer-buttons/index.js
components/transfer/src/features/reorder-with-buttons/index.js
components/transfer/src/features/transferring-items/index.js
cypress-cucumber-preprocessor.config.js
cypress.config.js
cypress.json
cypress/plugins/index.js
cypress/support/e2e.js
cypress/support/find.js
cypress/support/get.js
package.json
Checklist
[ ] API docs are generated[ ] Tests were added[ ] Storybook demos were addedNone of the above is relevant for this PR