Skip to content

Commit

Permalink
Fix shortcode form create issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdharmesh committed Aug 9, 2024
1 parent c633d39 commit 1caefec
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/cypress/e2e/settings.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ describe('Admin can update plugin settings', () => {
const postTitle = 'Mailchimp signup form - shortcode';
const beforeSave = () => {
cy.insertBlock('core/shortcode').then((id) => {
cy.get(`#${id} .blocks-shortcode__textarea`).type('[mailchimpsf_form]');
cy.getBlockEditor()
.find(`#${id} .blocks-shortcode__textarea`)
.clear()
.type('[mailchimpsf_form]');
});
};
cy.createPost({ title: postTitle, content: '', beforeSave }).then((post) => {
Expand All @@ -41,6 +44,7 @@ describe('Admin can update plugin settings', () => {
const postTitle = 'Mailchimp signup form - Block';
const beforeSave = () => {
cy.insertBlock('mailchimp/mailchimp', 'Mailchimp List Subscribe Form');
cy.wait(500);
};
cy.createPost({ title: postTitle, content: '', beforeSave }).then((postBlock) => {
if (postBlock) {
Expand Down

0 comments on commit 1caefec

Please sign in to comment.