-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add E2E Cypress testing * Add minimum Grafana check * Update screenshot and README * Update docker-compose-nginx.yml * Update CHANGELOG.md
- Loading branch information
1 parent
1d64c9a
commit 00e895f
Showing
10 changed files
with
113 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: E2E | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Start Grafana (latest version) | ||
run: docker-compose up -d | ||
|
||
- name: Run e2e tests | ||
run: npm run e2e | ||
|
||
- name: Stop Grafana | ||
run: docker-compose down | ||
|
||
- name: Start Grafana (minimum required version) | ||
run: docker-compose -f docker-compose-min.yml up -d | ||
|
||
- name: Run e2e tests | ||
run: npm run e2e | ||
|
||
- name: Stop Grafana | ||
run: docker-compose -f docker-compose-min.yml down | ||
|
||
- uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
path: | | ||
cypress/videos | ||
cypress/screenshots/actual |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { e2e } from '@grafana/e2e'; | ||
|
||
/** | ||
* Dashboard | ||
*/ | ||
const json = require('../../provisioning/dashboards/panels.json'); | ||
const testedPanel = json.panels[0]; | ||
|
||
/** | ||
* Panel | ||
*/ | ||
describe('Viewing a panel with a Data Source', () => { | ||
beforeEach(() => { | ||
e2e.flows.openDashboard({ | ||
uid: json.uid, | ||
}); | ||
}); | ||
|
||
it('Should display a Table with Environment Variables', () => { | ||
const currentPanel = e2e.components.Panels.Panel.title(testedPanel.title); | ||
currentPanel.should('be.visible'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"compilerOptions": { | ||
"types": ["cypress"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: '3.4' | ||
|
||
services: | ||
grafana: | ||
container_name: grafana | ||
image: grafana/grafana:9.0.0 | ||
ports: | ||
- 3000:3000 | ||
environment: | ||
- GF_AUTH_ANONYMOUS_ENABLED=true | ||
- GF_DEFAULT_APP_MODE=development | ||
- GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/etc/grafana/provisioning/dashboards/panels.json | ||
volumes: | ||
- ./dist:/var/lib/grafana/plugins/volkovlabs-env-datasource | ||
- ./provisioning:/etc/grafana/provisioning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters