cypress-wp-utils
cypress-wp-utils copied to clipboard
classicCreatePost fails if default tab is "Text"
Describe the bug
In some testing scenarios user might change the tab from "Visual" to "Text". The next call of classicCreatePost() will fail.
Steps to Reproduce
// This will succeed.
cy.classicCreatePost({
title: "First post",
beforeSave: () => {
cy.get("#content-html").click(); // Change tab to "Text"
cy.get("#content")
.click()
.type("Add raw text");
},
});
// This one will fail.
cy.classicCreatePost({ title: "Second post" });
Screenshots, screen recording, code snippet
Environment information
No response
WordPress information
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct