File tree Expand file tree Collapse file tree 1 file changed +23
-9
lines changed
tests/cypress/e2e/settings Expand file tree Collapse file tree 1 file changed +23
-9
lines changed Original file line number Diff line number Diff line change 1
1
/* eslint-disable no-undef */
2
2
// This is failing all other tests that come after it by causing the tests to redirect to login
3
3
// This is causing some kind of error with the session data
4
- describe . skip ( 'Settings data persistence' , ( ) => {
4
+ describe ( 'Settings data persistence' , ( ) => {
5
+ before ( ( ) => {
6
+ cy . setDoubleOptInOption ( false ) ;
7
+ cy . setJavaScriptOption ( true ) ;
8
+ cy . setSettingsOption ( '#mc_update_existing' , false ) ;
9
+ } ) ;
10
+
5
11
it ( 'Settings and list selection remain persistent between logging out and logging back in with the same account' , ( ) => {
6
- cy . visit ( '/wp-admin/admin.php?page=mailchimp_sf_options' ) ;
12
+ cy . visit ( '/wp-admin/admin.php?page=mailchimp_sf_options' ) ;
13
+
14
+ // Initial settings
15
+ cy . get ( '#mc_double_optin' ) . should ( 'exist' ) . and ( 'not.be.checked' ) ;
16
+ cy . get ( '#mc_use_javascript' ) . should ( 'exist' ) . and ( 'be.checked' ) ;
17
+ cy . get ( '#mc_update_existing' ) . should ( 'exist' ) . and ( 'not.be.checked' ) ;
7
18
8
- // Logout
9
- cy . mailchimpLogout ( ) ;
10
- cy . logout ( ) ;
19
+ // Logout
20
+ cy . mailchimpLogout ( ) ;
21
+ cy . logout ( ) ;
11
22
12
- // Login
13
- cy . login ( ) ;
14
- cy . mailchimpLogin ( ) ;
23
+ // Login
24
+ cy . login ( ) ;
25
+ cy . mailchimpLogin ( ) ;
15
26
16
- // Assertions regarding settings here...
27
+ // Settings are still the same as before
28
+ cy . get ( '#mc_double_optin' ) . should ( 'exist' ) . and ( 'not.be.checked' ) ;
29
+ cy . get ( '#mc_use_javascript' ) . should ( 'exist' ) . and ( 'be.checked' ) ;
30
+ cy . get ( '#mc_update_existing' ) . should ( 'exist' ) . and ( 'not.be.checked' ) ;
17
31
} ) ;
18
32
} ) ;
You can’t perform that action at this time.
0 commit comments