AAfghahi commented on pull request #13624: URL: https://github.com/apache/superset/pull/13624#issuecomment-801169131
@eschutho I was thinking about what the most effective way of testing that expanded is true when a table is added. I decided that checking the reducer would be the most effective way of making sure that when the action is taken, that the new table has an expanded value of true. Is this the correct thinking? Or should I be testing sqlLab action as well? In the latter case, looking through https://redux.js.org/recipes/writing-tests says that I should be importing the reducer and checking it (that's why I decided to just test the reducer itself). Am I thinking of this correctly? Lastly --long note sorry-- I was thinking about testing the functionality of adding a column. Currently, I wrote an RTL test that checks to make sure that a table with expanded = true is shown in the document. I wanted to add a test that tests the functionality of clicking the element (though there is a spec written for the Collapse panel component that checks this, so maybe not necessary). Also, I wanted to write a test that has you adding a table and that should come in expanded. The problem that I ran into here was that I think that I'd have to write a dataset/schema/table combination and then have fetchMocks that adds them to initial state? Does that sound correct? Would the test reside in SqlLeftEditor bar? Is this test necessary? ahh sorry for the note, been thinking about this a lot. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
