OpenSearch-Dashboards icon indicating copy to clipboard operation
OpenSearch-Dashboards copied to clipboard

[VizBuilder] Increase test coverage

Open kavilla opened this issue 3 years ago • 2 comments
trafficstars

Parent task to fill in the gaps from the low initial coverage that the VisBuilder has.

Sub tasks:

  • [ ] Add unit tests to functional code where it makes sense
  • [ ] Investigate and document functional testing flow to see if they can be made easier to write and debug
  • [ ] Add missing functional test workflows

Missing unit tests

  • [ ] src/plugins/wizard/public/application/utils/get_top_nav_config.tsx
  • [ ] src/plugins/wizard/public/application/utils/validate_schema_state.ts
  • [ ] src/plugins/wizard/public/application/utils/use files
  • [ ] src/plugins/wizard/public/application/components/data_tab/utils/get_available_fields.ts

Missing functional tests

  • [ ] Save workflow
  • [ ] View on dashboards
  • [ ] Edit from dashboards
  • [ ] Create from dashboards: https://github.com/opensearch-project/OpenSearch-Dashboards/issues/2458 https://github.com/opensearch-project/OpenSearch-Dashboards/issues/2460
  • [ ] Edit from Visualization listing
  • [ ] Metric tests
  • [ ] Bar chart tests
  • [ ] Line chart tests
  • [ ] Area Chart tests
  • [ ] Drag and Drop test
  • [ ] Change datasource

kavilla avatar Sep 16 '22 18:09 kavilla

[Follow-up]: Negative code coverage? Maybe we should have a rule if negative code coverage point to new functional tests.

[Follow-up 2]: Is there another way to calculate coverage accurately from a functional tests view point.

kavilla avatar Sep 16 '22 18:09 kavilla

See also:

  • https://github.com/opensearch-project/OpenSearch-Dashboards/issues/1884
  • https://github.com/opensearch-project/OpenSearch-Dashboards/issues/1885

joshuarrrr avatar Sep 22 '22 17:09 joshuarrrr

Save workflow is blocked by https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2627#issuecomment-1292841626. Will track adding a test workflow as a part of that separately. Closing this issue in the meantime.

ashwin-pc avatar Jan 13 '23 01:01 ashwin-pc