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: Add Cypress tests for drill by #23849

Merged
merged 10 commits into from
Apr 28, 2023
Merged

Conversation

kgabryje
Copy link
Member

SUMMARY

Tested flows:

  • opening the drill by modal -> further drilling -> undo drilling for each supported chart
  • open Table view in drill by modal
  • verify that Edit chart button URL is correct
  • breadcrumbs content
  • metadata bar is present

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Apr 27, 2023

Codecov Report

Merging #23849 (9578c68) into master (053dca1) will increase coverage by 0.00%.
The diff coverage is 83.33%.

❗ Current head 9578c68 differs from pull request most recent head 4fb0643. Consider uploading reports for the commit 4fb0643 to get more accurate results

@@           Coverage Diff           @@
##           master   #23849   +/-   ##
=======================================
  Coverage   68.11%   68.11%           
=======================================
  Files        1938     1938           
  Lines       74958    74970   +12     
  Branches     8141     8141           
=======================================
+ Hits        51055    51065   +10     
- Misses      21824    21826    +2     
  Partials     2079     2079           
Flag Coverage Δ
hive 53.01% <ø> (ø)
mysql 78.80% <ø> (ø)
postgres 78.87% <ø> (ø)
presto 52.92% <ø> (ø)
python 82.67% <ø> (ø)
sqlite 77.39% <ø> (ø)
unit 52.81% <ø> (ø)

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

Impacted Files Coverage Δ
...tend/src/components/Chart/DrillBy/DrillByChart.tsx 100.00% <ø> (ø)
.../components/Chart/DrillBy/useDisplayModeToggle.tsx 100.00% <ø> (ø)
...c/components/Chart/DrillBy/useResultsTableView.tsx 100.00% <ø> (ø)
superset/examples/supported_charts_dashboard.py 0.00% <ø> (ø)
...tend/src/components/Chart/DrillBy/DrillByModal.tsx 74.13% <75.00%> (+0.06%) ⬆️
superset-frontend/src/logger/LogUtils.ts 97.14% <100.00%> (+0.36%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -61,7 +61,7 @@
HIVE_POLL_INTERVAL = 0.1

SQL_MAX_ROW = 10000
SQLLAB_CTAS_NO_LIMIT = True # SQL_MAX_ROW will not take affect for the CTA queries
SQLLAB_CTAS_NO_LIMIT = True # SQL_MAX_ROW will not take effect for the CTA queries
Copy link
Member

Choose a reason for hiding this comment

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

😃

cy.intercept('/api/v1/chart/data*').as(alias);
};

const interceptLegacyChartData = () => {
Copy link
Member

Choose a reason for hiding this comment

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

I think for this you can import the existing interceptExploreJson from explore/utils.ts

};

const interceptFormDataKey = () => {
cy.intercept('/api/v1/explore/form_data').as('formDataKey');
Copy link
Member

@geido geido Apr 28, 2023

Choose a reason for hiding this comment

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

For these other interceptors, it would be good to place them in the utils. For example, if this request happens only in the dashboard, we could put them in dashboard/utils for reusability

});
};

const setTopLevelTab = (tabName: string) => {
Copy link
Member

Choose a reason for hiding this comment

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

I think we have this already in drilltodetail tests. Should it be moved to the utils?

]);
});

it.only('Mixed Chart', () => {
Copy link
Member

Choose a reason for hiding this comment

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

Ops only here

@kgabryje
Copy link
Member Author

Thanks for comments @geido! All addressed

@kgabryje kgabryje merged commit 60046ca into apache:master Apr 28, 2023
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.0.0 labels Mar 13, 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/XL 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants