Skip to content

Commit ce052b9

Browse files
committed
Update E2E tests.
1 parent f8a38be commit ce052b9

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tests/cypress/e2e/block.test.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@ describe('Block Tests', () => {
1616
it('Admin can create a Signup form using Mailchimp block', () => {
1717
const postTitle = 'Mailchimp signup form - Block';
1818
const beforeSave = () => {
19-
cy.insertBlock('mailchimp/mailchimp', 'Mailchimp List Subscribe Form');
19+
cy.insertBlock('mailchimp/mailchimp', 'Mailchimp List Subscribe Form').then(
20+
(blockId) => {
21+
cy.getBlockEditor()
22+
.find(`#${blockId} .block-editor-block-variation-picker__skip button`)
23+
.click();
24+
},
25+
);
2026
cy.wait(500);
2127
};
2228
cy.createPost({ title: postTitle, content: '', beforeSave }).then((postBlock) => {
@@ -239,6 +245,11 @@ describe('Block Tests', () => {
239245
cy.get('#mc_signup_submit').should('exist');
240246

241247
cy.visit(`/wp-admin/post.php?post=${oldBlockPostId}&action=edit`);
248+
cy.getBlockEditor()
249+
.find(
250+
'.wp-block-mailchimp-mailchimp .block-editor-block-variation-picker__skip button',
251+
)
252+
.click();
242253
const header = '[NEW BLOCK] Subscribe to our newsletter';
243254
cy.getBlockEditor()
244255
.find('h2[aria-label="Enter a header (optional)"]')

0 commit comments

Comments
 (0)