Skip to content

Commit

Permalink
Fix theme issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdharmesh committed Oct 13, 2023
1 parent 7d35532 commit b5376bf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
9 changes: 7 additions & 2 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
{
"plugins": ["."],
"plugins": [
"."
],
"themes": [
"https://downloads.wordpress.org/theme/twentytwentyone.zip"
],
"env": {
"tests": {
"mappings": {
"wp-cli.yml": "./tests/bin/wp-cli.yml"
}
}
}
}
}
8 changes: 5 additions & 3 deletions tests/cypress/integration/check-avatar-fe.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,16 @@ describe("Check avatar on a post", () => {
cy.visit("/wp-admin/profile.php");

cy.get('input[name="simple_local_avatar_rating"][value="PG"]').check();
cy.get("#description").type("Admin bio");
cy.get("#description").clear().type("Admin bio");
cy.get("#submit").click();

cy.reload();

cy.get('input[name="simple_local_avatar_rating"][value="PG"]').should(
"be.checked"
);
cy.get('input[name="simple_local_avatar_rating"][value="G"]').check();
cy.get("#submit").click();
});

it("Does the avatar appear on a created post?", () => {
Expand All @@ -47,9 +49,9 @@ describe("Check avatar on a post", () => {
cy.get("body").then(($body) => {
if (
0 !==
$body.find('.theme[data-slug="twentytwenty"] .button.activate').length
$body.find('.theme[data-slug="twentytwentyone"] .button.activate').length
) {
cy.get('.theme[data-slug="twentytwenty"] .button.activate').click({
cy.get('.theme[data-slug="twentytwentyone"] .button.activate').click({
force: true,
});
}
Expand Down

0 comments on commit b5376bf

Please sign in to comment.