@@ -27,7 +27,7 @@ describe('Overview > Dashboard Tests', () => {
27
27
} ) ;
28
28
} ) ;
29
29
30
- it ( 'Can add and remove a widget' , ( ) => {
30
+ it ( 'Add and remove a widget' , ( ) => {
31
31
const newCards = [ ] ;
32
32
let newCard = '' ;
33
33
@@ -70,7 +70,7 @@ describe('Overview > Dashboard Tests', () => {
70
70
} ) ;
71
71
} ) ;
72
72
73
- it ( 'Can minimize a widget' , ( ) => {
73
+ it ( 'Minimize a widget' , ( ) => {
74
74
cy . get ( '.card-pf' ) . then ( ( cards ) => {
75
75
cy . get ( cards [ 0 ] ) . then ( ( card ) => {
76
76
cy . get ( card . children ( ) [ 0 ] . children [ 0 ] . children [ 0 ] ) . click ( ) . then ( ( ) => {
@@ -83,29 +83,26 @@ describe('Overview > Dashboard Tests', () => {
83
83
} ) ;
84
84
} ) ;
85
85
86
- // TODO: Fix the maximize test
87
- // cy.get('.card-pf').then((cards) => {
88
- // cy.get(cards[0]).then((card) => {
89
- // cy.get(card.children()[0].children[0].children[0]).click().then(() => {
90
- // cy.get('.bx--overflow-menu-options').then((menuItems) => {
91
- // cy.get(menuItems.children()[1]).click().then(() => {
92
- // expect(card.children()[1].style.display).to.equal('block');
93
- // });
94
- // });
95
- // });
96
- // });
97
- // });
86
+ // TODO: Fix the maximize test
87
+ // cy.get('.card-pf').then((cards) => {
88
+ // cy.get(cards[0]).then((card) => {
89
+ // cy.get(card.children()[0].children[0].children[0]).click().then(() => {
90
+ // cy.get('.bx--overflow-menu-options').then((menuItems) => {
91
+ // cy.get(menuItems.children()[1]).click().then(() => {
92
+ // expect(card.children()[1].style.display).to.equal('block');
93
+ // });
94
+ // });
95
+ // });
96
+ // });
97
+ // });
98
98
} ) ;
99
99
100
- it ( 'Can zoom a widget' , ( ) => {
101
- cy . get ( '#lightbox-panel' ) . then ( ( div ) => {
102
- expect ( div [ 0 ] . style . display ) . to . equal ( '' ) ;
103
- } ) ;
100
+ it ( 'Zoom a widget' , ( ) => {
104
101
cy . get ( '.card-pf' ) . then ( ( cards ) => {
105
102
cy . get ( cards [ 0 ] ) . then ( ( card ) => {
106
103
cy . get ( card . children ( ) [ 0 ] . children [ 0 ] . children [ 0 ] ) . click ( ) . then ( ( ) => {
107
104
cy . get ( '.bx--overflow-menu-options' ) . then ( ( menuItems ) => {
108
- cy . get ( menuItems . children ( ) [ 2 ] ) . click ( ) . then ( ( ) => {
105
+ cy . get ( menuItems . children ( ) [ 4 ] ) . click ( ) . then ( ( ) => {
109
106
cy . get ( '#zoomed_chart_div' ) . contains ( defaultCards [ 0 ] ) ;
110
107
cy . get ( '#lightbox-panel' ) . then ( ( div ) => {
111
108
expect ( div [ 0 ] . style . display ) . to . equal ( 'block' ) ;
@@ -117,14 +114,14 @@ describe('Overview > Dashboard Tests', () => {
117
114
} ) ;
118
115
} ) ;
119
116
120
- it ( 'Can refresh a widget' , ( ) => {
117
+ it ( 'Refresh a widget' , ( ) => {
121
118
cy . get ( '.card-pf' ) . then ( ( cards ) => {
122
119
cy . get ( cards [ 0 ] ) . then ( ( card ) => {
123
120
const newId = cards [ 0 ] . children [ 1 ] . id . split ( '_' ) [ 1 ] . replace ( 'w' , '' ) ;
124
121
cy . intercept ( 'GET' , `/dashboard/widget_chart_data/${ newId } ` ) . as ( 'get' ) ;
125
122
cy . get ( card . children ( ) [ 0 ] . children [ 0 ] . children [ 0 ] ) . click ( ) . then ( ( ) => {
126
123
cy . get ( '.bx--overflow-menu-options' ) . then ( ( menuItems ) => {
127
- cy . get ( menuItems . children ( ) [ 3 ] ) . click ( ) . then ( ( ) => {
124
+ cy . get ( menuItems . children ( ) [ 5 ] ) . click ( ) . then ( ( ) => {
128
125
cy . wait ( '@get' ) . then ( ( getCall ) => {
129
126
expect ( getCall . state ) . to . equal ( 'Complete' ) ;
130
127
expect ( [ 200 , 304 ] ) . to . include ( getCall . response . statusCode ) ;
0 commit comments