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

chore: upgrade Cypress to 6.2.1 #12605

Merged
merged 10 commits into from
Jan 25, 2021
Merged

chore: upgrade Cypress to 6.2.1 #12605

merged 10 commits into from
Jan 25, 2021

Conversation

ktmud
Copy link
Member

@ktmud ktmud commented Jan 19, 2021

SUMMARY

Upgrade Cypress to 6.2.1 with some required refactoring:

  1. Remove readResponseBlob since the new cy.intercept(..) API already reads JSON responses automatically.
  2. Remove verifyResponseCodes since it's very unlikely that we get an incorrect status code yet still receive the correct response.
  3. Add a FormData parser since request.body is no longer a native FormData object
  4. Replace a couple of .should('not.visible') to .should('not.exist') because Cypress will now throw errors for elements that do not exist.

Upgrading since I wanted to add more tests for time-series table and box plot viz.

Reference: Cypress's official migration guide

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A

TEST PLAN

CI must pass

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

@codecov-io
Copy link

codecov-io commented Jan 19, 2021

Codecov Report

Merging #12605 (06895a4) into master (0fed1e0) will decrease coverage by 0.15%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #12605      +/-   ##
==========================================
- Coverage   66.83%   66.68%   -0.16%     
==========================================
  Files        1022     1022              
  Lines       49994    49994              
  Branches     4892     5023     +131     
==========================================
- Hits        33412    33336      -76     
- Misses      16457    16533      +76     
  Partials      125      125              
Flag Coverage Δ
cypress 50.93% <ø> (+0.01%) ⬆️
javascript 61.34% <ø> (ø)
python 63.72% <ø> (-0.26%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset/db_engines/hive.py 0.00% <0.00%> (-85.72%) ⬇️
superset/db_engine_specs/hive.py 73.84% <0.00%> (-17.31%) ⬇️
superset/views/database/mixins.py 80.70% <0.00%> (-1.76%) ⬇️
...set-frontend/src/dashboard/util/getDropPosition.js 92.06% <0.00%> (-1.59%) ⬇️
superset/db_engine_specs/presto.py 81.38% <0.00%> (-0.87%) ⬇️
superset/models/core.py 88.04% <0.00%> (-0.55%) ⬇️
...rontend/src/visualizations/FilterBox/FilterBox.jsx 71.77% <0.00%> (+0.61%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0fed1e0...17e78bf. Read the comment docs.

@ktmud ktmud force-pushed the upgrade-cypress branch 3 times, most recently from ded2f44 to fc12c74 Compare January 21, 2021 20:35
@ktmud ktmud marked this pull request as ready for review January 22, 2021 01:40
@ktmud ktmud marked this pull request as draft January 22, 2021 02:10
@ktmud ktmud marked this pull request as ready for review January 22, 2021 08:24
@ktmud ktmud requested a review from villebro January 22, 2021 08:24
@@ -98,7 +100,7 @@ describe('Visualization > Table', () => {
});
cy.verifySliceSuccess({
waitAlias: '@getJson',
querySubstring: /groupby.*name/,
querySubstring: /group by.*name/i,
Copy link
Member Author

Choose a reason for hiding this comment

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

Previously this check also fails, but it doesn't report as an error.

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

OH wow, so much cleaner!

Comment on lines -180 to +149
op: 'IN',
val: ['South Asia'],
op: '==',
val: 'South Asia',
Copy link
Member

Choose a reason for hiding this comment

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

I'm surprised this (and the others below) even worked before?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think previously Cypress will just let this expect check in wait.then(...) pass even if it fails.

@apache apache deleted a comment Jan 25, 2021
@ktmud ktmud merged commit 29ad78e into apache:master Jan 25, 2021
@ktmud ktmud deleted the upgrade-cypress branch January 25, 2021 23:05
amitmiran137 pushed a commit to nielsen-oss/superset that referenced this pull request Jan 26, 2021
* master: (52 commits)
  docs: Updates to Superset Site for 1.0 (apache#12626)
  test(native-filters): scoping tree in native filters modal (apache#12655)
  Fix tests errors and warnings - iteration 3 (apache#12212) (apache#12219)
  Fix tests errors and warnings - iteration 5 (apache#12212) (apache#12224)
  Fix tests errors and warnings - iteration 6 (apache#12212) (apache#12227)
  feat(native-filters): apply scoping of native filters to dashboard (apache#12716)
  Fix tests errors and warnings - iteration 4 (apache#12212) (apache#12223)
  Fix tests errors and warnings - iteration 7 (apache#12212) (apache#12245)
  fix: missing select menu background (apache#12759)
  fix(explore): incorrect missing datasource condition (apache#12758)
  feat: default timepicker to last week when dataset is changed (apache#12609)
  feat(explore): allow opening charts with missing dataset (apache#12705)
  chore: upgrade Cypress to 6.2.1 (apache#12605)
  refactor(explore): Enhance Dataset and Control panel Collapse components (apache#12218)
  feat: Adding option to set_database_uri CLI command (apache#12740)
  docs: Fixed typo on line 348 (apache#12739)
  Fix tests errors and warnings - iteration 2 (apache#12212) (apache#12214)
  docs: Remove gatsby-plugin-offline (apache#12693)
  test: oracle engine spec (apache#12615)
  test: hive db engine spec (apache#12520)
  ...
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.2.0 labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XXL 🚢 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants