@@ -93,15 +93,13 @@ describe("whitelisted courses", () => {
93
93
cy . contains ( ".csm-btn" , / c s 6 1 a / i) . should ( "be.visible" ) ;
94
94
95
95
// view unrestricted courses; should show nothing
96
- cy . contains ( ".course-menu-sidebar-tab" , / u n r e s t r i c t e d / i)
97
- . click ( )
98
- . should ( "have.class" , "active" ) ;
96
+ cy . contains ( ".course-menu-sidebar-tab" , / u n r e s t r i c t e d / i) . click ( ) ;
97
+ cy . contains ( ".course-menu-sidebar-tab" , / u n r e s t r i c t e d / i) . should ( "have.class" , "active" ) ;
99
98
cy . contains ( ".csm-btn" , / c s 6 1 a / i) . should ( "not.exist" ) ;
100
99
101
100
// go to cs61a sections
102
- cy . contains ( ".course-menu-sidebar-tab" , / r e s t r i c t e d / i)
103
- . click ( )
104
- . should ( "have.class" , "active" ) ;
101
+ cy . contains ( ".course-menu-sidebar-tab" , / r e s t r i c t e d / i) . click ( ) ;
102
+ cy . contains ( ".course-menu-sidebar-tab" , / r e s t r i c t e d / i) . should ( "have.class" , "active" ) ;
105
103
cy . contains ( ".csm-btn" , / c s 6 1 a / i) . click ( ) ;
106
104
cy . get ( ".section-card" ) . should ( "have.length" , 1 ) . should ( "be.visible" ) ;
107
105
@@ -145,16 +143,14 @@ describe("whitelisted courses", () => {
145
143
cy . contains ( ".csm-btn" , / c s 7 0 / i) . should ( "not.exist" ) ;
146
144
147
145
// view unrestricted courses; should show cs70, but not cs61a
148
- cy . contains ( ".course-menu-sidebar-tab" , / u n r e s t r i c t e d / i)
149
- . click ( )
150
- . should ( "have.class" , "active" ) ;
146
+ cy . contains ( ".course-menu-sidebar-tab" , / u n r e s t r i c t e d / i) . click ( ) ;
147
+ cy . contains ( ".course-menu-sidebar-tab" , / u n r e s t r i c t e d / i) . should ( "have.class" , "active" ) ;
151
148
cy . contains ( ".csm-btn" , / c s 6 1 a / i) . should ( "not.exist" ) ;
152
149
cy . contains ( ".csm-btn" , / c s 7 0 / i) . should ( "be.visible" ) ;
153
150
154
151
// go to cs61a sections
155
- cy . contains ( ".course-menu-sidebar-tab" , / r e s t r i c t e d / i)
156
- . click ( )
157
- . should ( "have.class" , "active" ) ;
152
+ cy . contains ( ".course-menu-sidebar-tab" , / r e s t r i c t e d / i) . click ( ) ;
153
+ cy . contains ( ".course-menu-sidebar-tab" , / r e s t r i c t e d / i) . should ( "have.class" , "active" ) ;
158
154
cy . contains ( ".csm-btn" , / c s 6 1 a / i) . click ( ) ;
159
155
cy . get ( ".section-card" ) . should ( "have.length" , 1 ) . should ( "be.visible" ) ;
160
156
@@ -229,18 +225,16 @@ describe("whitelisted courses", () => {
229
225
cy . contains ( ".enrollment-container .enrollment-course" , / c s 6 1 a / i) . should ( "be.visible" ) ;
230
226
231
227
// view unrestricted courses; should show cs70, but not cs61a
232
- cy . contains ( ".course-menu-sidebar-tab" , / u n r e s t r i c t e d / i)
233
- . click ( )
234
- . should ( "have.class" , "active" ) ;
228
+ cy . contains ( ".course-menu-sidebar-tab" , / u n r e s t r i c t e d / i) . click ( ) ;
229
+ cy . contains ( ".course-menu-sidebar-tab" , / u n r e s t r i c t e d / i) . should ( "have.class" , "active" ) ;
235
230
cy . contains ( ".csm-btn" , / c s 6 1 a / i) . should ( "not.exist" ) ;
236
231
cy . contains ( ".csm-btn" , / c s 7 0 / i) . should ( "be.visible" ) ;
237
232
// should not show any enrollment times
238
233
cy . get ( ".enrollment-container" ) . should ( "not.exist" ) ;
239
234
240
235
// go to cs61a sections
241
- cy . contains ( ".course-menu-sidebar-tab" , / r e s t r i c t e d / i)
242
- . click ( )
243
- . should ( "have.class" , "active" ) ;
236
+ cy . contains ( ".course-menu-sidebar-tab" , / r e s t r i c t e d / i) . click ( ) ;
237
+ cy . contains ( ".course-menu-sidebar-tab" , / r e s t r i c t e d / i) . should ( "have.class" , "active" ) ;
244
238
cy . contains ( ".csm-btn" , / c s 6 1 a / i) . click ( ) ;
245
239
cy . get ( ".section-card" ) . should ( "have.length" , 1 ) . should ( "be.visible" ) ;
246
240
@@ -270,7 +264,8 @@ describe("whitelisted courses", () => {
270
264
. should ( "match" , / e n r o l l m e n t f a i l e d / i) ;
271
265
272
266
// dismiss modal
273
- cy . contains ( ".modal-contents .modal-btn" , / o k / i) . click ( ) . should ( "not.exist" ) ;
267
+ cy . contains ( ".modal-contents .modal-btn" , / o k / i) . click ( ) ;
268
+ cy . get ( ".modal-contents" ) . should ( "not.exist" ) ;
274
269
275
270
// go back to home page
276
271
cy . visit ( "/" ) ;
0 commit comments