-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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
refactor: move CTAS/CVAS field II #13877
Conversation
Codecov Report
@@ Coverage Diff @@
## master #13877 +/- ##
==========================================
+ Coverage 77.91% 78.36% +0.44%
==========================================
Files 934 934
Lines 47350 47369 +19
Branches 5941 5946 +5
==========================================
+ Hits 36894 37121 +227
+ Misses 10308 10104 -204
+ Partials 148 144 -4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
…/move-ctas-cvas-fields
@@ -480,6 +480,8 @@ export const initialState = { | |||
DEFAULT_SQLLAB_LIMIT: 1000, | |||
SQL_MAX_ROW: 100000, | |||
DISPLAY_MAX_ROW: 100, | |||
SQLALCHEMY_DOCS_URL: 'test_SQLALCHEMY_DOCS_URL', | |||
SQLALCHEMY_DISPLAY_TEXT: 'test_SQLALCHEMY_DISPLAY_TEXT', |
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.
wasn't this part of a previous PR?
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.
not sure but we wanted to update the fixture to make sure it has all the config items
// When clicked, "Expose in SQL Lab" becomes unchecked | ||
userEvent.click(exposeInSqlLab); | ||
|
||
// While unchecked, only "Expose in SQL Lab" should display |
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.
Are the comments still aligned with the code? This says unchecked, while the assertion below is checked.
expect(exposeInSqlLab).toBeChecked(); | ||
const checkboxes = screen | ||
.getAllByRole('checkbox') | ||
.filter(checkbox => !checkbox.checked); |
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.
nice
// Uncheck both "Allow CTAS" and "Allow CVAS" to hide schema field again | ||
userEvent.click(allowCTAS); | ||
// Both checkboxes go unchecked, so the field should no longer render | ||
userEvent.click(allowCVAS); |
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.
nit, but I would move this up a line with the other click to be more in line with the comments.
@hughhhh @lyndsiWilliams indeterminate checkboxes are only on this modal and the list views. The list views looked ok. I would just make sure that all of the checkboxes in the modal are passing in the label and then just do a check on updating any styles. |
aca7984
to
e9d9be7
Compare
/testenv up |
@hughhhh Ephemeral environment creation is currently limited to committers. |
5faef21
to
9febdce
Compare
/testenv up |
@hughhhh Ephemeral environment spinning up at http://54.190.134.146:8080. Credentials are |
looks great! I rebased this recently and saw that an earlier commit had a few trims on database_name in the DatabaseModal file. Do we need to add those in? |
tested in ephemeral environment, too, and it looks good. I wasn't able to test save functionality b/c of sqllite but I had tested it locally previously. |
Those changes we need are currently on the branch already, the other |
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.
Nice!
Ephemeral environment shutdown and build artifacts deleted. |
Co-authored-by: lyndsiWilliams <kcatgirl@gmail.com>
Co-authored-by: lyndsiWilliams <kcatgirl@gmail.com>
Co-authored-by: lyndsiWilliams <kcatgirl@gmail.com>
SUMMARY
Moved CTAS/CVAS Schema Field Closer to the "Allow Create Table As" In Edit Datasource Modal. This required nested conditional rendering, so I had to use some useState/useEffect in order to hold that state at a higher level for all functions to run properly.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Field before:
#### Field after:
TEST PLAN
Tests will ensure that all elements are rendered in their respectively appropriate conditions.
ADDITIONAL INFORMATION