diff --git a/cypress/e2e/claim-portal-failure.cy.ts b/cypress/e2e/claim-portal-failure.cy.ts index d20cd09e..96ab8dd4 100644 --- a/cypress/e2e/claim-portal-failure.cy.ts +++ b/cypress/e2e/claim-portal-failure.cy.ts @@ -18,12 +18,12 @@ describe("Claims Portal Failures", () => { }); it("should handle no connected signer", () => { - cy.get(".additional-details", { timeout: 15000 }).first().should("be.visible").invoke("click"); + cy.get("#additionalDetails", { timeout: 15000 }).should("be.visible").invoke("click"); - cy.get("button.make-claim").first().should("be.visible").click(); - cy.get(".invalidator").should("not.be.visible"); - cy.get(".claim-loader").should("not.be.visible"); - cy.get(".view-claim").should("not.be.visible").and("include.text", "View Claim"); + cy.get("button[id='make-claim']").should("be.visible").click(); + cy.get("#invalidator").should("not.be.visible"); + cy.get("#claim-loader").should("not.be.visible"); + cy.get("#view-claim").should("not.be.visible").and("include.text", "View Claim"); cy.get("body").should("contain.text", "Please connect your wallet to claim this reward."); }); @@ -46,11 +46,11 @@ describe("Claims Portal Failures", () => { }); it("should handle feedback for a failed wallet provider transaction", () => { - cy.get(".additional-details", { timeout: 15000 }).first().should("be.visible").invoke("click"); + cy.get("#additionalDetails", { timeout: 15000 }).should("be.visible").invoke("click"); - cy.get("button.make-claim").first().should("be.visible").click(); - cy.get(".claim-loader").first().should("be.visible"); - cy.get(".invalidator").first().should("not.be.visible"); + cy.get("button[id='make-claim']").should("be.visible").click(); + cy.get("#claim-loader").should("be.visible"); + cy.get("#invalidator").should("not.be.visible"); // cy.get("#claim-loader").should("not.be.visible"); // gets stuck here }); }); diff --git a/cypress/e2e/claim-portal-non-web3.cy.ts b/cypress/e2e/claim-portal-non-web3.cy.ts index e5cd9bf0..c1a51c50 100644 --- a/cypress/e2e/claim-portal-non-web3.cy.ts +++ b/cypress/e2e/claim-portal-non-web3.cy.ts @@ -14,9 +14,9 @@ describe("Claims Portal Non-Web3", () => { cy.visit(`/${claimUrl}`); cy.wait(2000); - cy.get(".invalidator").should("not.be.visible"); - cy.get(".claim-loader").should("not.be.visible"); - cy.get(".view-claim").should("not.be.visible"); + cy.get("#invalidator").should("not.be.visible"); + cy.get("#claim-loader").should("not.be.visible"); + cy.get("#view-claim").should("not.be.visible"); cy.get("body", { timeout: 3000 }).should("contain.text", "Please use a web3 enabled browser to collect this reward."); }); @@ -79,9 +79,9 @@ function testUserAgent(userAgent: string) { }); cy.wait(2000); - cy.get(".invalidator").should("not.be.visible"); - cy.get(".claim-loader").should("not.be.visible"); - cy.get(".view-claim").should("not.be.visible"); + cy.get("#invalidator").should("not.be.visible"); + cy.get("#claim-loader").should("not.be.visible"); + cy.get("#view-claim").should("not.be.visible"); cy.get("body", { timeout: 3000 }).should("contain.text", "Please use a mobile-friendly Web3 browser such as MetaMask to collect this reward"); } diff --git a/cypress/e2e/claim-portal-success.cy.ts b/cypress/e2e/claim-portal-success.cy.ts index b9cb6263..1f715b3e 100644 --- a/cypress/e2e/claim-portal-success.cy.ts +++ b/cypress/e2e/claim-portal-success.cy.ts @@ -17,21 +17,21 @@ describe("Claims Portal Success", () => { }); describe("Success", () => { it("should successfully claim a permit", () => { - cy.get(".additional-details", { timeout: 15000 }).first().should("be.visible").invoke("click"); + cy.get("#additionalDetails", { timeout: 15000 }).should("be.visible").invoke("click"); - cy.get('table[data-make-claim="ok"]').first().should("exist").and("include.text", "337888.4 WXDAI"); + cy.get('table[data-make-claim="ok"]').should("exist").and("include.text", "337888.4 WXDAI"); - cy.get("button[class='make-claim']").first().invoke("click"); + cy.get("button[id='make-claim']").invoke("click"); - cy.get(".invalidator").first().should("not.be.visible"); + cy.get("#invalidator").should("not.be.visible"); - cy.get(".claim-loader").first().should("be.visible").as("loader"); + cy.get("#claim-loader").should("be.visible").as("loader"); cy.wait(5000); // required for the action to complete - cy.get("@loader").first().should("not.be.visible"); + cy.get("@loader").should("not.be.visible"); - cy.get(".view-claim").first().should("be.visible").and("include.text", "View Claim"); + cy.get("#view-claim").should("be.visible").and("include.text", "View Claim"); // anvil confirms it instantly so there is two notifications cy.get("body", { timeout: 15000 }).should("contain.text", "Transaction sent"); @@ -41,13 +41,10 @@ describe("Claims Portal Success", () => { win.open = cy.stub().as("open"); }); - cy.get(".view-claim") - .first() + cy.get("#view-claim") .invoke("click") .then(() => { - cy.get("@open") - .first() - .should("be.calledWithMatch", /https:\/\/blockscan.com\/tx/); + cy.get("@open").should("be.calledWithMatch", /https:\/\/blockscan.com\/tx/); }); }); }); @@ -57,17 +54,17 @@ describe("Claims Portal Success", () => { cy.visit(`/${notMeantForYouPermit}`).then(() => { cy.wait(2000); }); - cy.get(".additional-details", { timeout: 15000 }).first().should("be.visible").invoke("click"); + cy.get("#additionalDetails", { timeout: 15000 }).should("be.visible").invoke("click"); - cy.get('table[data-make-claim="ok"]').first().should("exist"); + cy.get('table[data-make-claim="ok"]').should("exist"); - cy.get("button[class='make-claim']").first().invoke("click"); + cy.get("button[id='make-claim']").invoke("click"); - cy.get(".invalidator").first().should("not.be.visible"); + cy.get("#invalidator").should("not.be.visible"); - cy.get(".claim-loader").first().should("be.visible"); + cy.get("#claim-loader").should("be.visible"); - cy.get(".view-claim").first().should("not.be.visible"); + cy.get("#view-claim").should("not.be.visible"); cy.get("body", { timeout: 15000 }).should("contain.text", "This reward is not for you"); }); @@ -82,16 +79,16 @@ describe("Claims Portal Success", () => { cy.visit(`/${notMeantForYouPermit}`).then(() => { cy.wait(2000); }); - cy.get(".additional-details", { timeout: 15000 }).first().should("be.visible").invoke("click"); + cy.get("#additionalDetails", { timeout: 15000 }).should("be.visible").invoke("click"); - cy.get('table[data-make-claim="ok"]').first().should("exist"); + cy.get('table[data-make-claim="ok"]').should("exist"); - cy.get(".invalidator").should("be.visible").first().invoke("click"); + cy.get("#invalidator").should("be.visible").invoke("click"); - cy.get(".claim-loader").first().should("not.be.visible"); - cy.get(".view-claim").first().should("not.be.visible"); + cy.get("#claim-loader").should("not.be.visible"); + cy.get("#view-claim").should("not.be.visible"); - cy.get("body", { timeout: 15000 }).first().should("contain.text", "Nonce invalidation transaction sent"); + cy.get("body", { timeout: 15000 }).should("contain.text", "Nonce invalidation transaction sent"); }); }); }); diff --git a/static/index.html b/static/index.html index f1bde35d..44363c76 100644 --- a/static/index.html +++ b/static/index.html @@ -25,7 +25,6 @@ Ubiquity Rewards | Ubiquity DAO -
@@ -63,19 +62,19 @@ - +
Amount
- +
Loading
- +
Token
- +
@@ -84,11 +83,11 @@ - +
For
- +
@@ -100,10 +99,10 @@ - +
- - - -
-