@grafana/create-plugin 7.9.2 → 7.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [7.10.0](https://github.com/grafana/plugin-tools/compare/@grafana/create-plugin@7.9.2...@grafana/create-plugin@7.10.0) (2026-08-21)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **create-plugin:** make Playwright config extendable ([#2807](https://github.com/grafana/plugin-tools/issues/2807)) ([b7dd0fb](https://github.com/grafana/plugin-tools/commit/b7dd0fbf299e6a99bef04a1fc74e4f2c11a17a47))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **templates:** Update dependency @grafana/plugin-e2e to v3.11.0 ([#2825](https://github.com/grafana/plugin-tools/issues/2825)) ([d039033](https://github.com/grafana/plugin-tools/commit/d039033421febaa04a33d7dc2c039d5d761b9723))
|
|
14
|
+
|
|
3
15
|
## [7.9.2](https://github.com/grafana/plugin-tools/compare/@grafana/create-plugin@7.9.1...@grafana/create-plugin@7.9.2) (2026-08-05)
|
|
4
16
|
|
|
5
17
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ⚠️⚠️⚠️ THIS FILE WAS SCAFFOLDED BY `@grafana/create-plugin`. DO NOT EDIT THIS FILE DIRECTLY. ⚠️⚠️⚠️
|
|
3
|
+
*
|
|
4
|
+
* To extend the configuration, follow the steps in
|
|
5
|
+
* https://grafana.com/developers/plugin-tools/how-to-guides/extend-configurations#extend-the-playwright-config
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { PluginOptions } from '@grafana/plugin-e2e';
|
|
9
|
+
import { defineConfig, devices } from '@playwright/test';
|
|
10
|
+
import { dirname } from 'node:path';
|
|
11
|
+
|
|
12
|
+
const pluginE2eAuth = `${dirname(require.resolve('@grafana/plugin-e2e'))}/auth`;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* See https://playwright.dev/docs/test-configuration.
|
|
16
|
+
*/
|
|
17
|
+
export default defineConfig<PluginOptions>({
|
|
18
|
+
testDir: './tests',
|
|
19
|
+
/* Run tests in files in parallel */
|
|
20
|
+
fullyParallel: true,
|
|
21
|
+
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
|
22
|
+
forbidOnly: !!process.env.CI,
|
|
23
|
+
/* Retry on CI only */
|
|
24
|
+
retries: process.env.CI ? 2 : 0,
|
|
25
|
+
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
|
26
|
+
reporter: 'html',
|
|
27
|
+
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
|
28
|
+
use: {
|
|
29
|
+
/* Base URL to use in actions like `await page.goto('/')`. */
|
|
30
|
+
baseURL: process.env.GRAFANA_URL || 'http://localhost:3000',
|
|
31
|
+
|
|
32
|
+
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
|
33
|
+
trace: 'on-first-retry',
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
/* Configure projects for major browsers */
|
|
37
|
+
projects: [
|
|
38
|
+
// 1. Login to Grafana and store the cookie on disk for use in other tests.
|
|
39
|
+
{
|
|
40
|
+
name: 'auth',
|
|
41
|
+
testDir: pluginE2eAuth,
|
|
42
|
+
testMatch: [/.*\.js/],
|
|
43
|
+
},
|
|
44
|
+
// 2. Run tests in Google Chrome. Every test will start authenticated as admin user.
|
|
45
|
+
{
|
|
46
|
+
name: 'chromium',
|
|
47
|
+
use: {
|
|
48
|
+
...devices['Desktop Chrome'],
|
|
49
|
+
storageState: 'playwright/.auth/admin.json',
|
|
50
|
+
},
|
|
51
|
+
dependencies: ['auth'],
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
});
|
package/templates/common/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
24
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"license": "Apache-2.0",
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@grafana/eslint-config": "^9.0.0",
|
|
20
|
-
"@grafana/plugin-e2e": "^3.
|
|
20
|
+
"@grafana/plugin-e2e": "^3.11.0",
|
|
21
21
|
"@grafana/sign-plugin": "^3.3.3",
|
|
22
22
|
"@grafana/tsconfig": "^2.2.0",
|
|
23
23
|
"@playwright/test": "^1.62.1",{{#if useExperimentalRspack}}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { PluginOptions } from '@grafana/plugin-e2e';
|
|
2
|
-
import { defineConfig
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
const pluginE2eAuth = `${dirname(require.resolve('@grafana/plugin-e2e'))}/auth`;
|
|
2
|
+
import { defineConfig } from '@playwright/test';
|
|
3
|
+
import baseConfig from './.config/playwright.config';
|
|
6
4
|
|
|
7
5
|
/**
|
|
8
6
|
* Read environment variables from file.
|
|
@@ -13,42 +11,7 @@ const pluginE2eAuth = `${dirname(require.resolve('@grafana/plugin-e2e'))}/auth`;
|
|
|
13
11
|
/**
|
|
14
12
|
* See https://playwright.dev/docs/test-configuration.
|
|
15
13
|
*/
|
|
16
|
-
export default defineConfig<PluginOptions>({
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
fullyParallel: true,
|
|
20
|
-
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
|
21
|
-
forbidOnly: !!process.env.CI,
|
|
22
|
-
/* Retry on CI only */
|
|
23
|
-
retries: process.env.CI ? 2 : 0,
|
|
24
|
-
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
|
25
|
-
reporter: 'html',
|
|
26
|
-
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
|
27
|
-
use: {
|
|
28
|
-
/* Base URL to use in actions like `await page.goto('/')`. */
|
|
29
|
-
baseURL: process.env.GRAFANA_URL || 'http://localhost:3000',
|
|
30
|
-
|
|
31
|
-
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
|
32
|
-
trace: 'on-first-retry',
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
/* Configure projects for major browsers */
|
|
36
|
-
projects: [
|
|
37
|
-
// 1. Login to Grafana and store the cookie on disk for use in other tests.
|
|
38
|
-
{
|
|
39
|
-
name: 'auth',
|
|
40
|
-
testDir: pluginE2eAuth,
|
|
41
|
-
testMatch: [/.*\.js/],
|
|
42
|
-
},
|
|
43
|
-
// 2. Run tests in Google Chrome. Every test will start authenticated as admin user.
|
|
44
|
-
{
|
|
45
|
-
name: 'chromium',
|
|
46
|
-
use: {
|
|
47
|
-
...devices['Desktop Chrome'],
|
|
48
|
-
storageState: 'playwright/.auth/admin.json',
|
|
49
|
-
},
|
|
50
|
-
dependencies: ['auth'],
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
|
|
14
|
+
export default defineConfig<PluginOptions>(baseConfig, {
|
|
15
|
+
// Add your own configuration here.
|
|
16
|
+
// See https://grafana.com/developers/plugin-tools/how-to-guides/extend-configurations#extend-the-playwright-config for further info.
|
|
54
17
|
});
|