Commit Graph

93 Commits

Author SHA1 Message Date
Josh Hunt
51b3116730
Keybinds: E2E tests (#88752)
* Attempt at a keybinds e2e test

* another one, thank you

* polish e2e tests, remove console.log

* an extra test

* remove anti-patterns
2024-06-06 14:10:11 +03:00
Ashley Harrison
b4e49e3114
Select: Ensure screenreader correctly narrates options (#88118)
* replace select aria-label with data-testid

* update in copy pasted places as well

* update plugin-e2e to 1.2.2
2024-05-28 14:51:47 +01:00
Laura Fernández
6d98f53e8b
Chore: Remove returnToPrevious feature toggle (#88332) 2024-05-27 17:47:57 +02:00
Piotr Jamróz
0530b296d0
Correlations: Enable feature toggle by default (on-prem) (#88208)
* Correlations: Enable feature toggle for on-prem

* Update Loki test
2024-05-27 12:04:37 +02:00
Torkel Ödegaard
9cd7c87b48
DashboardScene: Fixing major row repeat issues (#87539)
* DashboardScene: Fixing major row repeat issues

* Fixing edit scope

* Use dashboard variableDependendency to notify row repeat behaviors

* update scenes lib

* Do not repeat if values are the same

* Update public/app/features/dashboard-scene/scene/DashboardScene.tsx

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>

* Updated scenes

* Update

* Update

* Do not render row actions for repeated rows

* Fixed e2e

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2024-05-14 12:39:10 +02:00
Alex Khomenko
7f1b2ef205
Select: Add data-testid to Input (#87105)
* Select: Add custom input component

* Forward data-testid

* Add input selector

* Props check
2024-04-30 14:04:58 +03:00
Khushi Jain
5dd8353ab1
Dashboards: Migrate from aria-label e2e selectors to data-testid (#78536)
* Dashboards: Migrate from aria-label e2e selectors to data-testid

* more changes

* addPanelwidget

* Test: Update .betterer.results

* refactor: fix e2e tests

* refactor: fix failing test

* refactor: update plugin-e2e after adding selector changes to the packege

---------

Co-authored-by: Laura Benz <48948963+L-M-K-B@users.noreply.github.com>
Co-authored-by: Laura Benz <laura.benz@grafana.com>
2024-04-24 15:16:19 +02:00
Brendan O'Handley
61c10ed155
Prometheus: Bypass flaky E2E test (#86460)
bypass flaky test
2024-04-17 13:53:22 -05:00
Brendan O'Handley
f85470d652
Prometheus: Use the frontend package in Prometheus and remove feature toggle (#86080)
* add history links for monaco completion provider folder

* add history links for monaco query field folder

* add history links for components folder

* add history links for configuration folder

* add history links for dashboard json folder

* add history links for gcopypaste folder

* add history link for variableMigration

* add history link for querybuilder/components/metrics-modal folder

* add history link for querybuilder/components/promqail folder

* add history links for querybuilder/components folder

* add history links for querybuilder/hooks folder

* add history links for querybuilder/shared folder

* add history links for querybuilder folder

* add history links for querycache folder

* add history links for src folder

* use frontend package and custom auth in module.ts

* remove files and fix import issues

* remove usePrometheusFrontendPackage

* remove extra files

* update betterer

* remove extra files after rebase

* fix betterer for rebase

* fix e2e flakiness
2024-04-15 16:45:23 -05:00
Brendan O'Handley
d084595211
Prometheus: Use frontend package in Prometheus DS with a feature toggle (#84397)
* add feature toggle usePrometheusFrontendPackage

* add feature toggle logic to Prometheus module

* use config editor with package and remove configOverhaul feature toggle

* update betterer because we will be removing other files as we replace with files from @grafana/prometheus

* fix exemplar ds picker selector

* add more description to ts-ignore

* remove go.work.sum change

* copy go.work.sum from main

* update go.work.sum after talking with ismail

* put back the promlib entry

---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2024-03-22 19:47:53 -05:00
Laura Benz
e51a8c25d1
ReturnToPrevious: Fix e2e test (#84938)
refactor: remove some waiting for elements that seem to have been removed
2024-03-22 14:26:09 +01:00
Serge Zaitsev
df2d0574c1
Chore: Enable nestedFolders by default (#84631)
* Enable nestedFolders by default

* Make nestedFolders GA

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>

* regenerate files

* also update docs

* skip failing test

---------

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
2024-03-22 14:13:43 +01:00
Josh Hunt
35c846f47b
Skip RTP e2e tests for now (#84925) 2024-03-21 17:59:13 +02:00
Laura Benz
d8a116e696
ReturnToPrevious: Add e2e test (#83115)
* feat: add incomplete unit test

* refactor: add idea for unit test

* feat: create new e2e test

* feat: add some steps

* feat: add comment

* feat: complete prep work

* feat: complete clean up

* rebase

* feat: add more steps to test flow

* refactor: remove unit test

* refactor: clean up

* refactor: create a provisioned alert rule

* refactor: change location and content

* refactor: e2e test

* refactor: betterer

* refactor: move provisioned alert rule

* refactor: make provisioning file available remote

* refactor: clean up test

* refactor: move provisioned alert rule

* refactor: remove wait()

* feat: restructure first test and add more tests

* feat: add another provisioned alert rule

* feat: add a new test

* feat: complete new test

* refactor: replace data-testid in alert rules

* refactor: replace data-testid

* refactor: fix tests for drone

* refactor: fix third test after review

* refactor: fix last test

* temp

* refactor: improve some things

* refactor: adjust unit tests

* refactor: remove assertions for alert rule details view

* refactor: remove assertions

* refactor: add check for button text

* refactor: remove session storage

* refactor: apply changes from code review

* refactor: add codeowner

* refactor

* refactor

* refactor: clean up

* refactor: clean up

* refactor: clean up

* refactor: increase pa11y threshold for /alerting/list
2024-03-21 09:05:51 +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
Galen Kistler
f1000978cb
Logs: e2e test flake in loki-table-explore-to-dash.spec.ts (#83856)
fix flake in e2e test checking monaco loading state
2024-03-04 13:01:48 -06:00
Ashley Harrison
086d47d83c
Chore: replace react-popper with floating-ui in ExemplarMarker (#83694)
* replace react-popper with floating-ui in ExemplarMarker

* fix e2e test

* floating-ui uses mousemove
2024-03-01 14:54:39 +00:00
Brendan O'Handley
90e7791086
Prometheus: Reduce flakiness in prometheus e2e tests (#83437)
* reduce flakiness in prometheus e2e tests

* prettier fix for azure docs

* Update e2e/various-suite/prometheus-config.spec.ts

Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>

---------

Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
2024-02-28 08:03:36 -06:00
Jack Westbrook
0dcdfc261b
Monaco Editor: Load via ESM (#78261)
* chore(monaco): bump monaco-editor to latest version

* feat(codeeditor): use esm to load monaco editor

* revert(monaco): put back previous version

* feat(monaco): setup MonacoEnvironment when bootstrapping app

* feat(monaco): load monaco languages from registry as workers

* feat(webpack): clean up warnings, remove need to copy monaco into lib

* fix(plugins): wip - remove amd loader workaround in systemjs hooks

* chore(azure): clean up so QueryField passes typecheck

* test(jest): update config to fix failing tests due to missing monaco-editor

* test(jest): update config to work with monaco-editor and kusto

* test(jest): prevent message eventlistener in nodeGraph/layout.worker tripping up monaco tests

* test(plugins): wip - remove amd related tests from systemjs hooks

* test(alerting): prefer clearAllMocks to prevent monaco editor failing due to missing matchMedia

* test(parca): fix failing test due to undefined backendSrv

* chore: move monacoEnv to app/core

* test: increase testing-lib timeout to 2secs, fix parca test to assert dom element

* feat(plugins): share kusto via systemjs

* test(e2e): increase timeout for checking monaco editor in exemplars spec

* test(e2e): assert monaco has loaded by checking the spinner is gone and window.monaco exists

* test(e2e): check for monaco editor textarea

* test(e2e): check monaco editor is loaded before assertions

* test(e2e): add waitForMonacoToLoad util to reduce duplication

* test(e2e): fix failing mysql spec

* chore(jest): add comment to setupTests explaining need to incresae default timeout

* chore(nodegraph): improve comment in layout.worker.utils to better explain the need for file
2024-02-22 12:31:40 +01:00
Ashley Harrison
691115da7a
Chore: replace react-popper with @floating-ui/react in DataSourcePicker (#82528)
* replace react-popper with floating-ui in DataSourcePicker

* don't need {force:true}
2024-02-16 09:40:16 +00:00
Torkel Ödegaard
fe6d1460b0
DashboardScene: Adds solo page that uses dasboarde scene to render single panel (#77940)
* DashboardScene: Adds solo page that uses dasboarde scene to render single panel

* Update

* Panel and row repeats working

* Update

* added e2e tests

* Refactor

* Fixes

* Fix e2e

* fix

* fix

* fix
2024-02-11 09:08:47 +01:00
Matias Chomicki
c9593531ef
Loki query builder: force click in e2e test (#82051) 2024-02-09 20:48:10 +02:00
Nathan Marrs
829672759c
Deprecation: Create explicit feature toggle to auto-migrate from graph panel (#79369) 2024-02-08 14:00:48 -08:00
Ashley Harrison
28b336ac80
DockedMegaMenu: Clean up toggle and old code (#81878)
* remove toggle

* remove code not behind toggle

* remove old MegaMenu

* rename DockedMegaMenu -> MegaMenu and clean up go code

* fix backend test

* run yarn i18n:extract

* fix some unit tests

* fix remaining unit tests

* fix remaining e2e/unit tests
2024-02-06 13:43:11 +00:00
Zoltán Bedi
61934588c5
E2E: Skip flaky mysql test (#81388) 2024-01-29 08:22:07 +01:00
Brendan O'Handley
639bf3036d
Prometheus: Add e2e tests for decoupling (#80333)
* update selectors for prom

* add selector to switch component, needs id instead of testid

* add testid and ids to Prom settings

* add e2e tests for prom config

* add config to editor test

* export select function

* start query editor spec

* clean up describe

* add selectors for general query editor

* add selectors to components in options in best locations

* wrap header switch in id because component doesn't accept testid nor id

* add id to wrap legend components in one selector

* update selector in shared folder component, note to change in shared library

* update selector in shared folder component, note to change in shared library

* add notes for selectors in shared folder

* add tests and file for query editor

* add selectors for metrics browser in code editor

* add selector to component to open metrics browser

* add selectors to components within the metrics browser

* add tests for metrics browser and stub resource calls

* add selectors to query builder components

* add e2e tests for query builder

* generic query builder test with hints

* add selectors for more code editor parts

* add test for code and update selector

* fix tests with selector

* remove shared folder changes and use data-testid where possible

* remove unused import

* share getResources

* create variable query editor selectors

* add selectors to the variable query editor

* add e2e tests for the Prometheus variable query editor

* fix test function

* refactor add data source method

* add annotation selectors

* add selectors to annotation components

* add annotation e2e tests

* commit for yarn i18n:extract error in drone
2024-01-22 08:42:24 -06:00
Piotr Jamróz
322cd74b9c
Explore: Re-enable basic e2e test for Explore (#80617)
Re-enable basic test for Explore
2024-01-17 12:26:47 +01:00
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