-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
test(maximize-chart): Add tests to maximize chart action #14371
Conversation
� Conflicts: � superset-frontend/src/dashboard/util/getPermissions.ts
Codecov Report
@@ Coverage Diff @@
## master #14371 +/- ##
==========================================
+ Coverage 77.18% 77.22% +0.04%
==========================================
Files 954 954
Lines 48134 48198 +64
Branches 5985 6004 +19
==========================================
+ Hits 37151 37220 +69
+ Misses 10786 10781 -5
Partials 197 197
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
superset-frontend/src/dashboard/components/SliceHeaderControls/index.jsx
Outdated
Show resolved
Hide resolved
superset-frontend/src/dashboard/components/gridComponents/ChartHolder.test.tsx
Outdated
Show resolved
Hide resolved
it('toggle full size', async () => { | ||
renderWrapper(); | ||
// @ts-ignore | ||
let chart = screen.getByTestId('slice-container')?.firstChild?.style; |
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.
You can use the !
(exclamation) to indicate to typescript that chart
will not be null
. So you don't need to add the ?
(question mark) every time chart
is involved.
let chart = screen.getByTestId('slice-container')?.firstChild?.style!; <-- exclamation here
I think it would also be nice to rename chart
to chartStyle
.
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.
converted it to HTMLElement
to get style property for TS
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.
LGTM
* master: (38 commits) refactor(native-filters): allow cascading only for filter_select (apache#14441) test(maximize-chart): Add tests to maximize chart action (apache#14371) fix: fixing mysql error message (apache#14416) feat: Logic added to limiting factor column in Query model (apache#13521) change relationship (apache#14435) fix: bootstrap data permissions (apache#14348) fix: parse simple string error message values (apache#14360) chore: add stack trace to all calls of logger.error (apache#14382) update README with new docs and recordings (apache#14432) Renamed impyla from implya in impala.mdx and Renamed PIP package impyla from impala in index.mdx (apache#14425) fix(native-filters): fix filter scope error (apache#14426) feat: Adding limiting_factor column to Query model (apache#14234) feat: Add etag caching to dashboard APIs (apache#14357) chore: Moves Card to the components folder (apache#14139) feat: Dynamic imports for the Icons component (apache#14318) feat: Support env vars configuration for WebSocket server (apache#14398) fix: SQLLab role permissions (apache#14372) fix(native-filters): always show filters without dataset (apache#14409) fix error getting partitionQuery from table.partition (apache#14369) refactor: Boostrap to AntD - Tabs (apache#14048) ...
* fixed FullSize charts broken #13600 * Update ChartHolder.jsx * fix:fix get permission function * test: adding tests to full screen * lint: fix lint * fix: fix CR notes * fix: fix CR notes * fix: fix CR notes Co-authored-by: toop <mytoop@163.com>
* fixed FullSize charts broken apache#13600 * Update ChartHolder.jsx * fix:fix get permission function * test: adding tests to full screen * lint: fix lint * fix: fix CR notes * fix: fix CR notes * fix: fix CR notes Co-authored-by: toop <mytoop@163.com> (cherry picked from commit 1f8de1d)
* fixed FullSize charts broken apache#13600 * Update ChartHolder.jsx * fix:fix get permission function * test: adding tests to full screen * lint: fix lint * fix: fix CR notes * fix: fix CR notes * fix: fix CR notes Co-authored-by: toop <mytoop@163.com>
* fixed FullSize charts broken apache#13600 * Update ChartHolder.jsx * fix:fix get permission function * test: adding tests to full screen * lint: fix lint * fix: fix CR notes * fix: fix CR notes * fix: fix CR notes Co-authored-by: toop <mytoop@163.com>
* fixed FullSize charts broken apache#13600 * Update ChartHolder.jsx * fix:fix get permission function * test: adding tests to full screen * lint: fix lint * fix: fix CR notes * fix: fix CR notes * fix: fix CR notes Co-authored-by: toop <mytoop@163.com>
SUMMARY
This is continue PR of:
#13986 <- need merge it first
Exit FullScreen
buttonBEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Screen.Recording.2021-04-27.at.12.30.31.mov
TEST PLAN
ADDITIONAL INFORMATION