opensearch-project / OpenSearch-Dashboards

📊 Open source visualization dashboards for OpenSearch.
https://opensearch.org/docs/latest/dashboards/index/
Apache License 2.0
1.66k stars 870 forks source link

[Vis Augmenter] Un-skip tests with temporal issues #4555

Open ohltyler opened 1 year ago

ohltyler commented 1 year ago

There are current tests that are skipped due to the snapshots failing when running in envs in different time zones. See https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/src/plugins/vis_type_vega/public/expressions/helpers.test.js#L194

These should be updated to not include a snapshot, or potentially enforce time zones when running these somehow.

kavilla commented 1 year ago

I like the first option and I do believe there is an issue open for in general to migrate away from snapshots within this repo since it makes the test too brittle based on the output. Like caniuse will output it is out of date some times and it will fail a snapshot test because the actual included the warning message with the other values. Snapshots help us writes test fast but cause issues like this.

https://github.com/opensearch-project/OpenSearch-Dashboards/issues/2329