Commit Graph

76 Commits

Author SHA1 Message Date
Ashley Harrison
4b5b738646
Time Zones: Fix relative time when using UTC timezone (#85637)
add UTC case to e2e test + let UTC pass through to moment.tz
2024-04-09 09:54:57 +01:00
Timur Olzhabayev
e9db9106c1
Chore: Disable angular support by default (#84738)
* Flipping angular support to disabled by default
2024-03-22 17:09:53 +01:00
Zoltán Bedi
a4fe7f39ea
E2E: Rewrite mysql tests to playwright (#83424)
* E2E: Rewrite mysql tests to playwright

* Fix lint

* Add more selectors and address comments

* Scope locators when locating text

* Don't run it 20 times

* Update new-datasource-variable to assert mysql
2024-03-19 23:07:48 +01:00
Gilles De Mey
8765c48389
Alerting: Remove legacy alerting (#83671)
Removes legacy alerting, so long and thanks for all the fish! 🐟

---------

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
Co-authored-by: Sonia Aguilar <soniaAguilarPeiron@users.noreply.github.com>
Co-authored-by: Armand Grillet <armandgrillet@users.noreply.github.com>
Co-authored-by: William Wernert <rwwiv@users.noreply.github.com>
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
2024-03-14 15:36:35 +01:00
Josh Hunt
183aa09eeb
Dashboards: Fix scroll position not being restored when leaving panel edit (#83787)
* Dashboards: Fix scroll position not being restored when leaving panel edit view

* remove mock from tests

* remove console log

* Remove my debugging stuff, and don't render grid if width is 0

* remove old comment (but retain old, probably unneeded css)

* rename ref

* fix it not actually working anymore!!!

* add e2e tests

* jsonnet, i guess
2024-03-06 13:57:11 +00:00
Ivan Ortega Alba
35e96d6b04
Settings: Consistent footer actions across edit views (#82048) 2024-02-08 11:50:53 +02:00
Torkel Ödegaard
e08700c1b5
Dashboard: New EmbeddedDashboard runtime component (#78916)
* Embedding dashboards exploratino

* Update

* Update

* Added e2e test

* Update

* initial state, and onStateChange, only explore panel menu action and other fixes and tests

* fix e2e spec

* Fix url

* fixing test
2024-01-25 07:32:07 +01:00
Ivan Ortega Alba
3b401d0d4d
CustomVariable: Be able to edit them using scenes (#80193)
---------
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
2024-01-17 19:14:01 +02:00
Ezequiel Victorero
25ff4baa76
UI: New share button and toolbar reorganize (#77563) 2024-01-08 10:42:24 -03:00
Todd Treece
b6d95889e1
Live: Add dashboard E2E smoke test (#79880) 2023-12-27 13:31:09 -05:00
renovate[bot]
9ad26e4f39
Update dependency @grafana/scenes to v1.20.0 (#77261)
* Update dependency @grafana/scenes to v1.20.0

* update e2e test

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-10-27 11:33:13 +01:00
Josh Hunt
3e2ca29c8d
BrowseDashboards: Enable new browse dashboards UI by default (#75822)
* BrowseDashboards: Enable new browse dashboards UI by default

* update docs

* enable new e2e tests
2023-10-05 13:14:10 +03:00
Josh Hunt
40a41113aa
BrowseDashboards: Add (skipped) basic e2e tests to prepare for GA (#75917)
Add e2e tests for new Browse Dashboards UI
2023-10-04 09:08:43 +00: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
6b14183706
Cypress dashboard-time-zone: break chain to prevent flakiness (#75001)
break chain to prevent flakiness
2023-09-18 12:02:32 +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
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
Torkel Ödegaard
97d568e60a
DashbboardScene: RowRepeaterBehavior (#74505)
* Repeating rows start

* working

* Progress

* Progress

* Update

* up scenes lib

* Update

* Progress

* restore url sync

* Progress

* Fixes and tests

* Update

* Adds tests and code to remove repeats from save model

* Update

* Fix test
2023-09-11 12:02:04 +02: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
Ashley Harrison
e2724f39d9
Time Range: Using relative time takes timezone into account (#74013)
* account for timezone when using relative times
Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: L-M-K-B <48948963+L-M-K-B@users.noreply.github.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: tskarhed <1438972+tskarhed@users.noreply.github.com>

* keep as it was originally for now

* add e2e test for relative time zone overrides

* empty commit to add coauthors

Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: L-M-K-B <48948963+L-M-K-B@users.noreply.github.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: tskarhed <1438972+tskarhed@users.noreply.github.com>

* fix types

* switch to using table panel in e2e test

* use regex for partial text match

* actually go to the dashboard...

* use include.text

* check for visibility first

* try waiting on backend request to complete

* CI driven development is fun

* make sure we're waiting for both data query calls

* open dashboard instead

* kick drone

* Revert "open dashboard instead"

This reverts commit bab9c77c4d.

* check timezone second

* refactor to avoid detached elements

---------

Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: L-M-K-B <48948963+L-M-K-B@users.noreply.github.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: tskarhed <1438972+tskarhed@users.noreply.github.com>
2023-09-04 10:38:35 +01:00
Torkel Ödegaard
74d453f056
DashboardSchema: Remove old unused legacy props style and timepicker.enable (#73879)
* DashboardScheam: Remove old unused legacy props style and timepicker.enable

* Update

* fix test
2023-08-28 12:18:17 +02:00
Ashley Harrison
45ff0b5cf6
DatePicker: Fix calendar not showing correct selected range when changing time zones (#73273)
* user essentials mob! 🔱

* user essentials mob! 🔱

lastFile:packages/grafana-ui/src/components/DateTimePickers/TimeRangePicker/CalendarBody.tsx

* user essentials mob! 🔱

lastFile:packages/grafana-ui/src/components/DateTimePickers/TimeRangePicker/CalendarBody.tsx

* user essentials mob! 🔱

* user essentials mob! 🔱

lastFile:e2e/dashboards-suite/dashboard-timepicker.spec.ts

* user essentials mob! 🔱

lastFile:e2e/dashboards-suite/dashboard-timepicker.spec.ts

* user essentials mob! 🔱

* user essentials mob! 🔱

* restore custom.ini

* run betterer + prettier

---------

Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: Roxana Turc <anamaria-roxana.turc@grafana.com>
Co-authored-by: Tobias Skarhed <tobias.skarhed@gmail.com>
Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
2023-08-23 12:57:32 +00:00
Ashley Harrison
6194d8fd8b
Nested folders: Add e2e test for new browse page (#72590)
* scaffold nested folder structure

* update structure slightly

* update comments

* Added basic scafold for Cypress test

* fix selector name, add table body selector, improve expand aria label

* skip test for now

* undo changes to cypress custom.ini

---------

Co-authored-by: Roxana Turc <anamaria-roxana.turc@grafana.com>
2023-08-02 11:28:13 +01:00
Ivan Ortega Alba
8415dd40d7
DSPicker: Use new DS picker everywhere in Grafana (#70609) 2023-07-26 18:40:51 +02:00
Polina Boneva
1110cb4d44
Public Dashboard: Redesign modal (v2) (#71151)
* Update public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/SettingsBar.tsx

Co-authored-by: Juan Cabanas <juan.cabanas@grafana.com>

* revert modal styling and add specific styling to Sharing

* Update public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/SettingsBar.tsx

Co-authored-by: Juan Cabanas <juan.cabanas@grafana.com>

* functions > const

* put a gat between all items in email config, instead of margins for each item

* fix html semantic elements

* ad theme to class component ShareModal

* add labels

* fix failing tests; now Settings has a summary and has to be opened to be able to see the On/Off toggles

* fix dashboard-public-create test with settings dropdown
2023-07-25 13:17:39 +03:00
Darren Janeczek
d61af3adde
Dashboards: Data source template variable options now specify a current value using uid. (#69259)
* feat: template data source option current by uid

* fix: e2e with explicit uid for "slow-prometheus"

* revert: unrelated change

* revert: unreverted the actually related change

* chore: e2e support for testing ${variable:text}

* fix: use `:raw` instead of `:value` in e2e dashboard
2023-06-12 01:05:50 -07:00
Juan Cabanas
9890ff7c92
PublicDashboards: Audit table redesign (#68137) 2023-05-29 12:59:29 -03:00
Ashley Harrison
4abe0249ba
Chore: Clean up old navigation (#66287)
* remove code outside of the topnav feature flag

* delete NavBar folder

* remove topnav toggle from backend

* restructure AppChrome folder

* fix utils mock

* fix applinks tests

* remove tests since they're covered in e2e

* fix 1 of the approotpage tests

* Fix another dashboardpage test

* remove reverse portalling + test for plugins using deprecated onNavChanged method

* kick drone

* handle correlations
2023-04-14 09:43:11 +01: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
Ashley Harrison
a123e0a97c
e2e tests: Add selector to close dashboard settings and use it in e2e tests (#65625)
* add selector to close dashboard settings and use it in e2e tests

* check visibility of add panel button

* check visibility of add new panel button before clicking
2023-03-31 09:32:44 +01:00
Ashley Harrison
a6b2bc3997
Navigation: Enable new navigation by default (#65335)
* enable topnav by default

* rename dashboard-search to dashboard-browse

* wait for time to be set in e2e test before attempting to click button

* update toggle description
2023-03-30 10:42:43 +01:00
Kristian Bremberg
27e2b037ae
Chore: Use DOMPurify to sanitize strings rather than js-xss (#62787)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-03-16 19:13:34 +02:00
Ashley Harrison
5b8c2f494d
Chore: convert VariableOptions to use emotion instead of scss (#64135)
convert VariableOptions to use emotion instead of scss
2023-03-07 11:13:57 +00:00
juanicabanas
c59682fad6
PublicDashboards: Paused or deleted public dashboard screen (#63970) 2023-03-03 10:12:29 -03:00
juanicabanas
9df4a39195
PublicDashboards: Configuration modal redesign (#63211)
Configuration modal redesign

---------

Co-authored-by: kay delaney <kay@grafana.com>
2023-02-24 12:36:29 -03: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
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
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
Josh Hunt
d4e3d47f56
Chore: Disable dashboard-time-zone e2e tests (#58320) 2022-11-07 06:37:47 -05: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
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
Artur Wierzbicki
202dce66ff
Search: add basic e2e test for the folder view (#55820) 2022-09-28 09:46:24 +04: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
Ezequiel Victorero
76edf1a727
PublicDashboards: Fix flaky e2e test (#54864) 2022-09-08 09:18:40 -03:00