vscode-dbt-power-user
vscode-dbt-power-user copied to clipboard
Add integration tests for dbt integration
Describe the feature
Test dbt integration with multiple dbt versions to ensure stability
Describe alternatives you've considered
No response
Who will benefit?
No response
Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
@anandgupta42 @mdesmet @AdiGajbhiye based on my understanding, we have to test 2 aspects in the extension (please add if i am missing anything)
- loading the dbt project and verifying if all data is parsed as expected and ready to be sent to webview
- web view interactions, for example: in lineage panel, whether graph is displayed, clicking the nodes does the required action etc
We can use the proposed testing flow as here for the first aspect.
Vscode as such does not support webview testing: https://github.com/microsoft/vscode-test/issues/46#issuecomment-548589003. So as you mentioned, we can try exploring other libraries like https://github.com/redhat-developer/vscode-extension-tester/wiki/WebView, but it might be complicated to switch between frames and handling the interactions and this library is not matured enough.
I propose that we can follow regular web automation testing for webviews. Since we are using react for webviews, we can use jest and react-testing-library to test all the interactions by providing mock data for apis.
Let me know what you guys think