@grafana/create-plugin 5.15.0-canary.1504.eae6df1.0 → 5.15.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 +27 -0
- package/package.json +2 -2
- package/templates/_partials/frontend-getting-started.md +1 -4
- package/templates/common/_package.json +1 -1
- package/templates/common/playwright.config +0 -2
- package/templates/github/workflows/ci.yml +14 -28
- package/templates/panel/tests/panel.spec.ts +8 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,30 @@
|
|
|
1
|
+
# v5.15.0 (Tue Feb 04 2025)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- chore(deps): update dependency @grafana/plugin-e2e to v1.17.1 [#1507](https://github.com/grafana/plugin-tools/pull/1507) ([@renovate[bot]](https://github.com/renovate[bot]))
|
|
6
|
+
|
|
7
|
+
#### Authors: 1
|
|
8
|
+
|
|
9
|
+
- [@renovate[bot]](https://github.com/renovate[bot])
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# v5.14.1 (Fri Jan 31 2025)
|
|
14
|
+
|
|
15
|
+
#### 🐛 Bug Fix
|
|
16
|
+
|
|
17
|
+
- CreatePlugin: Update that panel plugin template uses new panel edit options [#1502](https://github.com/grafana/plugin-tools/pull/1502) ([@mckn](https://github.com/mckn))
|
|
18
|
+
- chore(deps): update dependency @grafana/e2e-selectors to v11.5.0 [#1492](https://github.com/grafana/plugin-tools/pull/1492) ([@renovate[bot]](https://github.com/renovate[bot]) [@tolzhabayev](https://github.com/tolzhabayev))
|
|
19
|
+
|
|
20
|
+
#### Authors: 3
|
|
21
|
+
|
|
22
|
+
- [@renovate[bot]](https://github.com/renovate[bot])
|
|
23
|
+
- Marcus Andersson ([@mckn](https://github.com/mckn))
|
|
24
|
+
- Timur Olzhabayev ([@tolzhabayev](https://github.com/tolzhabayev))
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
1
28
|
# v5.14.0 (Tue Jan 28 2025)
|
|
2
29
|
|
|
3
30
|
#### 🚀 Enhancement
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grafana/create-plugin",
|
|
3
|
-
"version": "5.15.0
|
|
3
|
+
"version": "5.15.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"directory": "packages/create-plugin",
|
|
6
6
|
"url": "https://github.com/grafana/plugin-tools"
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"engines": {
|
|
87
87
|
"node": ">=20"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "9d8671c55a6c3508807e8721bae5ef055beb1ab7"
|
|
90
90
|
}
|
|
@@ -34,15 +34,12 @@
|
|
|
34
34
|
{{ packageManagerName }} run server
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
6. Run the E2E tests (using
|
|
37
|
+
6. Run the E2E tests (using Cypress)
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
40
|
# Spins up a Grafana instance first that we tests against
|
|
41
41
|
{{ packageManagerName }} run server
|
|
42
42
|
|
|
43
|
-
# If you wish to start a certain Grafana version
|
|
44
|
-
GRAFANA_VERSION=11.3.0 {{ packageManagerName }} run server
|
|
45
|
-
|
|
46
43
|
# Starts the tests
|
|
47
44
|
{{ packageManagerName }} run e2e
|
|
48
45
|
```
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
{{#if useCypress}} "@grafana/e2e": "^11.0.7",
|
|
22
22
|
"@grafana/e2e-selectors": "^11.5.0",{{/if}}
|
|
23
23
|
"@grafana/eslint-config": "^8.0.0",{{#if usePlaywright}}
|
|
24
|
-
"@grafana/plugin-e2e": "^1.
|
|
24
|
+
"@grafana/plugin-e2e": "^1.17.1",{{/if}}
|
|
25
25
|
"@grafana/tsconfig": "^2.0.0",{{#if usePlaywright}}
|
|
26
26
|
"@playwright/test": "^1.41.2",{{/if}}
|
|
27
27
|
"@stylistic/eslint-plugin-ts": "^2.9.0",
|
|
@@ -21,8 +21,6 @@ export default defineConfig<PluginOptions>({
|
|
|
21
21
|
forbidOnly: !!process.env.CI,
|
|
22
22
|
/* Retry on CI only */
|
|
23
23
|
retries: process.env.CI ? 2 : 0,
|
|
24
|
-
/* Opt out of parallel tests on CI. */
|
|
25
|
-
workers: process.env.CI ? 1 : undefined,
|
|
26
24
|
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
|
27
25
|
reporter: 'html',
|
|
28
26
|
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
|
@@ -11,10 +11,7 @@ on:
|
|
|
11
11
|
- master
|
|
12
12
|
- main
|
|
13
13
|
|
|
14
|
-
permissions:
|
|
15
|
-
contents: write
|
|
16
|
-
id-token: write
|
|
17
|
-
pull-requests: write
|
|
14
|
+
permissions: read-all
|
|
18
15
|
|
|
19
16
|
jobs:
|
|
20
17
|
build:
|
|
@@ -206,14 +203,6 @@ jobs:
|
|
|
206
203
|
id: run-tests
|
|
207
204
|
run: {{ packageManagerName }} run e2e
|
|
208
205
|
|
|
209
|
-
- name: Upload e2e test summary
|
|
210
|
-
uses: grafana/plugin-actions/playwright-gh-pages/upload-report-artifacts@main
|
|
211
|
-
if: $\{{ always() && !cancelled() }}
|
|
212
|
-
with:
|
|
213
|
-
upload-report: false
|
|
214
|
-
github-token: $\{{ secrets.GITHUB_TOKEN }}
|
|
215
|
-
test-outcome: $\{{ steps.run-tests.outcome }}
|
|
216
|
-
|
|
217
206
|
- name: Docker logs
|
|
218
207
|
if: $\{{ always() && steps.run-tests.outcome == 'failure' }}
|
|
219
208
|
run: |
|
|
@@ -222,23 +211,20 @@ jobs:
|
|
|
222
211
|
- name: Stop grafana docker
|
|
223
212
|
run: docker compose down
|
|
224
213
|
|
|
225
|
-
|
|
226
|
-
|
|
214
|
+
- name: Upload server log
|
|
215
|
+
uses: actions/upload-artifact@v4
|
|
216
|
+
if: $\{{ always() && steps.run-tests.outcome == 'failure' }}
|
|
217
|
+
with:
|
|
218
|
+
name: $\{{ matrix.GRAFANA_IMAGE.NAME }}-v$\{{ matrix.GRAFANA_IMAGE.VERSION }}-$\{{github.run_id}}-server-log
|
|
219
|
+
path: grafana-server.log
|
|
220
|
+
retention-days: 5
|
|
221
|
+
|
|
222
|
+
# Uncomment this step to upload the Playwright report to Github artifacts.
|
|
223
|
+
# If your repository is public, the report will be public on the Internet so beware not to expose sensitive information.
|
|
224
|
+
# - name: Upload artifacts
|
|
227
225
|
# uses: actions/upload-artifact@v4
|
|
228
226
|
# if: $\{{ always() && steps.run-tests.outcome == 'failure' }}
|
|
229
227
|
# with:
|
|
230
|
-
# name:
|
|
231
|
-
# path:
|
|
228
|
+
# name: playwright-report-$\{{ matrix.GRAFANA_IMAGE.NAME }}-v$\{{ matrix.GRAFANA_IMAGE.VERSION }}-$\{{github.run_id}}
|
|
229
|
+
# path: playwright-report/
|
|
232
230
|
# retention-days: 5
|
|
233
|
-
|
|
234
|
-
publish-report:
|
|
235
|
-
if: $\{{ always() && !cancelled() }}
|
|
236
|
-
needs: [playwright-tests]
|
|
237
|
-
runs-on: ubuntu-latest
|
|
238
|
-
steps:
|
|
239
|
-
- uses: actions/checkout@v4
|
|
240
|
-
- name: Publish report
|
|
241
|
-
uses: grafana/plugin-actions/playwright-gh-pages/deploy-report-pages@main
|
|
242
|
-
with:
|
|
243
|
-
github-token: $\{{ secrets.GITHUB_TOKEN }}
|
|
244
|
-
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as semver from 'semver';
|
|
2
1
|
import { test, expect } from '@grafana/plugin-e2e';
|
|
3
2
|
|
|
4
3
|
test('should display "No data" in case panel data is empty', async ({
|
|
@@ -22,23 +21,15 @@ test('should display circle when data is passed to the panel', async ({
|
|
|
22
21
|
});
|
|
23
22
|
|
|
24
23
|
test('should display series counter when "Show series counter" option is enabled', async ({
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
gotoPanelEditPage,
|
|
25
|
+
readProvisionedDashboard,
|
|
27
26
|
page,
|
|
28
|
-
selectors,
|
|
29
|
-
grafanaVersion
|
|
30
27
|
}) => {
|
|
31
|
-
const
|
|
32
|
-
await
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
selectors.components.PanelEditor.OptionsPane.fieldLabel('{{titleCase pluginName }} Show series counter')
|
|
38
|
-
);
|
|
39
|
-
const switchField = semver.gte(grafanaVersion, '11.4.0')
|
|
40
|
-
? seriesCounterLabel.getByRole('switch')
|
|
41
|
-
: seriesCounterLabel.getByLabel('Toggle switch');
|
|
42
|
-
await switchField.click({ force: true });
|
|
28
|
+
const dashboard = await readProvisionedDashboard({ fileName: 'dashboard.json' });
|
|
29
|
+
const panelEditPage = await gotoPanelEditPage({ dashboard, id: '1' });
|
|
30
|
+
const options = panelEditPage.getCustomOptions('{{titleCase pluginName }}');
|
|
31
|
+
const showSeriesCounter = options.getSwitch('Show series counter');
|
|
32
|
+
|
|
33
|
+
await showSeriesCounter.check();
|
|
43
34
|
await expect(page.getByTestId('simple-panel-series-counter')).toBeVisible();
|
|
44
35
|
});
|