Commit Graph

202 Commits

Author SHA1 Message Date
Andreas Christou
c34aa05548
grafana/e2e: Add ability to customise scenario config (#60646)
* Add ability to retry e2e test scenarios

* Add wait and remove retries

* Revert retry logic and elaborate on 15s wait time

* No need to update datasource name now
2022-12-22 11:07:49 -05:00
Andreas Christou
0367036108
AzureMonitor: E2E update (#60624)
* Wait for locations call to complete

* Update drone to run cloud suite on tests update
2022-12-21 16:42:24 +00:00
Ivan Ortega Alba
3e52d5e72b
Fix: Report E2E result stack trace (#60596) 2022-12-20 20:36:18 +02:00
Ashley Harrison
ba6d2f2a82
Chore: improve some more types (#60476)
* improve some more types

* fixes

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2022-12-20 13:07:57 +00:00
Giordano Ricci
785c857ec7
QueryHistory: prevent query history tests from failing if the suite is rerun (#60462)
remove all queries from query history after running suite
2022-12-19 14:21:00 +00:00
Ivan Ortega Alba
3417125553
Reporter: add logger E2E results to be queried by Loki (#58839)
Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
2022-11-29 10:59:12 +01:00
Gareth Dawson
94372f5f23
Loki: Remove raw query toggle (#59125)
* set default query expression

* always show raw query

* remove raw query title

* remove test for raw query toggle

* remove raw query toggle

* remove default expression

* hide raw query preview if empty

* remove e2e test for raw query toggle

* update test name
2022-11-23 16:07:59 +00:00
Andreas Christou
19ff3645e8
Update verify-release script (#58812)
Update verify-release script with required arg
2022-11-18 16:47:13 +00:00
Ivan Ortega Alba
766867735d
E2E: Fix flakiness for dashboard-search spec (#58950) 2022-11-18 14:55:34 +01:00
Torkel Ödegaard
20133ec6fb
Variables: Use new format registry from templateSrv (#58813)
* Variables: Use new format registry from templateSrv

* Updated comment

* Fixed e2e
2022-11-16 14:55:31 +01:00
Torkel Ödegaard
8c585a4ebf
Scene: Variables interpolation formats and multi value handling (#58591)
* Component that can cache and extract variable dependencies

* Component that can cache and extract variable dependencies

* Updates

* Refactoring

* Lots of refactoring and iterations of supporting both re-rendering and query re-execution

* Updated SceneCanvasText

* Updated name of file

* Updated

* Refactoring a bit

* Added back getName

* Added comment

* minor fix

* Minor fix

* Merge fixes

* Scene variable interpolation progress

* Merge fixes

* Added all format registeries

* Progress on multi value support

* Progress on multi value support

* Updates

* Progress on scoped vars

* Fixed circular dependency

* Updates

* Some review fixes

* Updated comment

* Added forceRender function

* Add back fail on console log

* Update public/app/features/scenes/variables/interpolation/sceneInterpolator.test.ts

* Moving functions from SceneObjectBase

* fixing tests

* Fixed e2e

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-11-16 11:36:30 +01:00
Matias Chomicki
463f993186
feat(loki-monaco-editor): update e2e test with autocomplete steps (#58455)
* feat(loki-monaco-editor): update e2e test with autocomplete steps

* Chore: replace typing method

* Test simpler POC test

* Chore: refactor test

* Chore: use selector to get the editor value
2022-11-09 13:37:00 +01:00
Matias Chomicki
25f79ef2b9
Loki: enable Monaco Query Editor by default (#58080)
* feat(loki-monaco-editor): update tests

* chore(loki): use unified datasource mock function in tests

* chore: enable monaco feature flag in tests

* feat(loki-monaco-editor): add test case for disabled feature

* feat(loki-monaco-editor): enable by default

* Revert "feat(loki-monaco-editor): enable by default"

This reverts commit 08904f94a707a4fa32aa1e7f3f0de377575a7636.

* feat(loki-monaco-editor): enable from registry

* feat(loki-monaco-editor): make feature flag frontend only
2022-11-08 10:22:40 -05:00
Andreas Christou
5cfd983cc2
AzureMonitor - E2E tests drone update (#57100)
* Update e2e command with video flag

* Add Cloud Plugins E2E tests to drone

* Update env variable names

* Add vault Azure secrets

* Update e2e steps

* Update secrets path

* Update image and rebuild drone file

* Readd drone changes

* Rebuild drone

* Remake drone

* Correct reference to secret

* Remake drone file

* Remove unneeded step

* Clear values in Arg query
2022-11-08 11:27:54 +01:00
Josh Hunt
d4e3d47f56
Chore: Disable dashboard-time-zone e2e tests (#58320) 2022-11-07 06:37:47 -05:00
Andreas Christou
7bb76e0975
Azure Monitor: E2E Tests (#54619)
* Update credentials form with data-testids and aria-labels

* Update gitignore

* Add example dashboard

* Stub out E2E test for creating ds and importing dashboard

* Add component selectors

* Remove subscription check temporarily

* Appropriately set disabled prop

* Fix lint issues

* Update to use selectors and wait on subscriptions request

* Add test for metrics panel

- Add required selectors for resource picker and metrics query editor

* Add logs and ARG basic query scenarios

- More selector updates

* Add E2E test for template variables

- Tests advanced resource picker
- Adds required selectors

* Remove log and add annotation e2e test

* Update test

* Prettier/betterer updates

- Remove gitignore change

* Lint issues

* Update betterer results

* Lint issue and remove unneeded import

* Don't print certain commands

* Avoiding flakiness

- Ensure code editor has sufficient time to load in ARG test
- Avoid flakiness around correct template variable being selected by typing in resource name

* Remove be.visible requirement

* Update test

* Update selector name

* Reuse datasource

* Fix datasource reuse and combine query tests

* Remove import dashboard step as unneeded

* Review

- Randomise datasource name
- Skip annotations test
- Remove unused example dashboard

* Update to ensure e2e test works in CI

* Update e2e test

- Update environment variables (process is not available in cypress)
- Add wait on resource picker searches to avoid flakiness
- Update subscription and resource group names

* Update CODEOWNERS

* Parse credentials in CI from outputs file

* Update outputs file path

* Fix selector

* Undo selector change

* Update e2e tests

- Set default subscription
- Fix datasource selection in variable editor
- Fix resource picker search flakiness
- Set subscription in ARG query test
- Fix resource group selection
- Update resource group

* Review

* Review 2
2022-11-04 10:47:54 +00:00
Ashley Harrison
871d98e550
hopefully improve slate test reliability (#58171) 2022-11-04 09:20:03 +00:00
Jeff Levin
6fcc5b42c0
publicdashboards: split create/update api paths (#57940)
This PR splits the create and update paths for public dashboards and includes assorted refactors toward a proper REST API. Additionally, we removed the concept of a "public dashboard config" in favor of "public dashboard" 

Co-authored-by: juanicabanas <juan.cabanas@grafana.com>
Co-authored-by: Ezequiel Victorero <ezequiel.victorero@grafana.com>
2022-11-03 11:30:12 -08:00
Jeff Levin
6b7d6fe0cb
public dashboards: rename route paths (#57787)
This PR fixes the naming of routes for public dashboards to be more accurate and descriptive.

Co-authored-by: Ezequiel Victorero <ezequiel.victorero@grafana.com>
2022-10-27 14:41:56 -08:00
Galen Kistler
f93c3acc51
Prometheus: Flavor/version configuration (#57554)
* Revert "Revert "Prometheus: Type and flavor configuration (#56496)" (#57552)"
This reverts commit 2432ce619a.
* Adds new fields and documentation for Prometheus datasource configuration: prometheus type, and version
2022-10-24 14:53:11 -05:00
Galen Kistler
2432ce619a
Revert "Prometheus: Type and flavor configuration (#56496)" (#57552)
This reverts commit 7ecbc98b3e.
2022-10-24 12:33:11 -05:00
Galen Kistler
7ecbc98b3e
Prometheus: Type and flavor configuration (#56496)
* Adding two new fields to the data JSON in the prometheus datasource configuration: prometheusType, and prometheusVersion.
* Version field will attempt to auto-detect via buildinfo API when prometheus Type is selected
2022-10-24 09:26:32 -05:00
kay delaney
ed71b7b884
Chore/React18: Remove enzyme slate tests and replace with e2e tests (#57095) 2022-10-17 16:31:59 +01:00
kay delaney
45edce90d3
VariableEditor: Use new form styles (#56326) 2022-10-12 09:43:41 +01:00
Ivan Ortega Alba
7fd613ec0d
E2E: Remove time zone scenario flackyness (#55458)
Co-authored-by: polinaboneva <polina.boneva@grafana.com>
2022-10-05 16:00:33 +03:00
Gareth Dawson
2338660a62
Loki: Add more assertions to loki-query-builder.spec.ts (#56044)
* Add more assertions to loki-query-builder.spec.ts

* Update assertions in loki-query-builder.spec.ts
2022-09-30 14:27:48 +01:00
Artur Wierzbicki
202dce66ff
Search: add basic e2e test for the folder view (#55820) 2022-09-28 09:46:24 +04:00
Ivana Huckova
c0ecdf6783
Loki: Redesign and improve query patterns (#55097)
* WIP

* WIP

* Query patterns: Redesign and improve feature

* Remove duplicated pattern

* Remove empty line

* Refactor

* Add tests

* Update docs and e2e test

* Update public/app/plugins/datasource/loki/querybuilder/LokiQueryModeller.ts

Co-authored-by: Matias Chomicki <matyax@gmail.com>

* Update public/app/plugins/datasource/loki/querybuilder/LokiQueryModeller.ts

Co-authored-by: Matias Chomicki <matyax@gmail.com>

* Update public/app/plugins/datasource/loki/querybuilder/LokiQueryModeller.ts

Co-authored-by: Matias Chomicki <matyax@gmail.com>

* Use capitalize

* Refactor to use QueryPatternsCard component

* Update public/app/plugins/datasource/loki/querybuilder/LokiQueryModeller.ts

Co-authored-by: Matias Chomicki <matyax@gmail.com>

* Update feature tracking for v2

* QueryPatternsCard: Remove unnecessary key

* Update naming for card

* Mock reportInteraction in tests

Co-authored-by: Matias Chomicki <matyax@gmail.com>
2022-09-26 14:03:13 +02:00
juanicabanas
c7419de2e5
PublicDashboard: Add RTK Query with loading and error state. Add MSW dependency for testing. (#55518)
PublicDashboard: Add RTK Query with loading and error state. Add MSW dependency for testing.
2022-09-22 09:35:04 -03:00
Ezequiel Victorero
6e99d8bba5
PublicDashboards: Add wait when fetching public dashboard data in e2e… (#55096) 2022-09-13 13:24:50 -03:00
Adela Almasan
b08f839c4d
Geomap: Map control options e2e (#54809) 2022-09-09 15:56:35 -04:00
Ezequiel Victorero
76edf1a727
PublicDashboards: Fix flaky e2e test (#54864) 2022-09-08 09:18:40 -03:00
Adela Almasan
5a3ae293cf
Geomap: Layer types e2e (#54666) 2022-09-07 13:29:03 -05:00
Adela Almasan
cea2b4b7b8
Geomap: Spatial operations location options transform e2e test (#54162) 2022-08-25 17:34:24 -04:00
Torkel Ödegaard
264645eecd
TopNav: Dashboard settings (#52682)
* Scenes: Support new top nav

* Page: Make Page component support new and old dashboard page layouts

* Pass scrollbar props

* Fixing flex layout for dashboard

* Progress on dashboard settings working with topnav

* Updated

* Annotations working

* Starting to work fully

* Fix merge issue

* Fixed tests

* Added buttons to annotations editor

* Updating tests

* Move Page component to each page

* fixed general settings page

* Fixed versions

* Fixed annotation item page

* Variables section working

* Fixed tests

* Minor fixes to versions

* Update

* Fixing unit tests

* Adding add variable button

* Restore annotations edit form so it's the same as before

* Fixed semicolon in dashboard permissions

* Fixing unit tests

* Fixing tests

* Minor test update

* Fixing unit test

* Fixing e2e tests

* fix for e2e test

* fix a11y issues

* Changing places Settings -> General

* Trying to fix a11y

* I hope this fixes the e2e test

* Fixing merge issue

* tweak
2022-08-24 18:05:12 +02:00
Ashley Harrison
0b322a0f5d
fix some anys (#53789) 2022-08-19 16:46:58 +01:00
Ivana Huckova
8813cbfb62
Loki: Update copy for missing label filter error message (#53449)
* Loki: Update copy for missing label filter

* Update
2022-08-11 17:57:10 +02:00
Alex Ratner
fecf4c41ad
Dashboard: Spelling corrections in end-user visible dialogs (#53340) 2022-08-09 10:19:30 +02:00
Ezequiel Victorero
7f43839813
Chore: disable flaky e2e test (#53408)
* Chore: disable flaky e2e test
2022-08-08 11:34:59 -04:00
Ezequiel Victorero
e0d71f02b1
Public Dashboards: add e2e tests for public dashboards (#52970) 2022-08-01 11:20:49 -03:00
Ashley Harrison
6781041860
Import: prevent recursion blowup in redux + reintroduce import e2e test (#52985)
* prevent recursion blowup in redux, attempt to reintroduce import e2e test

* try importing json like this instead?

* need the panel validation

* Update text so it finds Panel data instead of Dataframe JSON

* skip test for now
2022-08-01 12:53:31 +01:00
Connor Lindsey
83c1756251
Tracing: Send tags, events, and references as raw json (#52245)
* Tracing: Send tags, events, and references as raw json

* Update tempo fixture
2022-07-21 10:00:47 -06:00
Polina Boneva
f83f05d6b3
Variables: variables in Markdown links are not interpolated (#51392)
* on a text panel first interpolate, then markdown, then sanitize;

* update devenv dashboard + e2e tests

* fix typo and undo changes in grafana/data

* handling of config option disableSanitizeHtml more readable when preparing markdown in text panel

* betterer

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-29 15:26:31 +03:00
Ivana Huckova
60454192b7
Loki: Add e2e test for query builder (#51314)
* Loki: Add e2e test for query builder

* Update

* Update test

* Update test

* Update test

* Update test

* Add more checks in test

* Update betterer

* Update betterer
2022-06-29 11:04:27 +02:00
Ashley Harrison
94d585063e
Dashboard: Prevent non-repeating panels being dropped from repeated rows when collapsed/expanded (#50764)
* Mob: fix issue with repeating panels+rows, add e2e test

Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: polibb <polina.boneva@grafana.com>

* Fix describe block description

Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: polibb <polina.boneva@grafana.com>
2022-06-15 11:07:54 +01:00
Ashley Harrison
6fcb2cd307
remove exported test globals from test/lib/common (#50256) 2022-06-06 15:38:37 +01:00
Zoltán Bedi
f566958555
Table: Reorder panel options (#49983)
* Table: Reorder panel options

* Fix e2e selector
2022-06-01 13:11:19 +02:00
ismail simsek
c309d1876b
Add cypress type support (#49315) 2022-05-25 16:16:36 +02:00
Piotr Jamróz
f252e89339
Query History: Implement RemoteStorage methods: get all, add new (#48330)
* Load Rich History when the container is opened

* Store rich history for each pane separately

* Do not update currently opened query history when an item is added

It's impossible to figure out if the item should be added or not, because filters are applied in the backend. We don't want to replicate that filtering logic in frontend. One way to make it work could be by refreshing both panes.

* Test starring and deleting query history items when both panes are open

* Remove e2e dependency on ExploreId

* Fix unit test

* Assert exact queries

* Simplify test

* Fix e2e tests

* Fix toolbar a11y

* Reload the history after an item is added

* Fix unit test

* Remove references to Explore from generic PageToolbar component

* Update test name

* Fix test assertion

* Add issue item to TODO

* Improve test assertion

* Simplify test setup

* Move query history settings to persistence layer

* Fix test import

* Fix unit test

* Fix unit test

* Test local storage settings API

* Code formatting

* Fix linting errors

* Add an integration test

* Add missing aria role

* Fix a11y issues

* Fix a11y issues

* Use divs instead of ul/li

Otherwis,e pa11y-ci reports the error below claiming there are no children with role=tab:

Certain ARIA roles must contain particular children
   (https://dequeuniversity.com/rules/axe/4.3/aria-required-children?application=axeAPI)

   (#reactRoot > div > main > div:nth-child(3) > div > div:nth-child(1) > div >
   div:nth-child(1) > div > div > nav > div:nth-child(2) > ul)

   <ul class="css-af3vye" role="tablist"><li class="css-1ciwanz"><a href...</ul>

* Clean up settings tab

* Remove redundant aria label

* Remove redundant container

* Clean up test assertions

* Move filtering to persistence layer

* Move filtering to persistence layer

* Simplify applying filters

* Split applying filters and reloading the history

* Debounce updating filters

* Update tests

* Fix waiting for debounced results

* Clear results when switching tabs

* Improve test coverage

* Update docs

* Revert extra handling for uid (will be added when we introduce remote storage)

* Create basic plan

* Rename query history toggle

* Add list of supported features and add ds name to RichHistoryQuery object

* Clean up

Removed planned items will be addressed in upcoming prs (filtering and pagination)

* Handle data source filters

* Simplify DTO conversion

* Clean up

* Fix betterer conflicts

* Fix imports

* Fix imports

* Post-merge fixes

* Use config instead of a feature flag

* Use config instead of a feature flag

* Update converter tests

* Add tests for RichHistoryRemoteStorage

* Simplify test setup

* Simplify assertion

* Add e2e test for query history

* Remove duplicated entry

* Fix unit tests

* Improve readability

* Remove unnecessary casting

* Mock backend in integration tests

* Remove unnecessary casting

* Fix integration test

* Update betterer results

* Fix unit tests

* Simplify testing with DataSourceSrv

* Fix sorting and add to/from filtering

* Simplify testing DataSourceSettings

* Update betterer results

* Ensure previous request is canceled when getting search results

* Add loading message when results are being loaded

* Show info message only if local storage is enabled

* Fix unit test

* Reuse sort order options

* Reuse sort order options

* Fix footer spacing
2022-05-17 12:59:16 +02:00
kay delaney
bb7e556efc
Templating: Prefix variable picker element IDs (#48405) 2022-05-04 11:04:15 +02:00