File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,11 @@ Feature: Errors while in view mode
19
19
When I open the "Delivery" dashboard
20
20
Then the "Delivery" dashboard displays in view mode
21
21
22
+ @nonmutating
23
+ Scenario : I navigate to a dashboard that fails to load
24
+ Given I type a dashboard id in the browser url that fails to load
25
+ Then a warning message is displayed stating that the dashboard could not be loaded
26
+
22
27
# @nonmutating
23
28
# Scenario: I navigate to print dashboard that doesn't exist
24
29
# Given I type an invalid print dashboard id in the browser url
Original file line number Diff line number Diff line change
1
+ import { When , Then } from '@badeball/cypress-cucumber-preprocessor'
2
+
3
+ When ( 'I type a dashboard id in the browser url that fails to load' , ( ) => {
4
+ console . log ( 'TEST RUNS' )
5
+
6
+ cy . intercept ( '**/dashboards/iMnYyBfSxmM**' , {
7
+ statusCode : 500 ,
8
+ body : 'Oopsie!' ,
9
+ } ) . as ( 'failure' )
10
+
11
+ cy . visit ( '#/iMnYyBfSxmM' )
12
+ cy . wait ( '@failure' )
13
+ } )
14
+
15
+ Then (
16
+ 'a warning message is displayed stating that the dashboard could not be loaded' ,
17
+ ( ) => {
18
+ cy . contains ( 'Load dashboard failed' ) . should ( 'exist' )
19
+ cy . contains (
20
+ 'This dashboard could not be loaded. Please try again later.'
21
+ ) . should ( 'exist' )
22
+ }
23
+ )
You can’t perform that action at this time.
0 commit comments