-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Load billing md after admin login.
- Loading branch information
1 parent
cc333db
commit e9bb7b6
Showing
5 changed files
with
85 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -375,3 +375,36 @@ describe("Additional page content", () => { | |
cy.findByTestId("sidebar").should("be.visible"); | ||
}); | ||
}); | ||
|
||
describe("Given some previously loaded approved proposals", () => { | ||
beforeEach(() => { | ||
cy.ticketvoteMiddleware("inventory", { | ||
fixedInventory: { | ||
vetted: { | ||
approved: ["token01", "token02", "token03", "token04", "token05"] | ||
} | ||
} | ||
}); | ||
cy.ticketvoteMiddleware("summaries", { amountByStatus: { approved: 5 } }); | ||
cy.piMiddleware("billingstatuschanges", { | ||
amountByStatus: { 3: 5 }, | ||
billingChangesAmount: 0 | ||
}); | ||
cy.recordsMiddleware("records", { status: 2, state: 2 }); | ||
cy.intercept("/api/v1/login", (req) => { | ||
req.reply({}); | ||
}); | ||
}); | ||
it("should fetch the billing changes after admin login", () => { | ||
cy.visit("/?tab=approved"); | ||
cy.wait("@records.records"); | ||
cy.userEnvironment("admin"); | ||
cy.findByTestId("nav-login").click(); | ||
cy.findByLabelText(/email/i).type("[email protected]"); | ||
cy.findByLabelText(/password/i).type("123123123"); | ||
cy.findByTestId("login-form-button").click(); | ||
cy.findByTestId("tab-1").click(); | ||
cy.wait(1000); | ||
cy.get("@pi.billingstatuschanges.all").should("have.length", 1); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters