Skip to content

Commit a7a1e1d

Browse files
committed
Ensure that the term is created.
1 parent 2cccf25 commit a7a1e1d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/cypress/e2e/admin.test.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,17 @@ describe("Admin can login and open dashboard", () => {
4444
});
4545

4646
it("Ensure that you can add new block catalog.", () => {
47+
const termName = Array.from({ length: 10 }, () => String.fromCharCode(97 + Math.floor(Math.random() * 26))).join('');
48+
4749
cy.visit("/wp-admin");
4850
cy.get("#menu-posts").contains('Posts').trigger("mouseover").trigger("mouseenter");
4951
cy.get("#menu-posts .wp-submenu").scrollIntoView({ block: "center" }).should("exist");
5052
cy.get("#menu-posts .wp-submenu a").contains("Block Catalog").scrollIntoView({ block: "center" }).click({ force: true });
51-
cy.get('#tag-name').type('Quote');
53+
cy.get('#tag-name').type(termName);
5254
cy.get('select[name="parent"]').select('Core');
5355
cy.get('#submit').click();
56+
cy.get('.notice-success').contains('Item added.').should('exist');
57+
cy.contains('.row-title', termName).should('exist');
5458
});
5559

5660
it("Make sure indexed post type should be delete when you click on 'Delete Index' Button.", () => {

0 commit comments

Comments
 (0)