-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2117 from cardano-foundation/feature/MET-1521-upd…
…ate-cypress-test-for-the-new-functions feat: MET-1521 update cypress test for these new functions
- Loading branch information
Showing
33 changed files
with
404 additions
and
260 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 |
---|---|---|
@@ -1,40 +1,41 @@ | ||
describe("Delegator Lifecycle", () => { | ||
beforeEach(() => { | ||
cy.visit("/staking-lifecycle"); | ||
cy.get("input[placeholder*='Search stake address or pool ID']").type(stakeId); | ||
cy.get("input[placeholder*='Search stake address or pool ID']").type("{enter}"); | ||
}); | ||
const stakeId = "stake1u8a5n0u7j7y0tvxu0czxr08064n7fhalp0yae25znh0p8xs0yka8k"; | ||
it("should navigate to staking delegation", () => { | ||
cy.visit("/staking-lifecycle"); | ||
cy.get("input[placeholder*='address or pool id']").type(stakeId); | ||
cy.get("input[placeholder*='address or pool id']").type("{enter}"); | ||
cy.get('[data-testid="delegator-registration-container"]').should("be.visible"); | ||
cy.get('[id="step-1"]').click(); | ||
cy.get('[data-testid="delegator-delegation-container"]').should("be.visible"); | ||
}); | ||
it("should on delegation list", () => { | ||
cy.visit("/staking-lifecycle"); | ||
cy.get("input[placeholder*='address or pool id']").type(stakeId); | ||
cy.get("input[placeholder*='address or pool id']").type("{enter}"); | ||
cy.get('[id="step-1"]').click(); | ||
cy.get('[data-testid="delegator-delegation-container"]').should("be.visible"); | ||
}); | ||
it("should on rewards distribution list", () => { | ||
cy.visit("/staking-lifecycle"); | ||
cy.get("input[placeholder*='address or pool id']").type(stakeId); | ||
cy.get("input[placeholder*='address or pool id']").type("{enter}"); | ||
cy.get('[id="step-2"]').click(); | ||
cy.get(".css-zq7rup").contains("Rewards Distribution"); | ||
cy.get("p").contains("Rewards Distribution"); | ||
}); | ||
it("should on rewards withdrawal", () => { | ||
cy.visit("/staking-lifecycle"); | ||
cy.get("input[placeholder*='address or pool id']").type(stakeId); | ||
cy.get("input[placeholder*='address or pool id']").type("{enter}"); | ||
cy.get('[id="step-3"]').click(); | ||
cy.get('[data-testid="overview-staking"]').should("be.visible"); | ||
}); | ||
it.only("should on deregistration", () => { | ||
cy.visit("/staking-lifecycle"); | ||
cy.get("input[placeholder*='address or pool id']").type(stakeId); | ||
cy.get("input[placeholder*='address or pool id']").type("{enter}"); | ||
it("should on deregistration", () => { | ||
cy.get('[id="step-4"]').click(); | ||
cy.wait(1000); | ||
cy.get('[data-testid="delegator-deregistration-certificate"]').should("be.visible"); | ||
}); | ||
|
||
it("should on random stake", () => { | ||
cy.visit("/staking-lifecycle"); | ||
cy.get("button[data-testid='dropdown-menu-button']").click(); | ||
cy.get("ul li").contains("Browse an example delegator").click(); | ||
}); | ||
|
||
it("should on random pool", () => { | ||
cy.visit("/staking-lifecycle"); | ||
cy.get("button[data-testid='dropdown-menu-button']").click(); | ||
cy.get("ul li").contains("Browse an example stake pool").click(); | ||
}); | ||
}); |
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
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
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
Oops, something went wrong.