From 1d8f8178ee004749afde55aa4e577531062403ea Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Tue, 29 Oct 2024 10:54:56 +0100 Subject: [PATCH] E2E Selectors: Force plugin-e2e to use workspace version of e2e-selectors (#95511) * provoke an error * resolve local selectors package * Update package.json * bump plugin-e2e * Revert "provoke an error" This reverts commit a2df2151891418c04bd68c99437945cdb0c0fd93. * update readme --- e2e/plugin-e2e/plugin-e2e-api-tests/README.md | 7 +------ package.json | 3 ++- yarn.lock | 11 ++++++----- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/e2e/plugin-e2e/plugin-e2e-api-tests/README.md b/e2e/plugin-e2e/plugin-e2e-api-tests/README.md index 477a6c384dc..077f7d78d74 100644 --- a/e2e/plugin-e2e/plugin-e2e-api-tests/README.md +++ b/e2e/plugin-e2e/plugin-e2e-api-tests/README.md @@ -1,8 +1,3 @@ # @grafana/plugin-e2e API tests -The purpose of the E2E tests in this directory is not to test the plugins per se - it's to verify that the fixtures, models and expect matchers provided by the [`@grafana/plugin-e2e`](https://github.com/grafana/plugin-tools/tree/main/packages/plugin-e2e) package are compatible with the latest version of Grafana. If you find that any of these tests are failing, it's probably due to one of the following reasons: - -- you have changed a value of a selector defined in @grafana/e2e-selector -- you have made structural changes to the UI - -For information on how to address this, follow the instructions in the [contributing guidelines](https://github.com/grafana/plugin-tools/blob/main/packages/plugin-e2e/CONTRIBUTING.md#how-to-fix-broken-test-scenarios-after-changes-in-grafana) for the @grafana/plugin-e2e package in the plugin-tools repository. +The purpose of the E2E tests in this directory is not to test the plugins per se - it's to verify that the fixtures, models and expect matchers provided by the [`@grafana/plugin-e2e`](https://github.com/grafana/plugin-tools/tree/main/packages/plugin-e2e) package are compatible with the latest version of Grafana. If you find that any of these tests are failing, it's likely because you have made changes in the Grafana UI that breaks the end-to-end testing APIs in plugin-e2e. For information on how to address this, follow the instructions in the [contributing guidelines](https://github.com/grafana/plugin-tools/blob/main/packages/plugin-e2e/CONTRIBUTING.md#how-to-fix-broken-test-scenarios-after-changes-in-grafana) for the @grafana/plugin-e2e package in the plugin-tools repository. diff --git a/package.json b/package.json index 06dd05689dc..5b8fd38a632 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "@emotion/eslint-plugin": "11.12.0", "@grafana/eslint-config": "7.0.0", "@grafana/eslint-plugin": "link:./packages/grafana-eslint-rules", - "@grafana/plugin-e2e": "^1.8.3", + "@grafana/plugin-e2e": "^1.11.0", "@grafana/tsconfig": "^2.0.0", "@manypkg/get-packages": "^2.2.0", "@playwright/test": "1.48.2", @@ -427,6 +427,7 @@ "redux": "^5.0.0", "@storybook/blocks@npm:8.1.6": "patch:@storybook/blocks@npm%3A8.1.6#~/.yarn/patches/@storybook-blocks-npm-8.1.6-892f57a6d7.patch", "react-grid-layout": "patch:react-grid-layout@npm%3A1.4.4#~/.yarn/patches/react-grid-layout-npm-1.4.4-4024c5395b.patch", + "@grafana/plugin-e2e/@grafana/e2e-selectors": "workspace:*", "@grafana/scenes/@grafana/e2e-selectors": "workspace:*", "@grafana/scenes-react/@grafana/e2e-selectors": "workspace:*" }, diff --git a/yarn.lock b/yarn.lock index 9459d37b2e7..0590c6661fb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3890,16 +3890,17 @@ __metadata: languageName: unknown linkType: soft -"@grafana/plugin-e2e@npm:^1.8.3": - version: 1.9.0 - resolution: "@grafana/plugin-e2e@npm:1.9.0" +"@grafana/plugin-e2e@npm:^1.11.0": + version: 1.11.0 + resolution: "@grafana/plugin-e2e@npm:1.11.0" dependencies: + "@grafana/e2e-selectors": "npm:^11.4.0-204289" semver: "npm:^7.5.4" uuid: "npm:^10.0.0" yaml: "npm:^2.3.4" peerDependencies: "@playwright/test": ^1.41.2 - checksum: 10/afc74b27473412a96b6bcdb77144c8bd25d3a299f55daff91a91aca951caca5cb0d009ec71e74c7efc906140d870076f4d763f7775fe2f5d2971657958daff96 + checksum: 10/87726ecfd9c9895e075f8c9d3bd20b49ba458e43bbf8f41e46e635b2157597f36fd6ccb3f35dcea9df04c2dd65d63e9893318cbcf1903340e6668b3b122a9c83 languageName: node linkType: hard @@ -19038,7 +19039,7 @@ __metadata: "@grafana/lezer-logql": "npm:0.2.6" "@grafana/monaco-logql": "npm:^0.0.7" "@grafana/o11y-ds-frontend": "workspace:*" - "@grafana/plugin-e2e": "npm:^1.8.3" + "@grafana/plugin-e2e": "npm:^1.11.0" "@grafana/prometheus": "workspace:*" "@grafana/runtime": "workspace:*" "@grafana/saga-icons": "workspace:*"