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: Adds tests to the PublishedStatus component #13892

Merged

Conversation

michael-s-molina
Copy link
Member

SUMMARY

Adds tests to the PublishedStatus component.

TEST PLAN

1 - Execute PublishedStatus tests
2 - All tests should pass

@rusackas @junlincc

ADDITIONAL INFORMATION

  • Has associated issue:
  • 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 Mar 31, 2021

Codecov Report

Merging #13892 (65a6cae) into master (d54cc6d) will decrease coverage by 0.07%.
The diff coverage is 42.85%.

❗ Current head 65a6cae differs from pull request most recent head 8fcb7fa. Consider uploading reports for the commit 8fcb7fa to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #13892      +/-   ##
==========================================
- Coverage   77.55%   77.48%   -0.08%     
==========================================
  Files         935      935              
  Lines       47301    47319      +18     
  Branches     5907     5907              
==========================================
- Hits        36685    36665      -20     
- Misses      10472    10510      +38     
  Partials      144      144              
Flag Coverage Δ
cypress 56.02% <ø> (-0.01%) ⬇️
javascript 63.76% <ø> (+0.03%) ⬆️
presto ?

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

Impacted Files Coverage Δ
...src/dashboard/components/PublishedStatus/index.jsx 100.00% <ø> (ø)
superset/viz.py 55.90% <25.00%> (-0.17%) ⬇️
superset/examples/big_data.py 35.00% <40.00%> (+1.66%) ⬆️
superset/tasks/async_queries.py 91.07% <62.50%> (-4.93%) ⬇️
superset/db_engine_specs/presto.py 82.84% <0.00%> (-5.86%) ⬇️
superset/connectors/sqla/models.py 89.87% <0.00%> (-0.61%) ⬇️
superset/models/core.py 89.10% <0.00%> (-0.28%) ⬇️

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 d54cc6d...8fcb7fa. Read the comment docs.

expect(await screen.findByText(tooltip)).toBeInTheDocument();
expect(savePublished).not.toHaveBeenCalled();
userEvent.click(screen.getByText('Published'));
expect(savePublished).toHaveBeenCalledTimes(1);
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice! (2)

expect(await screen.findByText(tooltip)).toBeInTheDocument();
expect(savePublished).not.toHaveBeenCalled();
userEvent.click(screen.getByText('Draft'));
expect(savePublished).toHaveBeenCalledTimes(1);
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

Copy link
Member

@geido geido left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

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

LGTM!

@rusackas rusackas merged commit a0a00e6 into apache:master Apr 2, 2021
lyndsiWilliams pushed a commit to preset-io/superset that referenced this pull request Apr 7, 2021
allanco91 pushed a commit to allanco91/superset that referenced this pull request May 21, 2021
@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 test:component 🚢 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants