Skip to content
Snippets Groups Projects
Unverified Commit 35f89e04 authored by Nemanja Glumac's avatar Nemanja Glumac Committed by GitHub
Browse files

Fix Cypress flakes in `dashboard/dashboard.cy.spec.js` file (#13703)

* Fix flakes in `revisions screen` block

* Improve test assertions (there were some rendering problems, so I adjusted the assertions)
parent 607d1b8d
No related branches found
No related tags found
No related merge requests found
......@@ -13,8 +13,7 @@ function saveDashboard() {
cy.findByText("You're editing this dashboard.").should("not.exist");
}
// [quarantine] flaky
describe.skip("scenarios > dashboard", () => {
describe("scenarios > dashboard", () => {
beforeEach(() => {
restore();
signInAsAdmin();
......@@ -191,19 +190,26 @@ describe.skip("scenarios > dashboard", () => {
cy.get(".Icon-ellipsis").click();
cy.findByText("Revision history").click();
cy.findByText("What");
cy.findByText("First revision.");
cy.get(".Modal").within(() => {
cy.get(".LoadingSpinner").should("not.exist");
});
cy.findAllByText("Bobby Tables");
cy.contains(/revert/i);
cy.get(".Modal .Icon-close").click();
cy.findByText("First revision.").should("not.exist");
cy.findAllByText("Bobby Tables").should("not.exist");
});
it("should open with url", () => {
cy.visit("/dashboard/1/history");
cy.get(".Modal").within(() => {
cy.get(".LoadingSpinner").should("not.exist");
cy.findByText("Revision history");
});
cy.findByText("Revision history");
cy.findByText("What");
cy.findByText("First revision.");
cy.findAllByText("Bobby Tables");
cy.contains(/revert/i);
});
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment