Commit Graph

66 Commits

Author SHA1 Message Date
Giordano Ricci
2a4f6ba5b0
Explore: skip flaky e2e test (#80543) 2024-01-15 12:26:34 +00:00
Brendan O'Handley
a9f4ffab5d
Prometheus: Migrate from aria-label to data-testid for selectors (#78554)
* migrate from aria-label to data-testid for selectors

* fix e2e tests with shared components

* fix e2e tests with more shared components

* pass data-testid to SelectBase component

* pass data-testid to value container and traverse the dom to access the input in e2e
2023-12-26 13:43:06 -06:00
Khushi Jain
54dc5846c2
Chore: Refactor dataviz aria-label e2e selectors to data-testid (#78938)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2023-12-17 02:10:04 +02:00
Galen Kistler
faa29db241
Logs Panel: Table UI - Pull logs table into dashboard panel (#77757)
* Allows users to add a logs table in explore to a dashboard panel via the includeByName transformation
2023-11-29 10:01:28 -06:00
Laura Fernández
e422a92eae
RadioButton: Make description appear in a Tooltip component (#78010) 2023-11-27 13:54:07 +01:00
Zoltán Bedi
22035565d2
SQL: Add timeFilter macro to query builder (#74575)
* Add timeFilter macro to query builder

* Only render SQLWhereRow when fields are there

* Change the default query to timeseries and remove 50 limit

* Add timeFilter macro for the first time when timeSeries

* Add test for timeFilter macro

* Lint fix

* Annotation query format should be table

* Set order by as default

* Revert changes that made time series default

* Fix e2e test

* Fix e2e test

* Make sure to reset the date value when operator is changed

* Add docs
2023-11-09 09:23:26 +01:00
Ashley Harrison
ffcaef9c17
Update navigation e2e tests (#77654)
update navigation e2e tests
2023-11-03 22:15:53 +02:00
Josh Hunt
ec84caf389
Navigation: Basic e2e tests for docked mega menu (#77000)
* Navigation: Basic e2e tests for docked mega menu

* give mega menu an e2e selector

* make existing tests narrower so menu doesn't default to docked. add test for auto docking at large viewport

* use new selector in nondocked menu
2023-10-24 15:56:00 +00:00
Esteban Beltran
665dc1fa44
Sandbox: e2e tests for apps running inside the frontend sandbox (#76357)
* Sandbox: Add tests for apps inside the sandbox

* Force type to prevent flawky test
2023-10-12 09:43:59 +02:00
Esteban Beltran
ac27fea5bc
Sandbox: Add basic e2e tests for datasources inside sandbox (#76226)
* Sandbox: initial dummy datasource plugin for e2e

* WIP: tests

* Add metrics to plugin.json so it shows up in explore

* Fix false positives in frontend-sandbox-datasource.spec.ts

* Change typed name to be static

* Add code to delete the datasource after tests are complete

* Add fail on status code

* Update tests for more config

* Replace visit with existing page

* Delete cleanup code
2023-10-10 16:41:20 +03:00
Zoltán Bedi
75beeeed27
E2E: Move mysql test to various suite (#75221)
* E2E: Move mysql test to various suite

* Decide command key based on platform
2023-09-29 17:14:00 +02:00
Ashley Harrison
e82e1593d8
Chore: Remove some hardcoded waits from e2e tests (#75515)
remove some hardcoded waits
2023-09-27 14:25:04 +01:00
Ashley Harrison
d8e99e2bb5
Chore: Remove more stuff from the e2e object (#75513)
* cut down the e2e object more :)

* undo changes in grafana-e2e

* couple more things to undo in grafana-e2e
2023-09-27 11:33:00 +01:00
Ashley Harrison
ba7f77f25d
Chore: remove scenario wrapping in cypress tests (#74674)
* remove scenario wrapping in cypress tests

* remove more hardcoded logins

* don't forget the various suite!

* make sure we log in for every test

* fix afterAll revert

* stability
2023-09-13 13:24:20 +01:00
Brendan O'Handley
a2e2ba695e
Prometheus: Turn new auth component feature toggle on by default (#74405)
* turn auth feature toggle on by default

* fix e2e test

* fix e2e test

* fix e2e test
2023-09-11 13:12:21 -04:00
Ashley Harrison
247d91be2b
Chore: remove wrapping of cy in the e2e object (#74650)
* remove cy. wrapping as e2e().

* make trace-view-scrolling more stable and remove waits

* improve stability more
2023-09-11 11:20:54 +01:00
Ashley Harrison
0f2f25c5d9
Chore: Move to Cypress 12 and decouple cypress from @grafana/e2e (#74084)
* update drone to use cypress 12 image

* upgrade cypress to 12 in core

* cypress config actually valid

* update @grafana/e2e imports and add lint rule

* ignore grafana-e2e from betterer now it's deprecated

* fix remaining type errors

* fix failing tests

* remove unnecessary tsconfig

* remove unnecessary comment

* update enterprise suite commands to work

* add cypress config to CODEOWNERS

* export setTimeRange in utils

* remove @grafana/e2e from core deps

* try running the command through yarn

* move CMD to scripts

* Update cloud-data-sources e2e image

* Update paths

---------

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2023-09-08 16:51:59 +01:00
Sven Grossmann
a403027608
Loki: Add backend healthcheck (#74330)
* add loki healthcheck

* remove `testDatasource` call

* remove unused error check

* change success message

* improve error messages
2023-09-05 08:59:13 +02:00
Matias Chomicki
7c098c59fd
Loki: Migrate HTTP settings to new components (#72831)
* Loki: migrate data source http settings

* Remove unused export

* Update e2e tests

* Update unit test
2023-08-14 14:42:14 +02:00
Ivana Huckova
7bb0ff7055
Loki: Introduce $__auto range variable for metric queries (#72690)
* Loki: Add  interpolation to backend

* Loki: Replace default variable  with  in frontend

* Loki: Update docs in query builder fro __auto

* Loki: Update test for change default __auto

* Loki: Remove  and  from suggestions as  should be used

* Update docs

* Update pkg/tsdb/loki/parse_query.go

* Fix backend lint

* Fix lint and test

* Update

* Update docs/sources/datasources/loki/template-variables/index.md

Co-authored-by: lwandz13 <126723338+lwandz13@users.noreply.github.com>

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

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

---------

Co-authored-by: lwandz13 <126723338+lwandz13@users.noreply.github.com>
Co-authored-by: Matias Chomicki <matyax@gmail.com>
2023-08-03 16:27:23 +02:00
Giordano Ricci
d3450d75a4
Explore: URL migrations & improved state management (#69692)
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2023-06-21 10:06:28 +01:00
Giordano Ricci
067bbcbe56
Explore: Refactor & centralize URL/state sync (#66286)
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2023-06-06 15:31:39 +01:00
Sven Grossmann
b11c264df3
Loki: Fix e2e flakiness (#69441)
fix loki e2e test flakiness by waiting for requests to finish
2023-06-02 12:35:11 +02:00
Torkel Ödegaard
ae1a85b5ad
Drawer: Position under nav & minor redesign (#67824)
* Drawer: Redesign WIP

* Fix double margin

* Teak pos

* align paddings

* Hide toolbar actions when drawer is open

* deprecate expandable

* Updated test

* remove expandable var

* Added clickaway
2023-05-05 17:00:33 +02:00
Brendan O'Handley
f70efed2cb
Prometheus: Update healthcheck text message (#67401)
* the healthcheck is used outside the config save&test so change text message

* fix e2e test
2023-04-27 15:54:12 -04:00
Adela Almasan
62587eee88
Timeseries: Update auto-migration e2e test (#67402) 2023-04-27 10:20:07 -05:00
Brendan O'Handley
0a9240aeba
Prometheus: Configuration page overhaul (#66198)
* organize layout, make design uniform, add doc link

* fix e2e test

* move overhauled config parts into prometheus code

* update tooltips with doc links

* clean component styles for section padding, top and bottom 32px

* make additional settings subsection headers h6

* use secondary gray for section descriptions

* fix merge issues

* change inlineswitch to switch only in prom settings because the other components are shared

* remove legacy formfield and input, replace with inlinefield and input from grafana-ui

* find more formfield and UI design fixes like changing inlineformlabel to inlinefield

* remove unused inline form label

* replace legacy duration validations with <FieldValidationMessage>

* fix styles secondary gray from theme

* change language, headings and datasource -> data source

* update alert setting styles with new component

* update prom url heading and tooltip

* update default editor tooltip and set builder as default editor

* update interval tooltip

* update prom type tooltip

* update custom query params tooltip

* update exemplar internal link tooltip

* fix inline form styling inconsistency

* allow for using the DataSourceHTTPSettings component without the connection string

* remove overhaul component, re-use dshtttps comp, and use connection input in config editor

* make tooltips interactive to click links

* consistent label width across the elements we can control for now, fix exemplar switch

* make connection url a component

* refactor onBlur validation

* remove unused component

* add tests for config validations

* add more meaningful health check

* fix e2e test

* fix e2e test

* fix e2e test

* add error handling for more url errors

* remove unnecessary conversion

* health check tests

* Clean up the health check

* health check unit tests

* health check unit tests improved

* make pretty for drone

* lint check go

* lint check go

* add required attr to connection component

* Update public/app/plugins/datasource/prometheus/configuration/Connection.tsx

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

* fix read only issue for provisioned datasources

* validate multiple durations for incremental query setting

* use sentence case for headers

* use className consistently for styles

* add tests for url regex

* remove console logs

* only use query as healthcheck as the healthy api is not supported by Mimir

* fix exemplar e2e test

* remove overhaul prop from custom headers setting component

* remove connection section and use DatasourceHttpSettings connection with custom label and interactive tooltip

* add spaces back

* spaces

---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-04-27 09:43:54 -04:00
Adela Almasan
2beee35567
Timeseries: Time regions migration (#66998)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-04-27 05:28:58 +03:00
Adela Almasan
c4c747cca6
e2e: Update annotation marker selector (#67135) 2023-04-24 18:51:15 +00:00
Brendan O'Handley
c5ea3cd7e0
Prometheus: remove part of flaky e2e test (#67116)
remove elements of flaky e2e test

This test only checks 'undo' in the code editor and then checks if the query builder is present. The test is timing out when looking for the query builder. There should be a second test to check if undo works in the query builder so I'm removing the query builder check. I will add an issue to create a test for 'undo' in the query builder.
2023-04-24 10:28:57 -04:00
Joey
94294a72c8
Tracing: Update e2e test (#66960)
Update e2e test
2023-04-21 14:44:48 +01:00
Ryan McKinley
9452c0d718
Annotations: Support filtering the target panels (#66325)
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2023-04-18 15:39:30 -05:00
Matias Chomicki
d3a1faad1a
Loki Config: Add missing section header + minor improvements (#66216)
* Loki config: add missing section title to max lines

* Loki config: minor improvements to datasource test messages

* Chore: remove new line

* Loki: further improve error messages

* Alerting Settings: Add missing tooltip

* Update packages/grafana-ui/src/components/DataSourceSettings/AlertingSettings.tsx

* Update alerting label and tooltip

* Update packages/grafana-ui/src/components/DataSourceSettings/AlertingSettings.tsx

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

* Alerting settings: Increase label width

* Loki config: update success message

---------

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2023-04-14 12:39:54 +03:00
Marcus Andersson
c3fee5881f
E2E: Fixed so openPanelMenuItem flow works with new/old panel chrome without breaking changes (#66118)
Fixed so the openPanelMenuItem works with both angular and react panels.
2023-04-14 09:11:15 +02:00
Torkel Ödegaard
4ea7677bff
Explore: Start using PanelChrome as container (#66370)
* Explore: Start using PanelChrome as container

* fix test

* Fixing issue with test and timerange
2023-04-12 18:58:08 +02:00
Ashley Harrison
1261345b81
Chore: Upgrade to react 18 (#64428)
* update react 18 related deps

* fix some types

* make sure we're on react-router-dom >= 5.3.3

* Use new root API

* Remove StrictMode for now - react 18 double rendering causes issues

* fix + ignore some @grafana/ui types

* fix some more types

* use renderHook from @testing-library/react in almost all cases

* fix storybook types

* rewrite useDashboardSave to not use useEffect

* make props optional

* only render if props are provided

* add correct type for useCallback

* make resourcepicker tests more robust

* fix ModalManager rendering

* fix some more unit tests

* store the click coordinates in a ref as setState is NOT synchronous

* fix remaining e2e tests

* rewrite dashboardpage tests to avoid act warnings

* undo lint ignores

* fix ExpanderCell types

* set SymbolCell type correctly

* fix QueryAndExpressionsStep

* looks like the types were actually wrong instead :D

* undo this for now...

* remove spinner waits

* more robust tests

* rewrite errorboundary test to not explicitly count the number of renders

* make urlParam expect async

* increase timeout in waitFor

* revert ExplorePage test changes

* Update public/app/features/dashboard/containers/DashboardPage.test.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/features/dashboard/containers/PublicDashboardPage.test.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/features/dashboard/containers/PublicDashboardPage.test.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update public/app/features/dashboard/containers/PublicDashboardPage.test.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* skip fakeTimer test, ignore table types for now + other review comments

* update package peerDeps

* small tweak to resourcepicker test

* update lockfile...

* increase timeout in sharepublicdashboard tests

* ensure ExplorePaneContainer passes correct queries to initializeExplore

* fix LokiContextUI test

* fix unit tests

* make importDashboard flow more consistent

* wait for dashboard name before continuing

* more test fixes

* readd dashboard name to variable e2e tests

* wait for switches to be enabled before clicking

* fix modal rendering

* don't use @testing-library/dom directly

* quick fix for rendering of panels in firefox

* make PromQueryField test more robust

* don't wait for chartData - in react 18 this can happen before the wait code even gets executed

---------

Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2023-04-11 10:51:54 +01:00
Galen Kistler
38482c90bf
Build URL params and include requestId (#65742)
* add requestId and ds_type to datasource request url
2023-04-06 14:43:10 -05:00
Kristina
8dded022ec
Explore: Run test datasource default selection when mounted (#65864)
* Run test datasource query when mounted

* Auto running test-datasource creates more query history entries

* Make exemplar query intercept more robust

* Delete unrelated query history queries

* Revert "Run test datasource query when mounted"

This reverts commit 28b37e4df9.

* Add default query to testdata and grafana datasources
2023-04-05 09:08:03 -05:00
Alexa V
2b0c0d4b95
Dashboards: Enable feature flag newPanelChromeUI by default (#65593) 2023-04-03 13:50:43 +02:00
Ashley Harrison
7005b7bf8a
Navigation: Update e2e tests to work with topnav (#60910)
* turn on topnav toggle in e2e tests

* fix variable e2e tests

* fix remaining tests + remove some hardcoded waits

* speculative fixes

* wait for error to disappear

* use new selector, turn toggle back off
2023-01-04 14:59:53 +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
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
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
Ashley Harrison
871d98e550
hopefully improve slate test reliability (#58171) 2022-11-04 09:20:03 +00: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
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