cypress-wp-utils icon indicating copy to clipboard operation
cypress-wp-utils copied to clipboard

classicCreatePost fails if default tab is "Text"

Open cadic opened this issue 3 years ago • 0 comments

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

image

Environment information

No response

WordPress information

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

cadic avatar Dec 16 '22 12:12 cadic