Skip to content

Commit 7b1277d

Browse files
Remove test to verify form is not visible on fe if no list is saved
This test was decided to be a 'doing it wrong' site owner scenario. Any use of the plugin would require saving a list and therfore this is not a test we will be including
1 parent ad9334d commit 7b1277d

File tree

2 files changed

+3
-32
lines changed

2 files changed

+3
-32
lines changed

.env.test.sample

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66
CYPRESS_MAILCHIMP_USERNAME="your mailchimp username"
77
CYPRESS_MAILCHIMP_PASSWORD="your mailchimp password"
88

9-
# User has never selected a list
10-
CYPRESS_MAILCHIMP_USERNAME_NO_LIST="your mailchimp username"
11-
CYPRESS_MAILCHIMP_PASSWORD_NO_LIST="your mailchimp password"
12-
139
# Generate API Key: https://mailchimp.com/help/about-api-keys/
1410
CYPRESS_MAILCHIMP_API_KEY="generate an API key from your mailchimp account and paste here" # e.g. "1234567890abcdef1234567890abcdef-us19"
1511
CYPRESS_MAILCHIMP_API_SERVER_PREFIX="" # e.g "us19" - your server prefix may be different

tests/cypress/e2e/settings/list.test.js

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -46,32 +46,7 @@ describe('Mailchimp lists ', () => {
4646
cy.get('input[value="Update Subscribe Form Settings"]').should('exist');
4747
});
4848

49-
it('Admin that has never saved a list can not see the form on the front end', () => {
50-
// Step 1: Log the user out of the current account (if logged in)
51-
cy.visit('/wp-admin/admin.php?page=mailchimp_sf_options');
52-
cy.mailchimpLogout();
53-
54-
// Verify the user is logged out
55-
cy.get('#mailchimp_sf_oauth_connect').should('exist');
56-
57-
// Step 2: Log in with a test user account that has never saved a list
58-
cy.mailchimpLogin(Cypress.env('MAILCHIMP_USERNAME_NO_LIST'), Cypress.env('MAILCHIMP_PASSWORD_NO_LIST'));
59-
cy.visit('/wp-admin/admin.php?page=mailchimp_sf_options');
60-
61-
// Step 3: Verify no list is saved for the test user
62-
cy.get('#mc_list_id').should('have.value', ''); // Assuming empty value indicates no list is saved
63-
64-
// Step 4: Verify there is no settings form if no list is saved
65-
// If there are no Update Subscribe Form Settings buttons then we can assume no settings form is visible
66-
cy.get('input[value="Update Subscribe Form Settings"]').should('not.exist');
67-
68-
// Step 5: Verify the signup form is not displayed on the frontend
69-
cy.visit('/'); // Navigate to the frontend homepage
70-
cy.get('#mc_signup').should('not.exist'); // Ensure the form does not exist
71-
72-
// Clean up
73-
cy.visit('/wp-admin/admin.php?page=mailchimp_sf_options');
74-
cy.mailchimpLogout();
75-
cy.mailchimpLogin();
76-
});
49+
// This test has been decided to be skipped and marked as a "doing it wrong" site owner scenario
50+
// We are not worried about this testing scenario
51+
it.skip('Admin that has never saved a list can not see the form on the front end', () => {});
7752
});

0 commit comments

Comments
 (0)