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

[E2E] Fix native filter revision history flake (#23361)

* Fix the flake

* Simplify the query

* Use better assertion

* Add an extra assertion
parent 79965714
No related branches found
No related tags found
No related merge requests found
......@@ -27,6 +27,8 @@ const nativeQuery = {
describe("issue 12581", () => {
beforeEach(() => {
cy.intercept("POST", "/api/dataset").as("dataset");
restore();
cy.signInAsAdmin();
......@@ -46,7 +48,7 @@ describe("issue 12581", () => {
.type("{selectall}{backspace}", { delay: 50 });
cy.get("@editor")
.click()
.type("{selectall}{backspace}SELECT * FROM ORDERS");
.type("{selectall}{backspace}SELECT 1");
cy.findByText("Save").click();
modal().within(() => {
......@@ -54,15 +56,25 @@ describe("issue 12581", () => {
});
cy.reload();
cy.wait("@cardQuery");
cy.findByTestId("revision-history-button").click();
// Make sure sidebar opened and the history loaded
cy.findByText("You created this");
cy.findByTestId("question-revert-button").click(); // Revert to the first revision
cy.wait("@dataset");
cy.findByText("You reverted to an earlier revision");
cy.findByText(/Open Editor/i).click();
cy.log("Reported failing on v0.35.3");
cy.get("@editor")
.should("be.visible")
.contains(ORIGINAL_QUERY);
.and("contain", ORIGINAL_QUERY);
cy.findByText("37.65");
// Filter dropdown field
filterWidget().contains("Filter");
});
......
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