diff --git a/cypress.config.ts b/cypress.config.ts index 16de734770..a3a00058a6 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -10,6 +10,12 @@ export default defineConfig({ hideXHRInCommandLog: true, viewportWidth: 1920, viewportHeight: 1080, + defaultCommandTimeout: 200000, + pageLoadTimeout: 200000, + execTimeout: 200000, + taskTimeout: 200000, + requestTimeout: 200000, + responseTimeout: 200000, setupNodeEvents() { // implement node event listeners here } diff --git a/cypress/e2e/ConnectWallet.cy.ts b/cypress/e2e/ConnectWallet.cy.ts index 8428825de2..ae519dff9f 100644 --- a/cypress/e2e/ConnectWallet.cy.ts +++ b/cypress/e2e/ConnectWallet.cy.ts @@ -3,7 +3,7 @@ describe("Connect wallet and enter user name", () => { cy.visit("/sign-in"); }); - it("check screen sign up", () => { + it.only("check screen sign up", () => { cy.get('[data-testid="signin-title"]').should("be.visible").contains("Sign In"); cy.get('[data-testid="forgot-password-link"] > .MuiBox-root').should("be.visible").contains("Forgot password"); cy.get('[data-testid="connect-wallet"]').should("be.visible").should("be.enabled"); diff --git a/cypress/e2e/DelegatorLifecycleTests.cy.ts b/cypress/e2e/DelegatorLifecycleTests.cy.ts index 8d21626b37..509c870d5f 100644 --- a/cypress/e2e/DelegatorLifecycleTests.cy.ts +++ b/cypress/e2e/DelegatorLifecycleTests.cy.ts @@ -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(); + }); }); diff --git a/cypress/e2e/InstantaneousRewardsTests.cy.ts b/cypress/e2e/InstantaneousRewardsTests.cy.ts index 4818a94389..49d5d128fe 100644 --- a/cypress/e2e/InstantaneousRewardsTests.cy.ts +++ b/cypress/e2e/InstantaneousRewardsTests.cy.ts @@ -9,8 +9,7 @@ describe("Instantaneous rewards", () => { }); it("should have enough columns", () => { - //cy.get(".css-1dz0v3k > tr > :nth-child(1)").scrollIntoView().should("be.visible").contains("#"); - cy.get(".css-1dz0v3k > tr > :nth-child(1)").scrollIntoView().should("be.visible").contains("Tx Hash"); + cy.get(".css-1dz0v3k > tr > :nth-child(1)").scrollIntoView().should("be.visible").contains("Transaction Hash"); cy.get(".css-1dz0v3k > tr > :nth-child(2)").scrollIntoView().should("be.visible").contains("Created At"); cy.get(".css-1dz0v3k > tr > :nth-child(3)").scrollIntoView().should("be.visible").contains("Block"); cy.get(".css-1dz0v3k > tr > :nth-child(4)").scrollIntoView().should("be.visible").contains("Stake Address"); diff --git a/cypress/e2e/TopAddressDetailTests.cy.ts b/cypress/e2e/TopAddressDetailTests.cy.ts index d6e1dfa289..ef6c24de64 100644 --- a/cypress/e2e/TopAddressDetailTests.cy.ts +++ b/cypress/e2e/TopAddressDetailTests.cy.ts @@ -8,7 +8,6 @@ describe("Top Address Detail Tests", () => { it("verify element by address ADA Balance", () => { cy.visit("/addresses"); cy.get('[data-testid="table-common"]').contains("Addresses"); - //cy.get(".css-1dz0v3k > tr > :nth-child(1)").contains("#"); cy.get(".css-1dz0v3k > tr > :nth-child(2)").contains("Addresses"); cy.get(".css-1dz0v3k > tr > :nth-child(3)").contains("Balance"); cy.get(".css-1dz0v3k > tr > :nth-child(4)").contains("Transaction Count"); @@ -16,9 +15,8 @@ describe("Top Address Detail Tests", () => { it.only("verify element by Amount Staked", () => { cy.visit("/addresses"); cy.get('[id*="amount-staked"]').first().click(); - //cy.get(".css-1dz0v3k > tr > :nth-child(1)").contains("#"); cy.get(".css-1dz0v3k > tr > :nth-child(1)").contains("Stake Address"); cy.get(".css-1dz0v3k > tr > :nth-child(2)").contains("Pool"); - cy.get(".css-1dz0v3k > tr > :nth-child(3)").contains("Stake amount"); + cy.get(".css-1dz0v3k > tr > :nth-child(3)").contains("Stake amount", { matchCase: false }); }); }); diff --git a/cypress/e2e/addressDetail.cy.ts b/cypress/e2e/addressDetail.cy.ts index c9b24d6966..3c88b4a1a6 100644 --- a/cypress/e2e/addressDetail.cy.ts +++ b/cypress/e2e/addressDetail.cy.ts @@ -15,14 +15,13 @@ describe("address detail spec", () => { cy.visit("/address/Ae2tdPwUPEZKnykUqXyYQxqJSnADNkm4ELUnyqZUBHcCrNJVDqozLYCt9Jv"); cy.get(".css-19nq3tn").contains("Address Details"); cy.get(".css-12n155v").contains(address); - cy.get(":nth-child(2) > .css-198fg3r > .css-1l7sjfb > .css-12euw8y").contains("Analytics"); - cy.get(":nth-child(3) > .css-198fg3r > .css-1l7sjfb > .css-12euw8y").contains("Transactions"); - //cy.get(".css-1dz0v3k > tr > :nth-child(1)").contains("#"); - cy.get(".css-1dz0v3k > tr > :nth-child(1)").contains("Tx Hash"); - cy.get(".css-1dz0v3k > tr > :nth-child(2)").contains("Created At"); - cy.get(".css-1dz0v3k > tr > :nth-child(3)").contains("Block"); - cy.get(".css-1dz0v3k > tr > :nth-child(4)").contains("Fees"); - cy.get(".css-1dz0v3k > tr > :nth-child(5)").contains("ADA amount"); - cy.get(".css-1dz0v3k > tr > :nth-child(6)").contains("Token"); + cy.get("div").contains("Analytics"); + cy.get("div").contains("Transactions"); + cy.get("table tr th").contains("Tx hash"); + cy.get("table tr th").contains("Created At"); + cy.get("table tr th").contains("Block"); + cy.get("table tr th").contains("Fees"); + cy.get("table tr th").contains("ADA amount"); + cy.get("table tr th").contains("Token"); }); }); diff --git a/cypress/e2e/blocks.cy.ts b/cypress/e2e/blocks.cy.ts index ca75ecb0a8..82405fbee9 100644 --- a/cypress/e2e/blocks.cy.ts +++ b/cypress/e2e/blocks.cy.ts @@ -21,7 +21,7 @@ describe("block spec", () => { cy.visit("/blocks"); cy.get(".css-1dz0v3k > tr > :nth-child(1)").contains("Block"); cy.get(".css-1dz0v3k > tr > :nth-child(2)").contains("Block ID"); - cy.get(".css-1dz0v3k > tr > :nth-child(3)").contains("Epoch/Slot"); + cy.get(".css-1dz0v3k > tr > :nth-child(3)").contains("Epoch / Slot", { matchCase: false }); cy.get(".css-1dz0v3k > tr > :nth-child(4)").contains("Created At"); cy.get(".css-1dz0v3k > tr > :nth-child(5)").contains("Transactions"); cy.get(".css-1dz0v3k > tr > :nth-child(6)").contains("Fees"); @@ -36,7 +36,7 @@ describe("block spec", () => { it("should navigate to the block detail page", () => { const block = "7588518"; cy.visit("/block/7588518"); - cy.get(".css-igne3v").contains("Block details"); + cy.get(".css-1uehs23").contains("Block details", { matchCase: false }); cy.get(":nth-child(1) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Created At"); cy.get(":nth-child(2) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Confirmations"); cy.get(":nth-child(3) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Transactions"); @@ -45,8 +45,7 @@ describe("block spec", () => { cy.get(":nth-child(6) > .css-seof3k").contains(block); cy.get(":nth-child(7) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Slot"); cy.get('[data-testid="table-common"]').verifyElementDisplay; - //cy.get(".css-1dz0v3k > tr > :nth-child(1)").contains("#"); - cy.get(".css-1dz0v3k > tr > :nth-child(1)").contains("Tx Hash"); + cy.get(".css-1dz0v3k > tr > :nth-child(1)").contains("Tx Hash", { matchCase: false }); cy.get(".css-1dz0v3k > tr > :nth-child(2)").contains("Created At"); cy.get(".css-1dz0v3k > tr > :nth-child(3)").contains("Block"); cy.get(".css-1dz0v3k > tr > :nth-child(4)").contains("Addresses"); diff --git a/cypress/e2e/contracts.cy.ts b/cypress/e2e/contracts.cy.ts index c8b01037a2..3bb9f21134 100644 --- a/cypress/e2e/contracts.cy.ts +++ b/cypress/e2e/contracts.cy.ts @@ -3,44 +3,28 @@ describe("contracts spec", () => { it("should show the contract details of transaction 4223b55d78e90917c5a6054c8a038124f7b1c0ecefc6751dd8bcd6a5016ae2d1", () => { const transactionHash = "4223b55d78e90917c5a6054c8a038124f7b1c0ecefc6751dd8bcd6a5016ae2d1"; - const contractHash = - "addr1zxn9efv2f6w82hagxqtn62ju4m293tqvw0uhmdl64ch8uw6j2c79gy9l76sdg0xwhd7r0c0kna0tycz4y5s6mlenh8pq6s3z70"; const contractCount = 3; - - const datumBytes = - "d8799fd8799fd8799f581c4a8508ee9d864103b28f86bd004c74551dcb9a99493e07d6c5f965c1ffd8799fd8799fd8799f581c3ff922f6a662e2ee1e48f6f7e9a2dc337f4483e0ef3a247466b29babffffffffd8799fd8799f581c4a8508ee9d864103b28f86bd004c74551dcb9a99493e07d6c5f965c1ffd8799fd8799fd8799f581c3ff922f6a662e2ee1e48f6f7e9a2dc337f4483e0ef3a247466b29babffffffffd87a80d8799fd8799f4040ff1a16cb22ccff1a001e79ea1a001e8480ff"; - const datumHash = "a5e7b0301a29d8a00ada775d1b0c4bda47573e3de06214445e0e0590302b62be"; - cy.visit(`/transaction/${transactionHash}/contracts`); - cy.get('[data-testid="tab-contracts"]').should("contain", `Contracts(${contractCount})`); - cy.get(`[data-testid="contract-hash-${contractHash}"]`).should("contain", contractHash); - - cy.get(`[data-testid="contract-redeemer-tag-${contractHash}"]`).should("contain", "SPEND"); - cy.get(`[data-testid="contract-redeemer-data-${contractHash}"]`).should("contain", "d87980"); - cy.get(`[data-testid="contract-redeemer-mem-${contractHash}"]`).should("contain", "61056"); - cy.get(`[data-testid="contract-redeemer-steps-${contractHash}"]`).should("contain", "22010239"); - - cy.get(`[data-testid="contract-datum-hash-${contractHash}"]`).should("contain", datumHash); - cy.get(`[data-testid="contract-datum-bytes-${contractHash}"]`).should("contain", datumBytes); + cy.get(".MuiAccordionSummary-content div").should("contain", `Contracts(${contractCount})`); + cy.get(`p`).contains("Contract Address"); }); it("should navigate to the contract page", () => { cy.visit("/"); cy.get('[data-testid="menu-button-blockchain"]').click(); cy.get('[data-testid="submenu-button-smart_contracts"]').click(); - cy.get(".css-1l7sjfb").contains("Contracts"); - cy.get(".css-1dz0v3k > tr > :nth-child(1)").contains("#"); - cy.get(".css-1dz0v3k > tr > :nth-child(2)").contains("Contract Addresses"); - cy.get(".css-1dz0v3k > tr > :nth-child(3)").contains("Balance"); - cy.get(".css-1dz0v3k > tr > :nth-child(4)").contains("Value"); - cy.get(".css-1dz0v3k > tr > :nth-child(5)").contains("Transaction Count"); + cy.get("h2").contains("Smart Contracts"); + cy.get("table tr th").contains("Address"); + cy.get("table tr th").contains("Balance"); + cy.get("table tr th").contains("Value"); + cy.get("table tr th").contains("Transaction Count"); }); it("redirect to correct address detail page", () => { const address = "addr1z8snz7c4974vzdpxu65ruphl3zjdvtxw8strf2c2tmqnxz2j2c79gy9l76sdg0xwhd7r0c0kna0tycz4y5s6mlenh8pq0xmsha"; cy.visit("/contracts"); - cy.get(".css-1l7sjfb").contains("Contracts"); + cy.get("h2").contains("Smart Contracts"); cy.get('[data-testid="search-bar"]').type(address).type("{enter}"); cy.get(".css-19nq3tn").contains("Address Details"); cy.get(".css-12n155v").contains(address); @@ -48,7 +32,7 @@ describe("contracts spec", () => { it.only("should navigate to the contract detail page", () => { cy.visit("/contracts"); - cy.get(".css-1l7sjfb").contains("Contracts"); + cy.get("h2").contains("Smart Contracts"); cy.get(":nth-child(1) > :nth-child(1) > div > .css-1l62pou").click(); cy.get(".css-1msjg76 > .css-0").contains("Contract Details"); cy.get(":nth-child(1) > .css-1heutcx > .css-k6svam > .css-1xc8op").contains("Address"); diff --git a/cypress/e2e/delegationPool.cy.ts b/cypress/e2e/delegationPool.cy.ts index 77f869044a..20df15750f 100644 --- a/cypress/e2e/delegationPool.cy.ts +++ b/cypress/e2e/delegationPool.cy.ts @@ -5,28 +5,26 @@ describe("delegation pool spec", () => { cy.visit("/"); cy.get('[data-testid="menu-button-blockchain"]').click(); cy.get('[data-testid="submenu-button-pools"]').click(); - cy.get(".css-1l7sjfb").contains("Pool"); - cy.get(".MuiGrid-container > :nth-child(1) > .css-ouujem > .css-1cs4ejo > .css-6l1v2o").contains("Epoch"); - cy.get(".css-1co4lm5 > .css-ouujem > .css-1cs4ejo > .css-6l1v2o").contains("Slot"); - cy.get('[style="padding: 30px 0px 0px 30px;"] > .css-6l1v2o').contains("Live Stake"); - cy.get(":nth-child(2) > .css-6l1v2o").contains("Delegators"); - cy.get(":nth-child(4) > .css-ouujem > .css-1cs4ejo > .css-6l1v2o").contains("Total Pools"); - cy.get(".css-1dz0v3k > tr > :nth-child(1)").contains("Pool"); - cy.get(".css-1dz0v3k > tr > :nth-child(2)").contains("Pool size"); - cy.get(".css-1dz0v3k > tr > :nth-child(3)").contains("Declared Pledge"); - cy.get(".css-1dz0v3k > tr > :nth-child(4)").contains("Saturation"); - cy.get(".css-1dz0v3k > tr > :nth-child(5)").contains("Number of Delegators"); - cy.get(".css-1dz0v3k > tr > :nth-child(6)").contains("Blocks in Epoch"); - cy.get(".css-1dz0v3k > tr > :nth-child(7)").contains("Blocks lifetime"); - //cy.get('.css-1dz0v3k > tr > :nth-child(8)').contains("Reward"); - cy.get(".css-1dz0v3k > tr > :nth-child(8)").contains("Fixed Cost"); - //cy.get('.css-1dz0v3k > tr > :nth-child(10)').contains("Margin"); + cy.get("h2").contains("Pools"); + cy.get("div").contains("Epoch"); + cy.get("div").contains("Slot"); + cy.get("div").contains("Live Stake"); + cy.get("div").contains("Delegators"); + cy.get("div").contains("Total Pools"); + cy.get("table tr th").contains("Pool"); + cy.get("table tr th").contains("Pool size", { matchCase: false }); + cy.get("table tr th").contains("Declared Pledge"); + cy.get("table tr th").contains("Saturation"); + cy.get("table tr th").contains("Number of Delegators"); + cy.get("table tr th").contains("Blocks in Epoch"); + cy.get("table tr th").contains("Blocks lifetime", { matchCase: false }); + cy.get("table tr th").contains("Fixed Cost"); }); it("redirect to correct transaction detail page", () => { const pool = "pool1m06tlj2ykawzvweacgmhxj43hykczgfuynk2lqzxvshm5lq2lyq"; cy.visit("/pools"); - cy.get(".css-1l7sjfb").contains("Pool"); + cy.get("div").contains("Pools"); cy.get('[data-testid="search-bar"]').type(pool).type("{enter}"); cy.get(".css-1d87buq").contains(pool); cy.get(".css-1mwjfms").contains(pool); diff --git a/cypress/e2e/epochs.cy.ts b/cypress/e2e/epochs.cy.ts index 1d8cafaa6b..136b49e587 100644 --- a/cypress/e2e/epochs.cy.ts +++ b/cypress/e2e/epochs.cy.ts @@ -14,14 +14,14 @@ describe("epoch spec", () => { it("should have enough column", () => { cy.visit("/epochs"); - cy.get(".css-1dz0v3k > tr > :nth-child(1)").contains("Epoch"); - cy.get(".css-1dz0v3k > tr > :nth-child(2)").contains("Start Timestamp"); - cy.get(".css-1dz0v3k > tr > :nth-child(3)").contains("End Timestamp"); - cy.get(".css-1dz0v3k > tr > :nth-child(4)").contains("Blocks"); - cy.get(".css-1dz0v3k > tr > :nth-child(5)").contains("Unique Accounts"); - cy.get(".css-1dz0v3k > tr > :nth-child(6)").contains("Transaction Count"); - cy.get(".css-1dz0v3k > tr > :nth-child(7)").contains("Rewards Distributed"); - cy.get(".css-1dz0v3k > tr > :nth-child(8)").contains("Total Output"); + cy.get("table tr th").contains("Epoch"); + cy.get("table tr th").contains("Start Timestamp", { matchCase: false }); + cy.get("table tr th").contains("End Timestamp", { matchCase: false }); + cy.get("table tr th").contains("Blocks"); + cy.get("table tr th").contains("Unique Accounts", { matchCase: false }); + cy.get("table tr th").contains("Transaction Count", { matchCase: false }); + cy.get("table tr th").contains("Rewards Distributed", { matchCase: false }); + cy.get("table tr th").contains("Total Output", { matchCase: false }); }); it("should have epoch search bar", () => { @@ -33,23 +33,31 @@ describe("epoch spec", () => { const epoch = "426"; cy.visit("/epochs"); cy.get('[data-testid="search-bar"]').type(epoch).type("{enter}"); - cy.get(".css-igne3v").contains("Epoch details"); + cy.get("div").contains("Epoch details"); cy.get(".css-17lbe4a").contains(epoch); }); - it("should navigate to the epoch detail page", () => { + it.only("should navigate to the epoch detail page", () => { const epoch = "426"; cy.visit("/epoch/426"); - cy.get(".css-igne3v").contains("Epoch details"); + cy.get("div").contains("Epoch details", { matchCase: false }); cy.get(".css-17lbe4a").contains(epoch); - cy.get(":nth-child(1) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Start Timestamp"); - cy.get(":nth-child(2) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("End Timestamp"); - cy.get(":nth-child(3) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Total Output"); + cy.get(":nth-child(1) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Start Timestamp", { + matchCase: false + }); + cy.get(":nth-child(2) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("End Timestamp", { matchCase: false }); + cy.get(":nth-child(3) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Total Output", { matchCase: false }); cy.get(":nth-child(4) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Blocks"); cy.get(":nth-child(5) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Slot"); - cy.get(":nth-child(6) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Unique Accounts"); - cy.get(":nth-child(7) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Transaction Count"); - cy.get(":nth-child(8) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Rewards Distributed"); + cy.get(":nth-child(6) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Unique Accounts", { + matchCase: false + }); + cy.get(":nth-child(7) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Transaction Count", { + matchCase: false + }); + cy.get(":nth-child(8) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Rewards Distributed", { + matchCase: false + }); cy.get('[data-testid="table-common"]').verifyElementDisplay; cy.get(".css-1dz0v3k > tr > :nth-child(1)").contains("Block"); cy.get(".css-1dz0v3k > tr > :nth-child(2)").contains("Block ID"); diff --git a/cypress/e2e/home.cy.ts b/cypress/e2e/home.cy.ts index c8f1e5b800..eb915b1979 100644 --- a/cypress/e2e/home.cy.ts +++ b/cypress/e2e/home.cy.ts @@ -55,7 +55,7 @@ describe("Home page function should work", () => { it("should navigate to SignIn page", () => { cy.getBySelector("header-signin").click(); cy.title().should("eq", "Sign In | Cardano Blockchain Explorer"); - cy.getBySelector("signin-title").contains(/^(Sign In)$/i); + cy.getBySelector("signin-title").contains("Sign In", { matchCase: false }); }); it("should change the search option", () => { diff --git a/cypress/e2e/policy/PoolCertificate.cy.ts b/cypress/e2e/policy/PoolCertificate.cy.ts index 3c3a422285..046edf49a2 100644 --- a/cypress/e2e/policy/PoolCertificate.cy.ts +++ b/cypress/e2e/policy/PoolCertificate.cy.ts @@ -3,7 +3,7 @@ describe("Pool Certificate", () => { cy.visit("/"); cy.get('[data-testid="menu-button-operational_certificates"]').click(); cy.get('[data-testid="submenu-button-pool_certificate"]').click(); - cy.get(".css-1l7sjfb").contains("Pool Certificate"); + cy.get("h2").contains("Pool Certificate"); }); it("should have header search box", () => { @@ -12,13 +12,25 @@ describe("Pool Certificate", () => { }); it("should have enough columns", () => { - cy.get(".css-1dz0v3k > tr > :nth-child(1)").scrollIntoView().should("be.visible").contains("Tx Hash"); - cy.get(".css-1dz0v3k > tr > :nth-child(2)").scrollIntoView().should("be.visible").contains("Created At"); + cy.get(".css-1dz0v3k > tr > :nth-child(1)") + .scrollIntoView() + .should("be.visible") + .contains("Transaction Hash", { matchCase: false }); + cy.get(".css-1dz0v3k > tr > :nth-child(2)") + .scrollIntoView() + .should("be.visible") + .contains("Created At", { matchCase: false }); cy.get(".css-1dz0v3k > tr > :nth-child(3)").scrollIntoView().should("be.visible").contains("Block"); cy.get(".css-1dz0v3k > tr > :nth-child(4)").scrollIntoView().should("be.visible").contains("Pool"); cy.get(".css-1dz0v3k > tr > :nth-child(5)").scrollIntoView().should("be.visible").contains("Pledge"); - cy.get(".css-1dz0v3k > tr > :nth-child(6)").scrollIntoView().should("be.visible").contains("Fixed Cost"); + cy.get(".css-1dz0v3k > tr > :nth-child(6)") + .scrollIntoView() + .should("be.visible") + .contains("Fixed Cost", { matchCase: false }); cy.get(".css-1dz0v3k > tr > :nth-child(7)").scrollIntoView().should("be.visible").contains("Margin"); - cy.get(".css-1dz0v3k > tr > :nth-child(8)").scrollIntoView().should("be.visible").contains("Stake Address"); + cy.get(".css-1dz0v3k > tr > :nth-child(8)") + .scrollIntoView() + .should("be.visible") + .contains("Stake Address", { matchCase: false }); }); }); diff --git a/cypress/e2e/policy/PoolDeregistrationTest.cy.ts b/cypress/e2e/policy/PoolDeregistrationTest.cy.ts index 8841cfd404..293bf8c752 100644 --- a/cypress/e2e/policy/PoolDeregistrationTest.cy.ts +++ b/cypress/e2e/policy/PoolDeregistrationTest.cy.ts @@ -3,7 +3,7 @@ describe("Pool Deregistration", () => { cy.visit("/"); cy.get('[data-testid="menu-button-operational_certificates"]').click(); cy.get('[data-testid="submenu-button-pool_deregistration"]').click(); - cy.get(".css-1l7sjfb").contains("Pool Deregistration"); + cy.get("h2").contains("Pool Deregistration"); }); it("should have header search box", () => { @@ -12,13 +12,25 @@ describe("Pool Deregistration", () => { }); it("should have enough columns", () => { - cy.get(".css-1dz0v3k > tr > :nth-child(1)").scrollIntoView().should("be.visible").contains("Tx Hash"); - cy.get(".css-1dz0v3k > tr > :nth-child(2)").scrollIntoView().should("be.visible").contains("Created At"); + cy.get(".css-1dz0v3k > tr > :nth-child(1)") + .scrollIntoView() + .should("be.visible") + .contains("Transaction Hash", { matchCase: false }); + cy.get(".css-1dz0v3k > tr > :nth-child(2)") + .scrollIntoView() + .should("be.visible") + .contains("Created At", { matchCase: false }); cy.get(".css-1dz0v3k > tr > :nth-child(3)").scrollIntoView().should("be.visible").contains("Block"); cy.get(".css-1dz0v3k > tr > :nth-child(4)").scrollIntoView().should("be.visible").contains("Pool"); cy.get(".css-1dz0v3k > tr > :nth-child(5)").scrollIntoView().should("be.visible").contains("Pledge"); - cy.get(".css-1dz0v3k > tr > :nth-child(6)").scrollIntoView().should("be.visible").contains("Fixed Cost"); + cy.get(".css-1dz0v3k > tr > :nth-child(6)") + .scrollIntoView() + .should("be.visible") + .contains("Fixed Cost", { matchCase: false }); cy.get(".css-1dz0v3k > tr > :nth-child(7)").scrollIntoView().should("be.visible").contains("Margin"); - cy.get(".css-1dz0v3k > tr > :nth-child(8)").scrollIntoView().should("be.visible").contains("Stake Address"); + cy.get(".css-1dz0v3k > tr > :nth-child(8)") + .scrollIntoView() + .should("be.visible") + .contains("Stake Address", { matchCase: false }); }); }); diff --git a/cypress/e2e/scenario/AddressDetailADATests.cy.ts b/cypress/e2e/scenario/AddressDetailADATests.cy.ts index d1847e0426..4292c6665a 100644 --- a/cypress/e2e/scenario/AddressDetailADATests.cy.ts +++ b/cypress/e2e/scenario/AddressDetailADATests.cy.ts @@ -6,13 +6,8 @@ describe("block spec", () => { cy.get('[data-testid="submenu-button-top_ada_holders"]').click(); cy.wait(500); cy.get("tbody tr td").eq(2).click(); - cy.get('[data-testid="table-common"] table th').eq(0).contains("Tx Hash"); - cy.get('[data-testid="table-common"] table th').eq(1).contains("Created At"); + cy.get('[data-testid="table-common"] table th').eq(0).contains("Tx Hash", { matchCase: false }); + cy.get('[data-testid="table-common"] table th').eq(1).contains("Created At", { matchCase: false }); cy.get('[data-testid="table-common"] table th').eq(2).contains("Block"); - - // cy.contains("[id*='T-amount-staked']").click(); - // cy.get('[data-testid="table-common"] table th').eq(0).contains("Stake Address"); - // cy.get('[data-testid="table-common"] table th').eq(1).contains("Pool"); - // cy.get('[data-testid="table-common"] table th').eq(2).contains("Stake amount"); }); }); diff --git a/cypress/e2e/scenario/ContractScenario.cy.ts b/cypress/e2e/scenario/ContractScenario.cy.ts index baf02c6494..97e95c0787 100644 --- a/cypress/e2e/scenario/ContractScenario.cy.ts +++ b/cypress/e2e/scenario/ContractScenario.cy.ts @@ -9,13 +9,12 @@ describe("contract scenario", () => { cy.get('[data-testid="submenu-button-smart_contracts"]').click(); cy.visit("/contracts/" + contactDetail); cy.get("small").contains(contactDetail); - //cy.get('th').contains("#").should("be.visible"); - cy.get("th").contains("Tx Hash").should("be.visible"); - cy.get("th").contains("Created At").should("be.visible"); - cy.get("th").contains("Block").should("be.visible"); - cy.get("th").contains("Addresses").should("be.visible"); - cy.get("th").contains("Fees").should("be.visible"); - cy.get("th").contains("Output").should("be.visible"); + cy.get("th").contains("Tx Hash", { matchCase: false }).should("be.visible"); + cy.get("th").contains("Created At", { matchCase: false }).should("be.visible"); + cy.get("th").contains("Block", { matchCase: false }).should("be.visible"); + cy.get("th").contains("Addresses", { matchCase: false }).should("be.visible"); + cy.get("th").contains("Fees", { matchCase: false }).should("be.visible"); + cy.get("th").contains("Output", { matchCase: false }).should("be.visible"); cy.get("[id*=T-transaction]").contains("Transactions").should("be.visible"); cy.get("[id*=T-transcript]").contains("Script").should("be.visible"); cy.get('[data-testid="table-common"]').should("be.visible"); diff --git a/cypress/e2e/scenario/ContractScenario/userInteractWithContractTab.cy.ts b/cypress/e2e/scenario/ContractScenario/userInteractWithContractTab.cy.ts new file mode 100644 index 0000000000..e4eccaaaa2 --- /dev/null +++ b/cypress/e2e/scenario/ContractScenario/userInteractWithContractTab.cy.ts @@ -0,0 +1,143 @@ +const address = "58606cc73281c50b3d6eb9a0c19db60f1bd321ff3e896145ab7177755a7e18cb"; +const datumHash = "521ae7c96a41ef7b3ff0d0c78e17faf1f5fd024e4cd7ad6d6931896ba37d1f73"; +const datum = "9f582082ca817919eb8a2857ba794b0eb85001980ca7f8032e7bed4084277c4d53af781a001e8480ff"; + +describe("user interact with contract tab", () => { + beforeEach(() => { + cy.visit(`/transaction/${address}/contracts`); + }); + + it("test overview", () => { + cy.get("p").contains("What are smart contracts?").click(); + cy.get("button").contains("Continue Reading", { matchCase: false }); + cy.get(`[data-testid="close-modal-button"]`).click(); + cy.get("button").contains("View Contract", { matchCase: false }); + cy.get("p").contains("Contract Address", { matchCase: false }); + cy.get("p").contains("Purpose", { matchCase: false }); + }); + + it("should client go to view spend purpose", () => { + const times: string[] = []; + cy.get(`[data-testid="contract-card-item"]`).each(($card) => { + if ($card.html().includes("SPEND")) { + if (times.indexOf("SPEND") < 0) { + cy.wrap($card).find("div").contains("View Contract").click(); + cy.get("p").contains("UTXO", { matchCase: false }); + cy.get("p").contains("Contract", { matchCase: false }); + cy.get("button").contains("Redeemer", { matchCase: false }).find("svg").click(); + cy.get("p").contains("What is the redeemer?", { matchCase: false }); + cy.get("p").contains("Purpose", { matchCase: false }); + cy.get("p").contains("Data", { matchCase: false }); + cy.get("p").contains("Mem", { matchCase: false }); + cy.get("p").contains("Steps", { matchCase: false }); + cy.get(`[data-testid="close-modal-button"]`).click(); + cy.get("button").contains("Datum", { matchCase: false }).find("svg").click(); + cy.get("p").contains(datumHash, { matchCase: false }); + cy.get("p").contains(datum, { matchCase: false }); + cy.get(`[data-testid="close-modal-button"]`).click(); + cy.get("div").contains("Compiled Code ", { matchCase: false }).click(); + cy.get("p").contains("What is compiled code?"); + cy.get(`[data-testid="close-modal-button"]`).click(); + cy.get(`[data-testid="goback-button"]`).click(); + cy.get("button").contains("View Contract", { matchCase: false }); + cy.get("p").contains("Contract Address", { matchCase: false }); + cy.get("p").contains("Purpose", { matchCase: false }); + } + times.push("SPEND"); + } + }); + }); + + it("should client go to view mint purpose", () => { + const times: string[] = []; + cy.get(`[data-testid="contract-card-item"]`).each(($card) => { + if ($card.html().includes("MINT")) { + const isBurn = $card.html().includes("BURN"); + if (times.indexOf("MINT") < 0) { + cy.wrap($card).find("div").contains("View Contract").click(); + cy.get("p").contains("Redeemer", { matchCase: false }).find("~ div svg").click(); + cy.get("p").contains("What is the redeemer?", { matchCase: false }); + cy.get("p").contains("Purpose", { matchCase: false }); + cy.get("p").contains("Data", { matchCase: false }); + cy.get("p").contains("Mem", { matchCase: false }); + cy.get("p").contains("Steps", { matchCase: false }); + cy.get(`[data-testid="close-modal-button"]`).click(); + cy.get("div").contains("Compiled Code ", { matchCase: false }).click(); + cy.get("p").contains("What is compiled code?"); + cy.get(`[data-testid="close-modal-button"]`).click(); + if (isBurn) { + cy.get("p").contains("Burn", { matchCase: false }).find("~ div svg").click(); + cy.get("p").contains("Asset Name", { matchCase: false }); + cy.get("p").contains("Quantity", { matchCase: false }); + cy.get(`[data-testid="close-modal-button"]`).click(); + } + cy.get(`[data-testid="goback-button"]`).click(); + } + times.push("MINT"); + } + }); + }); + + it("should client go to view cert purpose", () => { + const times: string[] = []; + cy.get(`[data-testid="contract-card-item"]`).each(($card) => { + if ($card.html().includes("CERT")) { + cy.wrap($card).find("div").contains("View Contract").click(); + cy.get("button").contains("Redeemer", { matchCase: false }).find("svg").click(); + cy.get("p").contains("What is the redeemer?", { matchCase: false }); + cy.get("p").contains("Purpose", { matchCase: false }); + cy.get("p").contains("Data", { matchCase: false }); + cy.get("p").contains("Mem", { matchCase: false }); + cy.get("p").contains("Steps", { matchCase: false }); + cy.get(`[data-testid="close-modal-button"]`).click(); + + cy.get("div").contains("Compiled Code ", { matchCase: false }).click(); + cy.get("p").contains("What is compiled code?"); + cy.get(`[data-testid="close-modal-button"]`).click(); + } + times.push("CERT"); + }); + }); + + it("should client go to view cert purpose", () => { + const times: string[] = []; + cy.get(`[data-testid="contract-card-item"]`).each(($card) => { + if ($card.html().includes("CERT")) { + cy.wrap($card).find("div").contains("View Contract").click(); + cy.get("button").contains("Redeemer", { matchCase: false }).find("svg").click(); + cy.get("p").contains("What is the redeemer?", { matchCase: false }); + cy.get("p").contains("Purpose", { matchCase: false }); + cy.get("p").contains("Data", { matchCase: false }); + cy.get("p").contains("Mem", { matchCase: false }); + cy.get("p").contains("Steps", { matchCase: false }); + cy.get(`[data-testid="close-modal-button"]`).click(); + + cy.get("div").contains("Compiled Code ", { matchCase: false }).click(); + cy.get("p").contains("What is compiled code?"); + cy.get(`[data-testid="close-modal-button"]`).click(); + } + times.push("CERT"); + }); + }); + + it("should client go to view REWARD purpose", () => { + const times: string[] = []; + cy.get(`[data-testid="contract-card-item"]`).each(($card) => { + if ($card.html().includes("REWARD")) { + cy.wrap($card).find("div").contains("View Contract").click(); + cy.get("div").contains("Redeemer", { matchCase: false }).find("~ div svg").click(); + cy.get("p").contains("What is the redeemer?", { matchCase: false }); + cy.get("p").contains("Purpose", { matchCase: false }); + cy.get("p").contains("Data", { matchCase: false }); + cy.get("p").contains("Mem", { matchCase: false }); + cy.get("p").contains("Steps", { matchCase: false }); + cy.get(`[data-testid="close-modal-button"]`).click(); + + cy.get("div").contains("Compiled Code ", { matchCase: false }).click(); + cy.get("p").contains("What is compiled code?"); + cy.get(`[data-testid="close-modal-button"]`).click(); + } + times.push("REWARD"); + }); + }); +}); diff --git a/cypress/e2e/scenario/StakeAddressDeregistrationTest.cy.ts b/cypress/e2e/scenario/StakeAddressDeregistrationTest.cy.ts index 102bc3a382..8a9bd2d734 100644 --- a/cypress/e2e/scenario/StakeAddressDeregistrationTest.cy.ts +++ b/cypress/e2e/scenario/StakeAddressDeregistrationTest.cy.ts @@ -6,10 +6,10 @@ describe("User check information of stake address deregistration", () => { cy.get('[data-testid="search-bar"]').should("be.visible"); cy.get('[data-testid="table-common"]').should("be.visible"); cy.get('[data-testid="table-common"] tbody tr').eq(0).click(); - cy.get(".css-62ep8s").contains("View Details").click(); + cy.get(".css-62ep8s").contains("View Details", { matchCase: false }).click(); cy.get('[data-testid="search-bar"]').should("be.visible"); - cy.get(".css-igne3v").contains("Stake Address Details").should("be.visible"); + cy.get("div").contains("Stake Address Detail", { matchCase: false }).should("be.visible"); cy.get(":nth-child(1) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Delegated to").should("be.visible"); cy.get(":nth-child(2) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Total Stake").should("be.visible"); cy.get(":nth-child(3) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root") @@ -32,7 +32,7 @@ describe("User check information of stake address deregistration", () => { cy.get(".MuiTabs-flexContainer button").eq(0).should("have.attr", "aria-selected", "true"); cy.get('[data-testid="table-common"]').should("be.visible"); - cy.get('[data-testid = "table-common"] th:nth-of-type(1)').should("be.visible").contains("Tx Hash"); + cy.get('[data-testid = "table-common"] th:nth-of-type(1)').should("be.visible").contains("Transaction Hash"); cy.get('[data-testid = "table-common"] th:nth-of-type(2)').should("be.visible").contains("Created At"); cy.get('[data-testid = "table-common"] th:nth-of-type(3)').should("be.visible").contains("Block"); cy.get('[data-testid = "table-common"] th:nth-of-type(4)').should("be.visible").contains("Pool ID"); @@ -41,7 +41,7 @@ describe("User check information of stake address deregistration", () => { cy.get(".MuiTabs-flexContainer button").eq(1).click(); cy.get(".MuiTabs-flexContainer button").eq(1).should("have.attr", "aria-selected", "true"); cy.get('[data-testid="table-common"]').should("be.visible"); - cy.get('[data-testid = "table-common"] th:nth-of-type(1)').should("be.visible").contains("Tx Hash"); + cy.get('[data-testid = "table-common"] th:nth-of-type(1)').should("be.visible").contains("Transaction Hash"); cy.get('[data-testid = "table-common"] th:nth-of-type(2)').should("be.visible").contains("Created At"); cy.get('[data-testid = "table-common"] th:nth-of-type(3)').should("be.visible").contains("Block"); cy.get('[data-testid = "table-common"] th:nth-of-type(4)').should("be.visible").contains("Action"); @@ -49,7 +49,7 @@ describe("User check information of stake address deregistration", () => { cy.get(".MuiTabs-flexContainer button").eq(2).click(); cy.get(".MuiTabs-flexContainer button").eq(2).should("have.attr", "aria-selected", "true"); cy.get('[data-testid="table-common"]').should("be.visible"); - cy.get('[data-testid = "table-common"] th:nth-of-type(1)').should("be.visible").contains("Tx Hash"); + cy.get('[data-testid = "table-common"] th:nth-of-type(1)').should("be.visible").contains("Transaction Hash"); cy.get('[data-testid = "table-common"] th:nth-of-type(2)').should("be.visible").contains("Created At"); cy.get('[data-testid = "table-common"] th:nth-of-type(3)').should("be.visible").contains("Block"); cy.get('[data-testid = "table-common"] th:nth-of-type(4)').should("be.visible").contains("Amount"); @@ -57,7 +57,7 @@ describe("User check information of stake address deregistration", () => { cy.get(".MuiTabs-flexContainer button").eq(3).click(); cy.get(".MuiTabs-flexContainer button").eq(3).should("have.attr", "aria-selected", "true"); cy.get('[data-testid="table-common"]').should("be.visible"); - cy.get('[data-testid = "table-common"] th:nth-of-type(1)').should("be.visible").contains("Tx Hash"); + cy.get('[data-testid = "table-common"] th:nth-of-type(1)').should("be.visible").contains("Transaction Hash"); cy.get('[data-testid = "table-common"] th:nth-of-type(2)').should("be.visible").contains("Created At"); cy.get('[data-testid = "table-common"] th:nth-of-type(3)').should("be.visible").contains("Block"); cy.get('[data-testid = "table-common"] th:nth-of-type(4)').should("be.visible").contains("Rewards Paid"); @@ -65,8 +65,7 @@ describe("User check information of stake address deregistration", () => { cy.get(".MuiTabs-flexContainer button").eq(4).click(); cy.get(".MuiTabs-flexContainer button").eq(4).should("have.attr", "aria-selected", "true"); cy.get('[data-testid="table-common"]').should("be.visible"); - //cy.get('[data-testid = "table-common"] th:nth-of-type(1)').should('be.visible').contains('#'); - cy.get('[data-testid = "table-common"] th:nth-of-type(1)').should("be.visible").contains("Tx Hash"); + cy.get('[data-testid = "table-common"] th:nth-of-type(1)').should("be.visible").contains("Transaction Hash"); cy.get('[data-testid = "table-common"] th:nth-of-type(2)').should("be.visible").contains("Created At"); cy.get('[data-testid = "table-common"] th:nth-of-type(3)').should("be.visible").contains("Block"); cy.get('[data-testid = "table-common"] th:nth-of-type(4)').should("be.visible").contains("Fees"); diff --git a/cypress/e2e/scenario/StakeAddressDetailADATests.cy.ts b/cypress/e2e/scenario/StakeAddressDetailADATests.cy.ts index e711f81fbb..21a92d3312 100644 --- a/cypress/e2e/scenario/StakeAddressDetailADATests.cy.ts +++ b/cypress/e2e/scenario/StakeAddressDetailADATests.cy.ts @@ -12,33 +12,32 @@ describe("block spec", () => { cy.get("button").contains("Instantaneous Rewards").should("be.visible"); cy.get("button").contains("Transactions").should("be.visible"); - cy.get('[data-testid="table-common"] th').eq(0).contains("Tx Hash"); + cy.get('[data-testid="table-common"] th').eq(0).contains("Transaction Hash"); cy.get('[data-testid="table-common"] th').eq(1).contains("Created At"); cy.get('[data-testid="table-common"] th').eq(2).contains("Block"); cy.get('[data-testid="table-common"] th').eq(3).contains("Pool ID"); cy.get('[data-testid="table-common"] th').eq(4).contains("Pool Name"); cy.get("button").contains("Stake Address History").click(); - cy.get('[data-testid="table-common"] th').eq(0).contains("Tx Hash"); + cy.get('[data-testid="table-common"] th').eq(0).contains("Transaction Hash"); cy.get('[data-testid="table-common"] th').eq(1).contains("Created At"); cy.get('[data-testid="table-common"] th').eq(2).contains("Block"); cy.get('[data-testid="table-common"] th').eq(3).contains("Action"); cy.get("button").contains("Withdrawal History").click(); - cy.get('[data-testid="table-common"] th').eq(0).contains("Tx Hash"); + cy.get('[data-testid="table-common"] th').eq(0).contains("Transaction Hash"); cy.get('[data-testid="table-common"] th').eq(1).contains("Created At"); cy.get('[data-testid="table-common"] th').eq(2).contains("Block"); cy.get('[data-testid="table-common"] th').eq(3).contains("Amount"); cy.get("button").contains("Instantaneous Rewards").click(); - cy.get('[data-testid="table-common"] th').eq(0).contains("Tx Hash"); + cy.get('[data-testid="table-common"] th').eq(0).contains("Transaction Hash"); cy.get('[data-testid="table-common"] th').eq(1).contains("Created At"); cy.get('[data-testid="table-common"] th').eq(2).contains("Block"); cy.get('[data-testid="table-common"] th').eq(3).contains("Rewards Paid"); cy.get("button").contains("Transactions").click(); - //cy.get('[data-testid="table-common"] th').eq(0).contains("#"); - cy.get('[data-testid="table-common"] th').eq(0).contains("Tx Hash"); + cy.get('[data-testid="table-common"] th').eq(0).contains("Transaction Hash"); cy.get('[data-testid="table-common"] th').eq(1).contains("Created At"); cy.get('[data-testid="table-common"] th').eq(2).contains("Block"); cy.get('[data-testid="table-common"] th').eq(3).contains("Fees"); diff --git a/cypress/e2e/scenario/StakeAddressRegistrationTest.cy.ts b/cypress/e2e/scenario/StakeAddressRegistrationTest.cy.ts index 4d6e921b5c..86c908a786 100644 --- a/cypress/e2e/scenario/StakeAddressRegistrationTest.cy.ts +++ b/cypress/e2e/scenario/StakeAddressRegistrationTest.cy.ts @@ -6,9 +6,9 @@ describe("User check information of stake address registration", () => { cy.get('[data-testid="search-bar"]').should("be.visible"); cy.get('[data-testid="table-common"]').should("be.visible"); cy.get('[data-testid="table-common"] tbody tr').eq(0).click(); - cy.get(".css-62ep8s").contains("View Details").click(); + cy.get("a").contains("View Details", { matchCase: false }).click(); cy.get('[data-testid="search-bar"]').should("be.visible"); - cy.get(".css-igne3v").contains("Stake Address Details").should("be.visible"); + cy.get("div").contains("Stake Address Detail", { matchCase: false }).should("be.visible"); cy.get(":nth-child(1) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Delegated to").should("be.visible"); cy.get(":nth-child(2) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Total Stake").should("be.visible"); cy.get(":nth-child(3) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root") @@ -31,7 +31,7 @@ describe("User check information of stake address registration", () => { cy.get(".MuiTabs-flexContainer button").eq(0).should("have.attr", "aria-selected", "true"); cy.get('[data-testid="table-common"]').should("be.visible"); - cy.get('[data-testid = "table-common"] th:nth-of-type(1)').should("be.visible").contains("Tx Hash"); + cy.get('[data-testid = "table-common"] th:nth-of-type(1)').should("be.visible").contains("Transaction Hash"); cy.get('[data-testid = "table-common"] th:nth-of-type(2)').should("be.visible").contains("Created At"); cy.get('[data-testid = "table-common"] th:nth-of-type(3)').should("be.visible").contains("Block"); cy.get('[data-testid = "table-common"] th:nth-of-type(4)').should("be.visible").contains("Pool ID"); @@ -40,7 +40,7 @@ describe("User check information of stake address registration", () => { cy.get(".MuiTabs-flexContainer button").eq(1).click(); cy.get(".MuiTabs-flexContainer button").eq(1).should("have.attr", "aria-selected", "true"); cy.get('[data-testid="table-common"]').should("be.visible"); - cy.get('[data-testid = "table-common"] th:nth-of-type(1)').should("be.visible").contains("Tx Hash"); + cy.get('[data-testid = "table-common"] th:nth-of-type(1)').should("be.visible").contains("Transaction Hash"); cy.get('[data-testid = "table-common"] th:nth-of-type(2)').should("be.visible").contains("Created At"); cy.get('[data-testid = "table-common"] th:nth-of-type(3)').should("be.visible").contains("Block"); cy.get('[data-testid = "table-common"] th:nth-of-type(4)').should("be.visible").contains("Action"); @@ -48,7 +48,7 @@ describe("User check information of stake address registration", () => { cy.get(".MuiTabs-flexContainer button").eq(2).click(); cy.get(".MuiTabs-flexContainer button").eq(2).should("have.attr", "aria-selected", "true"); cy.get('[data-testid="table-common"]').should("be.visible"); - cy.get('[data-testid = "table-common"] th:nth-of-type(1)').should("be.visible").contains("Tx Hash"); + cy.get('[data-testid = "table-common"] th:nth-of-type(1)').should("be.visible").contains("Transaction Hash"); cy.get('[data-testid = "table-common"] th:nth-of-type(2)').should("be.visible").contains("Created At"); cy.get('[data-testid = "table-common"] th:nth-of-type(3)').should("be.visible").contains("Block"); cy.get('[data-testid = "table-common"] th:nth-of-type(4)').should("be.visible").contains("Amount"); @@ -56,7 +56,7 @@ describe("User check information of stake address registration", () => { cy.get(".MuiTabs-flexContainer button").eq(3).click(); cy.get(".MuiTabs-flexContainer button").eq(3).should("have.attr", "aria-selected", "true"); cy.get('[data-testid="table-common"]').should("be.visible"); - cy.get('[data-testid = "table-common"] th:nth-of-type(1)').should("be.visible").contains("Tx Hash"); + cy.get('[data-testid = "table-common"] th:nth-of-type(1)').should("be.visible").contains("Transaction Hash"); cy.get('[data-testid = "table-common"] th:nth-of-type(2)').should("be.visible").contains("Created At"); cy.get('[data-testid = "table-common"] th:nth-of-type(3)').should("be.visible").contains("Block"); cy.get('[data-testid = "table-common"] th:nth-of-type(4)').should("be.visible").contains("Rewards Paid"); @@ -65,7 +65,7 @@ describe("User check information of stake address registration", () => { cy.get(".MuiTabs-flexContainer button").eq(4).should("have.attr", "aria-selected", "true"); cy.get('[data-testid="table-common"]').should("be.visible"); //cy.get('[data-testid = "table-common"] th:nth-of-type(1)').should('be.visible').contains('#'); - cy.get('[data-testid = "table-common"] th:nth-of-type(1)').should("be.visible").contains("Tx Hash"); + cy.get('[data-testid = "table-common"] th:nth-of-type(1)').should("be.visible").contains("Transaction Hash"); cy.get('[data-testid = "table-common"] th:nth-of-type(2)').should("be.visible").contains("Created At"); cy.get('[data-testid = "table-common"] th:nth-of-type(3)').should("be.visible").contains("Block"); cy.get('[data-testid = "table-common"] th:nth-of-type(4)').should("be.visible").contains("Fees"); diff --git a/cypress/e2e/scenario/StakeDelegationTests.cy.ts b/cypress/e2e/scenario/StakeDelegationTests.cy.ts index 1207704563..1c22369fb3 100644 --- a/cypress/e2e/scenario/StakeDelegationTests.cy.ts +++ b/cypress/e2e/scenario/StakeDelegationTests.cy.ts @@ -6,9 +6,6 @@ describe("Stake address details e2e", () => { cy.get('[data-testid="submenu-button-stake_delegation(s)"]').click(); cy.get("tbody tr td a").first().click(); cy.get('[class*="MuiGrid-root"]').first().should("be.visible"); - cy.get('[data-testid="tab-summary"]').should("be.visible"); - cy.get('[data-testid="tab-utxOs"]').should("be.visible"); - cy.get('[data-testid="tab-delegations"]').should("be.visible"); - cy.get('[data-test-id="CircularProgressbarWithChildren__children"]').should("be.visible"); + cy.get(".MuiAccordionSummary-content div").contains("UTXOs", { matchCase: false }); }); }); diff --git a/cypress/e2e/scenario/TransactionDetail.cy.ts b/cypress/e2e/scenario/TransactionDetail.cy.ts index d025c1edac..f78a2698e7 100644 --- a/cypress/e2e/scenario/TransactionDetail.cy.ts +++ b/cypress/e2e/scenario/TransactionDetail.cy.ts @@ -6,29 +6,19 @@ describe("Pool Certificate", () => { cy.get('[data-testid="submenu-button-pool_certificate"]').click(); cy.get("tbody tr td").first().click(); cy.get('[class*="MuiGrid-root"]').first().should("be.visible"); - cy.get('[data-testid="tab-summary"]').should("be.visible"); - cy.get('[data-testid="tab-utxOs"]').should("be.visible"); + cy.get(".MuiAccordionSummary-content div").contains("UTXOs", { matchCase: false }); + cy.get(".MuiAccordionSummary-content div").contains("Pool certificates", { matchCase: false }); cy.get('[data-test-id="CircularProgressbarWithChildren__children"]').should("be.visible"); }); - it("should navigate to the transaction detail from instantanous reward e2e", () => { - cy.visit("/"); - cy.get('[data-testid="menu-button-operational_certificates"]').click(); - cy.get('[data-testid="submenu-button-instantaneous_rewards_"]').click(); - cy.get("tbody tr td a").first().click(); - cy.get('[class*="MuiGrid-root"]').first().should("be.visible"); - cy.get('[data-testid="tab-summary"]').should("be.visible"); - cy.get('[data-testid="tab-utxOs"]').should("be.visible"); - cy.get('[data-test-id="CircularProgressbarWithChildren__children"]').should("be.visible"); - }); it("should navigate to the transaction detail from pool deregistration e2e", () => { cy.visit("/"); cy.get('[data-testid="menu-button-operational_certificates"]').click(); cy.get('[data-testid="submenu-button-pool_deregistration"]').click(); cy.get("tbody tr td a").first().click(); cy.get('[class*="MuiGrid-root"]').first().should("be.visible"); - cy.get('[data-testid="tab-summary"]').should("be.visible"); - cy.get('[data-testid="tab-utxOs"]').should("be.visible"); + cy.get(".MuiAccordionSummary-content div").contains("UTXOs", { matchCase: false }); + cy.get(".MuiAccordionSummary-content div").contains("Pool certificates", { matchCase: false }); cy.get('[data-test-id="CircularProgressbarWithChildren__children"]').should("be.visible"); }); }); diff --git a/cypress/e2e/scenario/userCheckCurrentEpochInfo/UserCheckCurrentEpochInfo.cy.ts b/cypress/e2e/scenario/userCheckCurrentEpochInfo/UserCheckCurrentEpochInfo.cy.ts index e9481a6b9f..ad2e80e234 100644 --- a/cypress/e2e/scenario/userCheckCurrentEpochInfo/UserCheckCurrentEpochInfo.cy.ts +++ b/cypress/e2e/scenario/userCheckCurrentEpochInfo/UserCheckCurrentEpochInfo.cy.ts @@ -10,18 +10,18 @@ describe("User check information of current Epoch", () => { cy.get("span").contains("Per page").should("be.visible"); cy.get('[data-test-id="CircularProgressbarWithChildren"]').click(); - cy.get("a").contains("View Details").should("be.visible"); + cy.get("a").contains("View Details", { matchCase: false }).should("be.visible"); - cy.get("a").contains("View Details").click(); + cy.get("a").contains("View Details", { matchCase: false }).click(); cy.get('[data-testid="search-bar"]').should("be.visible"); - cy.get("div").contains("Start Timestamp ").should("be.visible"); - cy.get("div").contains("End Timestamp ").should("be.visible"); - cy.get("div").contains(" Total Output").should("be.visible"); + cy.get("div").contains("Start Timestamp", { matchCase: false }).should("be.visible"); + cy.get("div").contains("End Timestamp", { matchCase: false }).should("be.visible"); + cy.get("div").contains(" Total Output", { matchCase: false }).should("be.visible"); cy.get("div").contains(" Blocks").should("be.visible"); cy.get("div").contains(" Slot").should("be.visible"); - cy.get("div").contains(" Unique Accounts").should("be.visible"); - cy.get("div").contains(" Transaction Count").should("be.visible"); - cy.get("div").contains(" Rewards Distributed").should("be.visible"); + cy.get("div").contains(" Unique Accounts", { matchCase: false }).should("be.visible"); + cy.get("div").contains(" Transaction Count", { matchCase: false }).should("be.visible"); + cy.get("div").contains(" Rewards Distributed", { matchCase: false }).should("be.visible"); cy.get('[data-testid="table-common"]').should("be.visible"); cy.wait(2000); cy.get('[data-testid="footer"]').scrollIntoView(); diff --git a/cypress/e2e/scenario/userCheckLatestBlockInfo/UserCheckLatestBlockInfo.cy.ts b/cypress/e2e/scenario/userCheckLatestBlockInfo/UserCheckLatestBlockInfo.cy.ts index 4e70d5e87a..075ea7fbe8 100644 --- a/cypress/e2e/scenario/userCheckLatestBlockInfo/UserCheckLatestBlockInfo.cy.ts +++ b/cypress/e2e/scenario/userCheckLatestBlockInfo/UserCheckLatestBlockInfo.cy.ts @@ -9,17 +9,16 @@ describe("User check information of latest Block", () => { cy.get("span").contains("Per page").should("be.visible"); cy.get('[data-testid="table-common"] tbody tr').eq(0).click(); - cy.get("a").contains("View Details").should("be.visible"); - cy.get("a").contains("View Details").click(); - cy.wait(2000); + cy.get("a").contains("View Details", { matchCase: false }).should("be.visible"); + cy.get("a").contains("View Details", { matchCase: false }).click(); cy.get('[data-testid="search-bar"]').should("be.visible"); cy.get("p > div").should("be.visible"); - cy.get("div").contains("Block details").should("be.visible"); - cy.get("div").contains("Created At ").should("be.visible"); + cy.get("div").contains("Block details", { matchCase: false }).should("be.visible"); + cy.get("div").contains("Created At", { matchCase: false }).should("be.visible"); cy.get("div").contains("Confirmation").should("be.visible"); cy.get("div").contains("Transactions").should("be.visible"); - cy.get("div").contains("Transaction Fees ").should("be.visible"); + cy.get("div").contains("Transaction Fees", { matchCase: false }).should("be.visible"); cy.get("div").contains(" Block").should("be.visible"); cy.get("div").contains(" Slot").should("be.visible"); cy.get('[data-testid="table-common"]').should("be.visible"); diff --git a/cypress/e2e/scenario/userCheckLatestTransactionInfo/UserCheckLatestTransactionInfo.cy.ts b/cypress/e2e/scenario/userCheckLatestTransactionInfo/UserCheckLatestTransactionInfo.cy.ts index 045549e3a5..abc5968d3f 100644 --- a/cypress/e2e/scenario/userCheckLatestTransactionInfo/UserCheckLatestTransactionInfo.cy.ts +++ b/cypress/e2e/scenario/userCheckLatestTransactionInfo/UserCheckLatestTransactionInfo.cy.ts @@ -9,21 +9,20 @@ describe("User check information of latest Transaction", () => { cy.get("span").contains("Per page").should("be.visible"); cy.get('[data-testid="table-common"] tbody tr').eq(0).click(); - cy.get("a").contains("View Details").should("be.visible"); - cy.get("a").contains("View Details").click(); + cy.get("a").contains("View Details", { matchCase: false }).should("be.visible"); + cy.get("a").contains("View Details", { matchCase: false }).click(); cy.wait(2000); cy.get('[data-testid="search-bar"]').should("be.visible"); cy.get("p > div").should("be.visible"); cy.get("div").contains("Input").should("be.visible"); cy.get("div").contains("Output").should("be.visible"); - cy.get("div").contains("Created At").should("be.visible"); - cy.get("div").contains("Confirmation").should("be.visible"); - cy.get("div").contains("Total Output").should("be.visible"); - cy.get("div").contains("Transaction Fees ").should("be.visible"); + cy.get("div").contains("Created At", { matchCase: false }).should("be.visible"); + cy.get("div").contains("Confirmation", { matchCase: false }).should("be.visible"); + cy.get("div").contains("Total Output", { matchCase: false }).should("be.visible"); + cy.get("div").contains("Transaction Fees", { matchCase: false }).should("be.visible"); cy.get("div").contains("Block").should("be.visible"); cy.get("div").contains("Slot").should("be.visible"); - cy.get('[data-testid="tab-summary"]').should("be.visible"); - cy.get('[data-testid="tab-utxOs"]').should("be.visible"); + cy.get(".MuiAccordionSummary-content div").contains("UTXOs", { matchCase: false }); }); }); diff --git a/cypress/e2e/scenario/userCheckRandomTokenInfo/UserCheckRandomTokenInfo.cy.ts b/cypress/e2e/scenario/userCheckRandomTokenInfo/UserCheckRandomTokenInfo.cy.ts index e52a7762d1..25233290d5 100644 --- a/cypress/e2e/scenario/userCheckRandomTokenInfo/UserCheckRandomTokenInfo.cy.ts +++ b/cypress/e2e/scenario/userCheckRandomTokenInfo/UserCheckRandomTokenInfo.cy.ts @@ -9,21 +9,21 @@ describe("User check information of Random Token", () => { cy.get("span").contains("Per page").should("be.visible"); cy.get('[data-testid="table-common"] tbody tr').eq(0).click(); - cy.get("a").contains("View Details").should("be.visible"); - cy.get("a").contains("View Details").click(); + cy.get("a").contains("View Details", { matchCase: false }).should("be.visible"); + cy.get("a").contains("View Details", { matchCase: false }).click(); cy.wait(2000); cy.get('[data-testid="search-bar"]').should("be.visible"); cy.get("p > div").should("be.visible"); - cy.get("div").contains("Total Supply").should("be.visible"); - cy.get("div").contains("Total Transactions").should("be.visible"); - cy.get("div").contains("Policy Id").should("be.visible"); - cy.get("div").contains("Token Type").should("be.visible"); - cy.get("div").contains("Number of Holders").should("be.visible"); - cy.get("div").contains("Total Volume").should("be.visible"); - cy.get("div").contains("Volume 24H").should("be.visible"); + cy.get("div").contains("Total Supply", { matchCase: false }).should("be.visible"); + cy.get("div").contains("Total Transactions", { matchCase: false }).should("be.visible"); + cy.get("div").contains("Policy Id", { matchCase: false }).should("be.visible"); + cy.get("div").contains("Token Type", { matchCase: false }).should("be.visible"); + cy.get("div").contains("Number of Holders", { matchCase: false }).should("be.visible"); + cy.get("div").contains("Total Volume", { matchCase: false }).should("be.visible"); + cy.get("div").contains("Volume 24H", { matchCase: false }).should("be.visible"); cy.get("div").contains("Created At").should("be.visible"); - cy.get("div").contains("Token Last Activity").should("be.visible"); + cy.get("div").contains("Token Last Activity", { matchCase: false }).should("be.visible"); cy.get('div[class="recharts-responsive-container"]').should("be.visible"); cy.get('[data-testid="footer"]').scrollIntoView(); diff --git a/cypress/e2e/spoTabularView/PoolGeneralInformationTest.cy.ts b/cypress/e2e/spoTabularView/PoolGeneralInformationTest.cy.ts index 3389ad2eb1..204321b2c2 100644 --- a/cypress/e2e/spoTabularView/PoolGeneralInformationTest.cy.ts +++ b/cypress/e2e/spoTabularView/PoolGeneralInformationTest.cy.ts @@ -8,9 +8,9 @@ describe("Pool general information ", () => { cy.wait(1000); cy.get('div>div>button[active="0"]').click(); cy.get('[data-testid="table-common"]').should("be.visible"); - cy.get("div").contains("Pool Size").should("be.visible"); + cy.get("div").contains("Pool Size", { matchCase: false }).should("be.visible"); cy.get("div").contains("Status").should("be.visible"); - cy.get("div").contains("Rewards Available").should("be.visible"); - cy.get("div").contains("Owner Account").should("be.visible"); + cy.get("div").contains("Rewards Available", { matchCase: false }).should("be.visible"); + cy.get("div").contains("Owner Account", { matchCase: false }).should("be.visible"); }); }); diff --git a/cypress/e2e/stake/StakeKeyDetailsTests.cy.ts b/cypress/e2e/stake/StakeKeyDetailsTests.cy.ts index a3fa1ed9f6..62805e0360 100644 --- a/cypress/e2e/stake/StakeKeyDetailsTests.cy.ts +++ b/cypress/e2e/stake/StakeKeyDetailsTests.cy.ts @@ -9,49 +9,48 @@ describe("Stake key detail", () => { }); it("should have enough columns of Delegation History tab", () => { - cy.get(".css-1dz0v3k > tr > :nth-child(1)").scrollIntoView().should("be.visible").contains("Tx Hash"); - cy.get(".css-1dz0v3k > tr > :nth-child(2)").scrollIntoView().should("be.visible").contains("Created At"); - cy.get(".css-1dz0v3k > tr > :nth-child(3)").scrollIntoView().should("be.visible").contains("Block"); - cy.get(".css-1dz0v3k > tr > :nth-child(4)").scrollIntoView().should("be.visible").contains("Pool ID"); - cy.get(".css-1dz0v3k > tr > :nth-child(5)").scrollIntoView().should("be.visible").contains("Pool Name"); + cy.get("table tr th").contains("Transaction Hash"); + cy.get("table tr th").contains("Created At"); + cy.get("table tr th").contains("Block"); + cy.get("table tr th").contains("Pool ID"); + cy.get("table tr th").contains("Pool Name"); }); it("should have enough columns of Staking Address tab", () => { cy.get(".MuiTabs-flexContainer button").eq(1).scrollIntoView().click(); - cy.get(".css-1dz0v3k > tr > :nth-child(1)").scrollIntoView().should("be.visible").contains("Tx Hash"); - cy.get(".css-1dz0v3k > tr > :nth-child(2)").scrollIntoView().should("be.visible").contains("Created At"); - cy.get(".css-1dz0v3k > tr > :nth-child(3)").scrollIntoView().should("be.visible").contains("Block"); - cy.get(".css-1dz0v3k > tr > :nth-child(4)").scrollIntoView().should("be.visible").contains("Action"); + cy.get("table tr th").contains("Transaction Hash"); + cy.get("table tr th").contains("Created At"); + cy.get("table tr th").contains("Block"); + cy.get("table tr th").contains("Action"); }); it("should have enough columns of Withdrawal History tab", () => { cy.get(".MuiTabs-flexContainer button").eq(2).scrollIntoView().click(); - cy.get(".css-1dz0v3k > tr > :nth-child(1)").scrollIntoView().should("be.visible").contains("Tx Hash"); - cy.get(".css-1dz0v3k > tr > :nth-child(2)").scrollIntoView().should("be.visible").contains("Created At"); - cy.get(".css-1dz0v3k > tr > :nth-child(3)").scrollIntoView().should("be.visible").contains("Block"); - cy.get(".css-1dz0v3k > tr > :nth-child(4)").scrollIntoView().should("be.visible").contains("Amount"); + cy.get("table tr th").contains("Transaction Hash"); + cy.get("table tr th").contains("Created At"); + cy.get("table tr th").contains("Block"); + cy.get("table tr th").contains("Amount"); }); it("should have enough columns of Instantaneous Rewards tab", () => { cy.get(".MuiTabs-flexContainer button").eq(3).scrollIntoView().click(); - cy.get(".css-1dz0v3k > tr > :nth-child(1)").scrollIntoView().should("be.visible").contains("Tx Hash"); - cy.get(".css-1dz0v3k > tr > :nth-child(2)").scrollIntoView().should("be.visible").contains("Created At"); - cy.get(".css-1dz0v3k > tr > :nth-child(3)").scrollIntoView().should("be.visible").contains("Block"); - cy.get(".css-1dz0v3k > tr > :nth-child(4)").scrollIntoView().should("be.visible").contains("Rewards Paid"); + cy.get("table tr th").contains("Transaction Hash"); + cy.get("table tr th").contains("Created At"); + cy.get("table tr th").contains("Block"); + cy.get("table tr th").contains("Rewards Paid"); }); it("should have enough columns of Transactions tab", () => { cy.get(".MuiTabs-flexContainer button").eq(4).scrollIntoView().click(); - //cy.get(".css-1dz0v3k > tr > :nth-child(1)").scrollIntoView().should("be.visible").contains("#"); - cy.get(".css-1dz0v3k > tr > :nth-child(1)").scrollIntoView().should("be.visible").contains("Tx Hash"); - cy.get(".css-1dz0v3k > tr > :nth-child(2)").scrollIntoView().should("be.visible").contains("Created At"); - cy.get(".css-1dz0v3k > tr > :nth-child(3)").scrollIntoView().should("be.visible").contains("Block"); - cy.get(".css-1dz0v3k > tr > :nth-child(4)").scrollIntoView().should("be.visible").contains("Fees"); - cy.get(".css-1dz0v3k > tr > :nth-child(5)").scrollIntoView().should("be.visible").contains("ADA amount"); - cy.get(".css-1dz0v3k > tr > :nth-child(6)").scrollIntoView().should("be.visible").contains("Token"); + cy.get("table tr th").contains("Transaction Hash"); + cy.get("table tr th").contains("Created At"); + cy.get("table tr th").contains("Block"); + cy.get("table tr th").contains("Fees"); + cy.get("table tr th").contains("ADA amount"); + cy.get("table tr th").contains("Token"); }); }); diff --git a/cypress/e2e/stake/StakeKeyListDeregistrationTest.cy.ts b/cypress/e2e/stake/StakeKeyListDeregistrationTest.cy.ts index 01df473803..12e31d5e3e 100644 --- a/cypress/e2e/stake/StakeKeyListDeregistrationTest.cy.ts +++ b/cypress/e2e/stake/StakeKeyListDeregistrationTest.cy.ts @@ -9,10 +9,13 @@ describe("Stake key de registration", () => { }); it("should have enough columns", () => { - cy.get(".css-1dz0v3k > tr > :nth-child(1)").scrollIntoView().should("be.visible").contains("Tx Hash"); + cy.get(".css-1dz0v3k > tr > :nth-child(1)").scrollIntoView().should("be.visible").contains("Transaction Hash"); cy.get(".css-1dz0v3k > tr > :nth-child(2)").scrollIntoView().should("be.visible").contains("Created At"); cy.get(".css-1dz0v3k > tr > :nth-child(3)").scrollIntoView().should("be.visible").contains("Block"); - cy.get(".css-1dz0v3k > tr > :nth-child(4)").scrollIntoView().should("be.visible").contains("Stake Address"); + cy.get(".css-1dz0v3k > tr > :nth-child(4)") + .scrollIntoView() + .should("be.visible") + .contains("Stake Address", { matchCase: false }); cy.get(".css-1dz0v3k > tr > :nth-child(5)").scrollIntoView().should("be.visible"); }); }); diff --git a/cypress/e2e/stake/StakeKeyListRegistrationTests.cy.ts b/cypress/e2e/stake/StakeKeyListRegistrationTests.cy.ts index 571882c3c3..edc31b939a 100644 --- a/cypress/e2e/stake/StakeKeyListRegistrationTests.cy.ts +++ b/cypress/e2e/stake/StakeKeyListRegistrationTests.cy.ts @@ -9,10 +9,13 @@ describe("Stake key registration", () => { }); it("should have enough columns", () => { - cy.get(".css-1dz0v3k > tr > :nth-child(1)").scrollIntoView().should("be.visible").contains("Tx Hash"); + cy.get(".css-1dz0v3k > tr > :nth-child(1)").scrollIntoView().should("be.visible").contains("Transaction Hash"); cy.get(".css-1dz0v3k > tr > :nth-child(2)").scrollIntoView().should("be.visible").contains("Created At"); cy.get(".css-1dz0v3k > tr > :nth-child(3)").scrollIntoView().should("be.visible").contains("Block"); - cy.get(".css-1dz0v3k > tr > :nth-child(4)").scrollIntoView().should("be.visible").contains("Stake Address"); + cy.get(".css-1dz0v3k > tr > :nth-child(4)") + .scrollIntoView() + .should("be.visible") + .contains("Stake Address", { matchCase: false }); cy.get(".css-1dz0v3k > tr > :nth-child(5)").scrollIntoView().should("be.visible"); }); }); diff --git a/cypress/e2e/token.cy.ts b/cypress/e2e/token.cy.ts index 89c8622b33..2e2d142c34 100644 --- a/cypress/e2e/token.cy.ts +++ b/cypress/e2e/token.cy.ts @@ -5,26 +5,25 @@ describe("token spec", () => { cy.visit("/"); cy.get('[data-testid="menu-button-blockchain"]').click(); cy.get('[data-testid="submenu-button-native_tokens"]').click(); - cy.get(".css-1l7sjfb").contains("Native Tokens"); + cy.get("h2").contains("Native Tokens"); cy.get(".css-1dz0v3k > tr > :nth-child(1)").contains("Icon"); - cy.get(".css-1dz0v3k > tr > :nth-child(2)").contains("Asset Name"); - cy.get(".css-1dz0v3k > tr > :nth-child(3)").contains("Policy ID"); - cy.get(".css-1dz0v3k > tr > :nth-child(4)").contains("Total Transactions"); - cy.get(".css-1dz0v3k > tr > :nth-child(5)").contains("Number of Holders"); - cy.get(".css-1dz0v3k > tr > :nth-child(6)").contains("Total Volume"); - cy.get(".css-1dz0v3k > tr > :nth-child(7)").contains("Volume 24H"); - cy.get(".css-1dz0v3k > tr > :nth-child(8)").contains("Total Supply"); - cy.get(".css-1dz0v3k > tr > :nth-child(9)").contains("Created At"); + cy.get(".css-1dz0v3k > tr > :nth-child(2)").contains("Asset Name", { matchCase: false }); + cy.get(".css-1dz0v3k > tr > :nth-child(3)").contains("Policy ID", { matchCase: false }); + cy.get(".css-1dz0v3k > tr > :nth-child(4)").contains("Total Transactions", { matchCase: false }); + cy.get(".css-1dz0v3k > tr > :nth-child(5)").contains("Number of Holders", { matchCase: false }); + cy.get(".css-1dz0v3k > tr > :nth-child(6)").contains("Total Volume", { matchCase: false }); + cy.get(".css-1dz0v3k > tr > :nth-child(7)").contains("Volume 24H", { matchCase: false }); + cy.get(".css-1dz0v3k > tr > :nth-child(8)").contains("Total Supply", { matchCase: false }); + cy.get(".css-1dz0v3k > tr > :nth-child(9)").contains("Created At", { matchCase: false }); }); it("redirect to correct token detail page", () => { const tokenName = "HOSKY"; cy.visit("/tokens"); - cy.get(".css-1l7sjfb").contains("Native Tokens"); + cy.get("h2").contains("Native Tokens"); cy.get('[data-testid="search-bar"]').type(tokenName).type("{enter}"); cy.get(".css-cssveg > :nth-child(1) > :nth-child(2)").contains(tokenName); cy.get(":nth-child(1) > :nth-child(2) > .css-1945haz").click(); - //cy.get(".css-d1xa0j > .MuiBox-root").contains(tokenName); }); it("should navigate to the token detail page", () => { @@ -34,18 +33,18 @@ describe("token spec", () => { cy.get(".css-d1xa0j > .MuiBox-root").contains(tokenName); cy.get(".css-1kxgysv").contains(tokenId); cy.get(".css-1s8g7c7 > span").contains(tokenName); - cy.get(":nth-child(2) > .css-13ne0mf > .MuiBox-root").contains("Total Supply"); - cy.get(":nth-child(3) > .css-13ne0mf > .MuiBox-root").contains("Policy Id"); - cy.get(":nth-child(4) > .css-13ne0mf > .MuiBox-root").contains("Total Transactions"); - cy.get(":nth-child(5) > .css-13ne0mf > .MuiBox-root").contains("Token Type"); - cy.get(":nth-child(6) > .css-13ne0mf > .MuiBox-root").contains("Number of Holders"); - cy.get(":nth-child(7) > .css-13ne0mf > .MuiBox-root").contains("Total Volume"); - cy.get(":nth-child(8) > .css-13ne0mf > .MuiBox-root").contains("Volume 24H"); - cy.get(":nth-child(9) > .css-13ne0mf > .MuiBox-root").contains("Created At"); - cy.get(":nth-child(10) > .css-13ne0mf > .MuiBox-root").contains("Token Last Activity"); + cy.get(":nth-child(2) > .css-13ne0mf > .MuiBox-root").contains("Total Supply", { matchCase: false }); + cy.get(":nth-child(3) > .css-13ne0mf > .MuiBox-root").contains("Policy Id", { matchCase: false }); + cy.get(":nth-child(4) > .css-13ne0mf > .MuiBox-root").contains("Total Transactions", { matchCase: false }); + cy.get(":nth-child(5) > .css-13ne0mf > .MuiBox-root").contains("Token Type", { matchCase: false }); + cy.get(":nth-child(6) > .css-13ne0mf > .MuiBox-root").contains("Number of Holders", { matchCase: false }); + cy.get(":nth-child(7) > .css-13ne0mf > .MuiBox-root").contains("Total Volume", { matchCase: false }); + cy.get(":nth-child(8) > .css-13ne0mf > .MuiBox-root").contains("Volume 24H", { matchCase: false }); + cy.get(":nth-child(9) > .css-13ne0mf > .MuiBox-root").contains("Created At", { matchCase: false }); + cy.get(":nth-child(10) > .css-13ne0mf > .MuiBox-root").contains("Token Last Activity", { matchCase: false }); cy.get(".css-12euw8y").contains("Analytics"); cy.get(".css-tedkql").contains("Transactions"); - cy.get("button[id*='topHolders'] div div").last().contains("Top Holders"); + cy.get("button[id*='topHolders'] div div").last().contains("Top Holders", { matchCase: false }); cy.get("button[id*='tokenMint'] div div").last().contains("Minting"); cy.get("button[id*='metadata'] div div").last().contains("Metadata"); }); diff --git a/cypress/e2e/transactions.cy.ts b/cypress/e2e/transactions.cy.ts index a2e7e94578..33281d599e 100644 --- a/cypress/e2e/transactions.cy.ts +++ b/cypress/e2e/transactions.cy.ts @@ -7,12 +7,12 @@ describe("transactions spec", () => { cy.get('[data-testid="submenu-button-transactions"]').click(); cy.get('[data-testid="transactions-card"]').contains("Transactions"); //cy.get(".css-1dz0v3k > tr > :nth-child(1)").contains("#"); - cy.get(".css-1dz0v3k > tr > :nth-child(1)").contains("Tx Hash"); - cy.get(".css-1dz0v3k > tr > :nth-child(2)").contains("Block"); - cy.get(".css-1dz0v3k > tr > :nth-child(3)").contains("Fees"); - cy.get(".css-1dz0v3k > tr > :nth-child(4)").contains("Output in ADA"); - cy.get(".css-1dz0v3k > tr > :nth-child(5)").contains("Input address"); - cy.get(".css-1dz0v3k > tr > :nth-child(6)").contains("Output address"); + cy.get(".css-1dz0v3k > tr > :nth-child(1)").contains("Tx Hash", { matchCase: false }); + cy.get(".css-1dz0v3k > tr > :nth-child(2)").contains("Block", { matchCase: false }); + cy.get(".css-1dz0v3k > tr > :nth-child(3)").contains("Fees", { matchCase: false }); + cy.get(".css-1dz0v3k > tr > :nth-child(4)").contains("Output in ADA", { matchCase: false }); + cy.get(".css-1dz0v3k > tr > :nth-child(5)").contains("Input address", { matchCase: false }); + cy.get(".css-1dz0v3k > tr > :nth-child(6)").contains("Output address", { matchCase: false }); }); it("redirect to correct transaction detail page", () => { @@ -20,24 +20,26 @@ describe("transactions spec", () => { cy.visit("/transactions"); cy.get('[data-testid="transactions-card"]').contains("Transactions"); cy.get('[data-testid="search-bar"]').type(txHash).type("{enter}"); - cy.get(".css-igne3v").contains("Transaction details"); + cy.get("div").contains("Transaction details", { matchCase: false }); cy.get(".css-1kxgysv").contains(txHash); }); it("should navigate to the transaction detail page", () => { const txHash = "b87b6d4296d43480f4915cdd11a3b97f3fb48e997ea4973b922fec477808bcf6"; cy.visit("/transaction/b87b6d4296d43480f4915cdd11a3b97f3fb48e997ea4973b922fec477808bcf6"); - cy.get(".css-igne3v").contains("Transaction details"); + cy.get("div").contains("Transaction details"); cy.get(".css-1kxgysv").contains(txHash); cy.get(":nth-child(1) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Input"); cy.get(":nth-child(2) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Output"); - cy.get(":nth-child(3) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Created At"); - cy.get(":nth-child(4) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Confirmations"); - cy.get(":nth-child(5) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Total Output"); - cy.get(":nth-child(6) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Transaction Fees"); + cy.get(":nth-child(3) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Created At", { matchCase: false }); + cy.get(":nth-child(4) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Confirmations", { matchCase: false }); + cy.get(":nth-child(5) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Total Output", { matchCase: false }); + cy.get(":nth-child(6) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Transaction Fees", { + matchCase: false + }); cy.get(":nth-child(7) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Block"); cy.get(":nth-child(8) > .css-13ne0mf > .css-70qvj9 > .MuiBox-root").contains("Slot"); - cy.get('[data-testid="tab-summary"]').contains("Summary"); - cy.get('[data-testid="tab-utxOs"]').contains("UTXOs"); + cy.get(".MuiAccordionSummary-content div").contains("Summary"); + cy.get(".MuiAccordionSummary-content div").contains("UTXOs"); }); }); diff --git a/src/components/Contracts/ContractDetail.tsx b/src/components/Contracts/ContractDetail.tsx index 58c4125481..cd56aa8a00 100644 --- a/src/components/Contracts/ContractDetail.tsx +++ b/src/components/Contracts/ContractDetail.tsx @@ -49,7 +49,9 @@ const ContractDetail: React.FC = ({ data, onGoBack, isMobil - {!isMobile && onGoBack?.(data)} />} + {!isMobile && ( + onGoBack?.(data)} /> + )} Contract:{" "} diff --git a/src/components/Contracts/common/ContractItem.tsx b/src/components/Contracts/common/ContractItem.tsx index 218a3d0542..5b7e757de4 100644 --- a/src/components/Contracts/common/ContractItem.tsx +++ b/src/components/Contracts/common/ContractItem.tsx @@ -64,7 +64,7 @@ const ContractItem: React.FC = ({ data, onClick }) => { }; return ( - + Contract Address: