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

test: make tabbed dashboard a little more complex #19966

Merged
merged 4 commits into from
May 14, 2022

Conversation

ktmud
Copy link
Member

@ktmud ktmud commented May 5, 2022

SUMMARY

Update the test dashboard "Tabbed dashboard" to have more nested tabs so we can test more complex use cases.

Also updated the update_slice_ids function to use dict instead of sorted lists so that slices in position_json can be matched more correctly.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before

Xnip2022-05-05_15-02-12

After

Xnip2022-05-05_14-36-59

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

@@ -156,7 +156,6 @@ class ChartEntityResponseSchema(Schema):
slice_name = fields.String(description=slice_name_description)
cache_timeout = fields.Integer(description=cache_timeout_description)
changed_on = fields.String(description=changed_on_description)
modified = fields.String()
Copy link
Member Author

Choose a reason for hiding this comment

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

By catch, this field returns invalid strings:
Xnip2022-05-05_14-16-49

@codecov
Copy link

codecov bot commented May 5, 2022

Codecov Report

Merging #19966 (1253864) into master (bba40d7) will decrease coverage by 11.93%.
The diff coverage is 52.80%.

❗ Current head 1253864 differs from pull request most recent head 9bb5c65. Consider uploading reports for the commit 9bb5c65 to get more accurate results

@@             Coverage Diff             @@
##           master   #19966       +/-   ##
===========================================
- Coverage   66.28%   54.35%   -11.94%     
===========================================
  Files        1712     1713        +1     
  Lines       63968    64063       +95     
  Branches     6731     6734        +3     
===========================================
- Hits        42404    34820     -7584     
- Misses      19853    27532     +7679     
  Partials     1711     1711               
Flag Coverage Δ
javascript 51.24% <60.00%> (-0.04%) ⬇️
mysql ?
postgres ?
sqlite ?

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

Impacted Files Coverage Δ
...ns/plugin-chart-word-cloud/src/chart/WordCloud.tsx 0.00% <0.00%> (ø)
superset-frontend/src/SqlLab/actions/sqlLab.js 60.39% <0.00%> (ø)
...rc/SqlLab/components/ScheduleQueryButton/index.tsx 20.75% <0.00%> (ø)
superset-frontend/src/components/Select/styles.tsx 81.13% <ø> (ø)
...ontrols/AnnotationLayerControl/AnnotationLayer.jsx 74.39% <ø> (ø)
...mponents/controls/AnnotationLayerControl/index.jsx 10.16% <0.00%> (ø)
...nts/controls/DateFilterControl/DateFilterLabel.tsx 41.41% <ø> (ø)
...t-frontend/src/views/CRUD/welcome/SavedQueries.tsx 52.38% <ø> (ø)
...rontend/src/visualizations/TimeTable/TimeTable.jsx 0.00% <ø> (ø)
superset/charts/schemas.py 99.35% <ø> (ø)
... and 313 more

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 bba40d7...9bb5c65. Read the comment docs.

@ktmud ktmud force-pushed the complex-tabbed-dashboard branch from cffe0c6 to 7880782 Compare May 6, 2022 22:08
"id": "CHART-3nc0d8sk",
"meta": {"chartId": 50, "height": 50, "sliceName": "Treemap", "width": 8},
"type": "CHART",
},
Copy link
Member Author

Choose a reason for hiding this comment

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

Bycatch: this is a duplicate slice where the chart component isn't really used in the layout.

@ktmud ktmud force-pushed the complex-tabbed-dashboard branch 2 times, most recently from 21dba14 to d65f67f Compare May 7, 2022 01:10
@ktmud ktmud force-pushed the complex-tabbed-dashboard branch 2 times, most recently from ef2a103 to 80a67a3 Compare May 9, 2022 22:33
superset/examples/helpers.py Show resolved Hide resolved
superset/examples/misc_dashboard.py Outdated Show resolved Hide resolved
superset/models/dashboard.py Show resolved Hide resolved
@ktmud ktmud force-pushed the complex-tabbed-dashboard branch from 80a67a3 to e7214f8 Compare May 10, 2022 18:22
@ktmud ktmud force-pushed the complex-tabbed-dashboard branch from e7214f8 to cea3fac Compare May 11, 2022 17:04
@ktmud
Copy link
Member Author

ktmud commented May 11, 2022

@john-bodley I added an integration test for superset load_examples command. Can you take another look?

@@ -54,8 +54,7 @@ def load_examples_run(
if load_test_data:
print("Loading [Tabbed dashboard]")
examples.load_tabbed_dashboard(only_metadata)

if not load_test_data:
Copy link
Member

Choose a reason for hiding this comment

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

Ha!

@ktmud ktmud merged commit 6139057 into apache:master May 14, 2022
@john-bodley john-bodley deleted the complex-tabbed-dashboard branch June 8, 2022 05:33
philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.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 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants