Commit Graph

420 Commits

Author SHA1 Message Date
Jack Westbrook
593ab4559d
MSSQL: Add playwright smoke test (#94977)
test(mssql-datasource): add smoke test to assert decoupled plugin assets are built and load
2024-10-21 11:36:18 +02:00
Esteban Beltran
f248a55576
Frontend Sandbox: Create a plugin sandbox enable registry. Use enable list instead of disable list (#94809)
* Use a enable configuration to enable frontend sandbox

* Modify settings to load enableFrontendSandbox

* Check for signature type

* Update commment

* Fix e2e tests for the frontend sandbox

* Modify logic so a custom check function is used instead of a list of checks

* Fixes flaky test

* fix comment

* Update comment

* Empty commit

* Empty commit
2024-10-17 16:56:50 +02:00
grafana-delivery-bot[bot]
032d0669cd
Release: Bump version to 11.4.0-pre (#94569)
bump version 11.4.0-pre

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-11 11:31:04 +01:00
owensmallwood
97de44b0c2
Dashboard Sharing: Skips flaky e2e test for dashboard sharing (#94507)
skips flaky e2e test for dashboard sharing
2024-10-10 00:50:54 +03:00
Laura Fernández
9491ab9a93
Bookmarks: Create e2e tests (#90373) 2024-10-09 10:43:01 +02:00
renovate[bot]
1545a58d3c
Update dependency @grafana/scenes to v5.18.2 (#94321)
* Update dependency @grafana/scenes to v5.18.2

* fix e2e test

* update e2e test

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2024-10-07 16:04:20 +01:00
jackyin
63bdbb67fc
SubMenu: Fix expanding sub menu items on touch devices (#93208)
* click more in mobile phone

* use stopPropagation stop event

* delete log

* delete inspect click and add stopPropagation

* bug fix

* fix unit tests

* fix e2e tests

* fix old-arch tests

---------

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2024-10-07 15:22:18 +01:00
renovate[bot]
93b8243da7
Update dependency @grafana/experimental to v2 (#93919)
* Update dependency @grafana/experimental to v2

* add data-testid to old save button so it works properly in e2e test

* fix azure monitor e2e tests

* use raw selectors

* remove .only

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2024-10-04 14:21:10 +01:00
Levente Balogh
6096f46774
Plugin Extensions: Require meta-data to be defined in plugin.json during development mode (#93429)
* feat: add extensions to the backend plugin model

* feat: update the frontend plugin types

* feat(pluginContext): return a `null` if there is no context found

This will be necessary to understand if a certain hook is running inside a plugin context or not.

* feat: add utility functions for checking extension configs

* tests: fix failing tests due to the type updates

* feat(AddedComponentsRegistry): validate plugin meta-info

* feat(AddedLinksRegistry): validate  meta-info

* feat(ExposedComponentsRegistry): validate meta-info

* feat(usePluginComponent): add meta-info validation

* feat(usePluginComponents): add meta-info validation

* feat(usePluginLinks): add meta-info validation

* fix: only validate meta-info in registries if dev mode is enabled

* tests: add unit tests for the restrictions functionality

* tests: fix Go tests

* fix(tests): revert accidental changes

* fix: run goimports

* fix: api tests

* add nested app so that meta data can bested e2e tested

* refactor(types): extract the ExtensionInfo into a separate type

* refactor(extensions/utils): use Array.prototype.some() instead of .find()

* refactor(usePluginLinks): update warning message

* feat(usePluginExtensions()): validate plugin meta-info

* Wip

* fix(e2e): E2E tests for extensions

* fix(extensions): allow multiple "/" slashes in the extension point id

* fix(extensions/validators): stop validating the plugin id pattern

---------

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2024-10-04 08:41:26 +02:00
renovate[bot]
573ba9be18
Update dependency @grafana/scenes to v5.16.2 (#94082)
* Update dependency @grafana/scenes to v5.16.2

* fix e2e test

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2024-10-02 10:58:24 +01:00
Erik Sundell
d6d51f0316
Plugin E2E: Add more api tests (#94073)
* add tests

* bump plugin-e2e

* use range

* update lock file
2024-10-02 11:55:04 +02:00
Kyle Brandt
2a73b89374
Prometheus: Add resource for suggestions that include scopes/adhoc filters (#94001)
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Bogdan Matei <bogdan.matei@grafana.com>
2024-10-01 07:17:59 -04:00
Joao Silva
a45662bf2d
Revert "Restore Dashboards: Add e2e tests (again) (#93214)" (#94003) 2024-09-30 14:26:16 +01:00
Ivan Ortega Alba
7bca69849f
Dashboards: Enable scenes by default (#93818)
* Mark Scenes feature toggles as GA

* Move old arch e2e to a new folder

* Run E2E on scenes by default

* Upgrade e2e-selectors to ensure the tests in Playwright works
2024-09-30 10:49:02 +01:00
Joao Silva
42f1fcaf2c
Restore Dashboards: Add e2e tests (again) (#93214) 2024-09-30 10:44:15 +01:00
Jack Westbrook
1aed1d8017
Chore: Bump webpack for e2e test plugins (#93831)
chore(e2e-plugins): bump version of webpack to silence dependabot
2024-09-30 10:06:54 +02:00
ismail simsek
5472478ee8
Prometheus: Fix e2e selector by using "data-test-id" instead of "id" (#93736)
* use data-test-id instead of id

* don't skip
2024-09-25 15:29:19 +02:00
Ashley Harrison
a54308138f
Navigation: Remove bodyScrolling toggle and make it default (#93652)
* remove bodyScrolling toggle and make it default

* fix e2e tests
2024-09-24 13:23:18 +01:00
Juan Cabanas
cedd66cefc
ShareDrawer: Export as JSON code editor fix (#93593) 2024-09-23 16:31:23 +02:00
Juan Cabanas
683dbcf57c
ShareDrawer: Flaky test fixed (#93345) 2024-09-13 19:04:52 +03:00
oscarkilhed
ad6cd55301 update tests to include Selected (x) in variable multi select boxes 2024-09-13 17:32:52 +03:00
Juan Cabanas
c56870e511
ShareDrawer: Test coverage (#93111) 2024-09-13 11:01:21 -03:00
Joao Silva
20f7e11987
Restore Dashboards: Revert e2e tests (#93026) 2024-09-06 11:18:49 +01:00
Joao Silva
b20017cf8c
Restore Dashboards: Add e2e tests (#92514) 2024-09-04 15:47:15 +01:00
Erik Sundell
db0cc24f2b
Plugin extensions: Introduce new registry for added links (#92343)
* add added component registry

* fix broken test

* add tests for usePluginComponents hook

* readd expose components

* add type assertion exceptions to betterer results

* use new addedComponent registry in legacy endpoints

* remove unused code

* cleanup

* revert test code

* remove commented code

* initial commit

* refactor sync method and hook

* fix tests

* subscribe to the correct registry

* remove old registry

* cleanup types

* add use usePluginLinks hook

* add more tests

* fix import order

* fix typo

* fix and temporarly skip failing tests

* wip

* add hook tests

* add more tests

* remove old hook

* fix versioning

* add version to all extension point ids

* remove cleanup

* remove unused imports

* revert touched file

* fix test

* test: remove hook creation

* catch init error

* send error to faro

* fix broken hook

* comment out call hook initialization

* use the right import ofr isString

* remove unused import

* remove registryState type

* pr feedback

* Update public/app/features/plugins/extensions/validators.test.tsx

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* Update public/app/features/plugins/extensions/validators.test.tsx

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* remove no longer relevant comment

* fix broken tests

* Fixed test to verify that the memotization works properly.

* simplify hooks

---------

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2024-08-30 10:09:01 +02:00
Sergej-Vlasov
c4d804a964
ImportDashboard: adjust flaky e2e test (#92705)
adjust test to wait for monaco editor
2024-08-29 16:21:05 -04:00
Erik Sundell
1373b37166
Plugin Extensions: E2E test addLink and legacy APIs (#92394)
* cleanup tests

* more cleanup

* added links

* test legacy hooks

* test legacy hooks

* update codeowners

* revert package changes

* add project specfic example script

* remove console log

* Update .github/CODEOWNERS

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

* Update CODEOWNERS

* use correct file names

* cleanup tests

---------

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
2024-08-26 16:01:32 +02:00
Erik Sundell
d8ec95e9b1
E2E: Add support for building test plugins (#91873)
* build test apps with webpack

* add extensions test app

* update e2e tests

* remove non-build test apps using amd

* use @grafana/plugin-configs rather than create-plugin config

* Update e2e/plugin-e2e/plugin-e2e-api-tests/as-admin-user/extensions/usePluginComponents.spec.ts

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>

* Update package.json

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>

* use run dir variable instead of hardcoded path

* add dummy licence file

* add separate step for building test plugins

* support nested plugins

* remove react-router-dom from the externals array

* remove add_mode dev

* lint starlark

* pass license path as env variable

* fix the path

* chore(e2e-plugins): clean up dependencies to match core versions

* refactor(e2e-plugins): prefer extending webpack plugins-config

* docs(e2e-plugins): add basic info to extensions test plugin readme

* update readme

* change dir name from custom plugins to test plugins

* change root readme

* update lockfile

---------

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2024-08-23 09:00:03 +02:00
Torkel Ödegaard
801f2ba728
DashboardScene: Support remember scroll position when coming back from view panel, panel edit and settings (#92185)
* DashboardScene: Support remember scroll position when coming back from view panel, panel edit and settings

* remove unused state prop

* Update

* Fixes

* Update e2e
2024-08-21 14:05:07 +00:00
Torkel Ödegaard
43dba8c3f9
DashboardScene: Support bodyScrolling (#91888)
* Progress

* Fix dashboards pane

* almost working

* add hook to get scopesDashboardsScene state

* check whether it's enabled when considering opened state

* add height to container

* Update

* revert change

* Make it work when bodyScrolling is disabled

* Last tweaks

* Update scenes

* Updating

* Fix

* fix tests

* fix lint  issues

* fix lint  issues

---------

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2024-08-19 15:42:45 +02:00
Erik Sundell
2ed6ca360f
Extensions: e2e test usePluginComponent hook (#91750)
* add simple test apps that use usePluginComponent hook and exposeComponent api

* add e2e test

* update readme

* Update README.md

* fix lint issue

* pr feedback
2024-08-12 15:43:42 +02:00
Dominik Prokop
2d35b11323
DashboardScene: Add rows keyboard shortcuts (#90275)
* DashboardScene: Add rows keyboard shortcuts

* e2e test
2024-07-12 15:13:22 +02:00
Esteban Beltran
1269e50042
Chore: Fix flaky frontend e2e tests with the explore page (#90184)
* Chore: Fix flaky frontend e2e tests with the explore page

* Use selector

* Add checks to scenes tests

* simplify code
2024-07-09 18:56:11 +02:00
Ashley Harrison
e87646eeb6
Storybook: Add basic e2e verification test (#89779)
* add very basic tests to verify storybook builds correctly

* add storybook step to drone

* reorder steps

* drone tweaks

* don't need host since it's set in env

* don't need to wait

* format build.star and readd wait

* install netcat in CI

* do a yarn install here to get correct bindings

* refactoring to hopefully work better in CI

* add wait-on

* add verbose logging

* localhost?

* more logging

* specify storybook host

* ...

* back to grafana-server

* does this work? 🤔

* run storybook e2e test after rgm-package so the backround process is running for less time

* split into separate step

* format
2024-06-27 16:43:43 +01:00
Ashley Harrison
89fe64f900
Keybinds E2E: simplify keybinds e2e even further (#89819)
simplify keybinds e2e even further
2024-06-27 13:15:15 +03:00
Sergej-Vlasov
8e1c4919c7
DashboardScenes: Disable flaky new-datasource-variable e2e test (#89817)
disable flaky new-datasource-variable e2e test
2024-06-27 12:06:07 +03:00
Sergej-Vlasov
3056e8310b
DashboardScenes: Skip flaky scenes E2E tests (#89769)
skip flaky tests
2024-06-26 17:06:35 +03:00
Ashley Harrison
54cfae8fef
Chore: Simplify keybinds e2e test (#89760)
simplify keybinds e2e test
2024-06-26 10:37:33 +01:00
Ashley Harrison
b59ebf85bc
Chore: Attempt to make keybinds e2e test more stable (#89663)
* attempt to make test more stable

* split everything instead
2024-06-25 12:18:45 +01:00
Ashley Harrison
7d8afd9578
Tab: Improve accessible name (#89602)
* replace aria-label selector with data-testid

* fix unit tests

* fix e2e selectors

* fix last unit test

* fix e2e tests

* fix casing

* fix e2e test

* fix casing
2024-06-24 17:48:26 +01:00
Sergej-Vlasov
4e0c3555df
DashboardScene: Include scenes e2e in pr checks (#89297)
* adjust drone to run scenes e2e alongside

* adjust typo in scenes e2e folder name for consistency

* fix select options selector inssue with scenes bump

* skip tests in old arch that result in race conditions

* skip more flaky tests due to race conditions

* skip scenes e2e instead of old arch in case of race condition

* update to latest scenes version

* skip test due to race conditions

* skip flaky race condition test

* modify and sign drone pipeline

* remove unnecessary edits

* resolve merge conflicts and regenerate drone.yml
2024-06-24 17:57:50 +03:00
Erik Sundell
fc17dc4d6a
Plugin E2E: Add alerting tests (#88909)
add alerting tests
2024-06-24 08:39:43 +02:00
Agnès Toulet
44a40f8e0c
E2E: Add SMTP tester (#88392)
* E2E: Add SMTP tester

* fix loadlocation issue when running tests on alpine

* temporary update

* add log

* update run-suite

* Update run-suite

* Update run-suite

* Update run-suite

* Update yarn.lock

* apply suggestions + cleanup logs

* update yarn.lock & package.json

* fix swagger
2024-06-18 14:32:19 +02:00
Erik Sundell
72241dbf5f
Plugin extensions: Add e2e tests (#89048)
* add custom plugins

* update bundles

* provision app plugins and their dashboards

* add one more script that run e2e tests using e2e test server

* add e2e tests

* regenerate jsonnet dashboards

* ignore custom plugins and playwright report

* use minified

* cleanup tests

* update codeowners

* add leading slash

* document new script

* document custom-plugins

* cleanup

* twist modules

* add readme
2024-06-14 13:41:17 +02:00
Sergej-Vlasov
c512d10362
DashboardScene: Adjust plugin-e2e for dashboardScene FF (#89052)
adjust plugin-e2e for dashboard scene ff
2024-06-12 11:37:16 +02:00
Sergej-Vlasov
8d0e437287
DashboardScene - Add various-suite to scenes e2e (#88911)
* duplicate various-suite in scenes e2e

* restore original various-suite

* adjust various-suite e2e tests for scenes

* adjust workflow for test run

* adjust flaky exemplars test

* remove old dash script and restore workflow

* duplicate e2e/various-suite/keybinds.spec.ts into e2e/scenes

* restore original e2e/various-suite/keybinds.spec.ts

* add new keybinds e2e test

* restore workflow file after test run
2024-06-12 11:36:11 +02:00
Ashley Harrison
89dd710ca9
Chore: Add extra check in keybinds e2e test to prevent flake (#89034)
add extra check
2024-06-11 16:28:47 +01:00
Ashley Harrison
06c30ee165
Chore: Migrate more SCSS styles (#88780)
* remove animations mixins

* move drop and drop-element to angular file

* migrate submenu scss
2024-06-10 16:10:54 +01:00
Ashley Harrison
f78fb4ff16
Chore: Remove hardcoded wait in keybinds e2e test (#88895)
* remove hardcoded wait in keybinds test

* review comments
2024-06-10 15:09:15 +01:00
Ashley Harrison
5f33943397
Select: Revert "preserving custom value" changes (#88856)
* revert Select changes as we can handle it outside of the base select component

* update scenes

* update scenes properly

* revert changes to azure-monitor e2e tests
2024-06-06 17:33:31 +01:00