Commit graph

4 commits

Author SHA1 Message Date
Kristina
914df157d6
Correlations: Add E2E tests (#119339)
* WIP

* Make transformations properties optional, create correct object for partial spec

* update the generated client type, fix logic for submission of transformations

* Update readme with what is needed for updating the client

* Move logic to utils, add test

* Add tests to increase coverage

* continue to build out test coverage

* Add tests

* Add create correlation

* WIP improve function coverage

* fix test

* wip add notification on edit

* Moving directories

* Move back as we are no longer rendering with a wrapper

* Run the generator

* Add scaffolding and reorganize tests

* WIP

* WIP

* add meta property to prevent error

* Move handler logic to support different list scenarios

* Add create scenario, turn on the tests

* fix the casing

* Cleanup

* Lint cleanup

* test files must contain tests…

* fix the import

* Move handlers out of test-utils

* empty commit

* add remaining tests from correlationspage legacy, add other endpoint scenarios

* WIP - work on fixtures

* Remove debugging garbage, turn on all tests, get editing working

* Clean up some unneeded boilerplate, consolidate fake correlation stuff

* more cleanup found by linter

* WIP - have datasources lookup actually apply to set, skip test to debug later, fix renaming requirements for datasources

* Add note about skipping provisioning tests for now and unskip this test that actually works fine

* Reorganize to simplify and remove circ dependency

* Rename directory to exclude it from code coverage test

* cleanup
2026-03-10 09:28:36 -05:00
Jesse David Peterson
374eaf5797
Tests: Bootstrapping for CI workflow to compare PR test coverage with main (#116500)
* feat(script): dasherize codeowner names for GHA safe artifact slugs

* feat(script): emit coverage summary report JSON from test runner

* feat(script): compare code coverage between a PR and main by codeowner

* feat(ci): skeleton of future workflow to compare code coverage

* chore(codeowners): the DataViz team owns now code coverage checks
2026-01-19 14:48:52 -04:00
Paul Marbach
123e46c33b
Coverage: Add some DX improvements to by codeowner script (#112673)
* Coverage: Add some DX improvements to by codeowner script

* Potential fix for code scanning alert no. 3796: Shell command built from environment values

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Potential fix for code scanning alert no. 3797: Shell command built from environment values

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* fix package.json and yarn lock

* reorder imports

* fix issue for frontend-platform: exclude files in any /test/ dir

* wip

* add ora spinner for codeowners manifest step

* cleanup

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-10-22 15:09:39 -04:00
Jesse David Peterson
70dc9a0027
Tests: Custom script to run unit tests filtered by code ownership (#111210)
* feat(script): generate a source file x teams manifest from CODEOWNERS

* feat(script): unit tests + coverage report only for files owned by team

* feat(script): calculate CODEOWNERS metadata

* refactor(script): export a pure codeowners manifest generation function

* refactor(script): export a pure test coverage by team function

* refactor(script): generate raw JSONL codeowners data from Node.js script

* feat(script): put codeowners manifest all together in one script

* refactor(scripts): group consistently with NPM script name

* refactor(scripts): deduplicate constants for file paths etc.

* refactor(scripts): make console output cute 💅

* refactor(tests): make coverage by "owner" directory more human readable

* refactor(scripts): use consistent naming "codeowner" instead of "team"

* chore(codeowners): mark DataViz as owners of scripts for now

* chore(todo): leave a note where coverage metrics should be emitted later

* fix(gitignore): ignore root codeowners-manifest directory not scripts/*

* refactor(script): rename manifest to generate for clarity

* docs(readme): add a brief README describing new scrips

* chore(linter): ignore temporary files in prettier, fix whitespace format

* refactor(script): simplify Jest config by using team files list directly

* refactor(script): simplify script, partition sourceFiles and testFiles

* refactor(script): simplify and parallelize manifest write operations

* fix(script): handle errors for JSONL line reader

* refactor(script): use Map instead of POJOs

* fix(script): handle errors when streaming raw JSONL output

* fix(script): add error handling, and use promise API for metadata check

* fix(reporter): suppress duplicate Jest CLI coverage report output

* refactor(script): simplify with fs promises API for consistency

* fix(script): error handling for cp spawn-ed process

* refactor(script): use Promise API for mkdir + exists

* refactor(script): use fs Promise API

* refactor(script): use fs Promise API

* fix(script): same allow list for sourceFilter and all Jest config rules

Co-authored-by: Paul Marbach <paul.marbach@grafana.com>

* fix(script): bust cache when new files are created also

---------

Co-authored-by: Paul Marbach <paul.marbach@grafana.com>
2025-10-07 17:07:55 -04:00