vscode-dbt-power-user icon indicating copy to clipboard operation
vscode-dbt-power-user copied to clipboard

Add integration tests for dbt integration

Open mdesmet opened this issue 2 years ago • 1 comments

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!

mdesmet avatar Jul 25 '23 12:07 mdesmet

@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

saravmajestic avatar Dec 08 '23 10:12 saravmajestic