Skip to content

Commit

Permalink
fix test (#2390)
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhsaxena authored Dec 29, 2020
1 parent ea366b1 commit 13fae1a
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,27 @@ describe("Pages", function() {
);

// to check if apis are cloned
cy.get(".t--entity-name:contains(Page1)").click({ multiple: true });
cy.get(".t--entity-name:contains(APIs)")
.last()
.click();
cy.get(".bp3-icon-caret-right ~ .t--entity-name:contains(Page1)").click({
multiple: true,
});
cy.get(".bp3-icon-caret-right ~ .t--entity-name:contains(APIs)").click({
multiple: true,
});
cy.get(`.t--entity-name:contains(${apiName})`).should("have.length", 2);
});

it("Creates a page with long name and checks if it shows tooltip on hover", () => {
cy.Createpage(veryLongPageName);
cy.PublishtheApp();
cy.get(".t--page-switch-tab:nth-child(3)").trigger("mouseover");
cy.get(".bp3-popover-content").should($x => {
cy.get(".bp3-popover-content").should(($x) => {
expect($x).contain(veryLongPageName);
});
});

it("Checks if 404 is showing correct route", () => {
cy.visit("/route-that-does-not-exist");
cy.get(".bold-text").should($x => {
cy.get(".bold-text").should(($x) => {
expect($x).contain("Page not found");
});
});
Expand Down

0 comments on commit 13fae1a

Please sign in to comment.