File tree 4 files changed +73
-0
lines changed
4 files changed +73
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : E2E
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ pull_request :
8
+ branches :
9
+ - main
10
+
11
+ jobs :
12
+ tests :
13
+ runs-on : ubuntu-latest
14
+
15
+ steps :
16
+ - uses : actions/checkout@v3
17
+
18
+ - name : Setup Node.js environment
19
+ uses : actions/setup-node@v3
20
+ with :
21
+ node-version : ' 18'
22
+ cache : ' npm'
23
+
24
+ - name : Install dependencies
25
+ run : npm install
26
+
27
+ - name : Build
28
+ run : npm run build
29
+
30
+ - name : Start Grafana
31
+ run : docker-compose up -d
32
+
33
+ - name : Run e2e tests
34
+ run : npm run e2e
35
+
36
+ - name : Stop Grafana
37
+ run : docker-compose down
38
+
39
+ - uses : actions/upload-artifact@v3
40
+ if : failure()
41
+ with :
42
+ path : |
43
+ cypress/videos
44
+ cypress/screenshots/actual
Original file line number Diff line number Diff line change 8
8
- Migrate to Plugin Tools 1.5.2 (#51 )
9
9
- Update to Node 18 and npm (#51 )
10
10
- Update to Grafana 10.0.0 (#51 )
11
+ - Add E2E Cypress testing (#52 )
11
12
12
13
## 2.4.0 (2023-04-08)
13
14
Original file line number Diff line number Diff line change
1
+ import { e2e } from '@grafana/e2e' ;
2
+
3
+ /**
4
+ * Dashboard
5
+ */
6
+ const json = require ( '../../provisioning/dashboards/panels.json' ) ;
7
+ const testedPanel = json . panels [ 0 ] ;
8
+
9
+ /**
10
+ * Panel
11
+ */
12
+ describe ( 'Viewing a panel with a Data Source' , ( ) => {
13
+ beforeEach ( ( ) => {
14
+ e2e . flows . openDashboard ( {
15
+ uid : json . uid ,
16
+ } ) ;
17
+ } ) ;
18
+
19
+ it ( 'Should display a Dynamic Text with Data Source' , ( ) => {
20
+ const currentPanel = e2e . components . Panels . Panel . title ( testedPanel . title ) ;
21
+ currentPanel . should ( 'be.visible' ) ;
22
+ } ) ;
23
+ } ) ;
Original file line number Diff line number Diff line change
1
+ {
2
+ "compilerOptions" : {
3
+ "types" : [" cypress" ]
4
+ }
5
+ }
You can’t perform that action at this time.
0 commit comments