Skip to content

Commit

Permalink
Merge pull request #3227 from cardano-foundation/1.1.0
Browse files Browse the repository at this point in the history
merge 1.1.0 into main
  • Loading branch information
cfuisat authored Apr 10, 2024
2 parents 270c488 + 27d6869 commit b0f30de
Show file tree
Hide file tree
Showing 115 changed files with 5,603 additions and 2,802 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e_tests_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: 🫡 Setup node
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18

- name: 🧘‍♀️ Download dependencies
run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e_tests_staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: 🫡 Setup node
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18

- name: 🧘‍♀️ Download dependencies
run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e_tests_uat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: 🫡 Setup node
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18

- name: 🧘‍♀️ Download dependencies
run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
release-type: node
bump-minor-pre-major: true
bump-patch-for-minor-pre-major: true
release-as: 1.0.0
release-as: 1.1.0
2 changes: 1 addition & 1 deletion .github/workflows/smoke_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: 🫡 Setup node
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18

- name: 🧘‍♀️ Download dependencies
run: npm ci
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run Jest Tests
name: Run Unit Tests
on:
pull_request:
types: [opened, synchronize]
Expand All @@ -16,7 +16,7 @@ jobs:
- name: 🫡 Setup node
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18

- name: 🧘‍♀️ Download dependencies
run: npm ci
Expand Down
4 changes: 0 additions & 4 deletions cypress/e2e/DelegatorLifecycleTests.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ describe("Delegator Lifecycle", () => {
cy.get('[id="step-3"]').click();
cy.get('[data-testid="overview-staking"]').should("be.visible");
});
it("should on deregistration", () => {
cy.get('[id="step-4"]').click();
cy.get('[data-testid="delegator-deregistration-certificate"]').should("be.visible");
});

it("should on random stake", () => {
cy.visit("/staking-lifecycle");
Expand Down
8 changes: 4 additions & 4 deletions cypress/e2e/ProtocolParamTests.cy.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/// <reference types="cypress" />

describe("template spec", () => {
it("should navigate to the blocks page", () => {
it("should navigate to the protocol parameter page", () => {
cy.visit("/");
cy.get('[data-testid="menu-button-protocol_parameters"]').click();
//cy.get(".css-1cv7afn").contains("Protocol parameters");
cy.get("button").contains("View update history");
cy.get("button").contains("View Update Activity");
//Updateable Parameters table
cy.get('[data-testid="table-common"] th:nth-child(1)').first().contains("Parameter Name");
cy.get('[data-testid="table-common"] th:nth-child(2)').first().contains("Value");
Expand All @@ -16,9 +16,9 @@ describe("template spec", () => {
cy.get('[data-testid="table-common"] th:nth-child(2)').last().contains("Value");
});

it("should navigate to the blocks page", () => {
it("should navigate to the protocol parameter page", () => {
cy.visit("/protocol-parameters");
//cy.get("css-1cv7afn").contains("Protocol parameters");
cy.get("button").contains("View update history");
cy.get("button").contains("View Update Activity");
});
});
3 changes: 1 addition & 2 deletions cypress/e2e/SmartcontractDetail.cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe("Smartcontract Detail", () => {
it("should navigate to the smartcontract detail page", () => {
cy.visit(`/en/smart-contract/3b26d32626c39f1b24d9492795ddbf604e16542fe3336ab9b044c940`);
cy.visit(`/en/smart-contract/86bff95ba20e9d1d1b34899a56d86bbacc9fed999260b27dcc92d128`);
cy.get("h2").contains("Smart Contract Details");
cy.get('[data-testid="sc.scriptHash"]').contains("Script Hash", { matchCase: false });
cy.get('[data-testid="sc.versionTitle"]').contains("Version", { matchCase: false });
Expand All @@ -18,6 +18,5 @@ describe("Smartcontract Detail", () => {
cy.get(`[data-testid="table-common"] tr th`).should("be.visible").contains("Absolute Slot");
cy.get(`[data-testid="table-common"] tr th`).should("be.visible").contains("Addresses");
cy.get(`[data-testid="table-common"] tr th`).should("be.visible").contains("Purpose");
cy.get('[data-testid="sc.versionValue"]').contains("Plutus v2", { matchCase: false });
});
});
13 changes: 0 additions & 13 deletions cypress/e2e/contracts.cy.ts

This file was deleted.

18 changes: 9 additions & 9 deletions cypress/e2e/delegationPool.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ describe("delegation pool spec", () => {
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("Voting Power");
cy.get("table tr th").contains("Blocks lifetime", { matchCase: false });
cy.get("table tr th").contains("Fixed Cost");
cy.get("table tr th").contains("Governance Participation Rate");
});

it("redirect to correct transaction detail page", () => {
Expand All @@ -35,13 +35,13 @@ describe("delegation pool spec", () => {
cy.visit("/pool/pool1m06tlj2ykawzvweacgmhxj43hykczgfuynk2lqzxvshm5lq2lyq");
cy.get("small").contains("Pool ID", { matchCase: false });
cy.get("small ~ a").should("have.attr", "href").and("include", pool);
cy.get(":nth-child(1) > .css-syl2v3 > .css-vkzxw5").contains("Ticker");
cy.get(":nth-child(2) > .css-syl2v3 > .css-vkzxw5").contains("Created At");
cy.get(":nth-child(3) > .css-syl2v3 .css-vkzxw5").contains("Reward Account");
cy.get(":nth-child(4) > .css-syl2v3 .css-vkzxw5").contains("Owner Account");
cy.get(":nth-child(5) > .css-syl2v3 > .css-vkzxw5").contains("Pool size");
cy.get(":nth-child(6) > .css-syl2v3 > .css-vkzxw5").contains("Stake limit");
cy.get(":nth-child(7) > .css-syl2v3 > .css-vkzxw5").contains("Delegators");
cy.get(":nth-child(1) > .css-13548mp > .css-vkzxw5").contains("Ticker");
cy.get(":nth-child(2) > .css-13548mp > .css-vkzxw5").contains("Created At");
cy.get(":nth-child(3) > .css-13548mp .css-vkzxw5").contains("Reward Account");
cy.get(":nth-child(4) > .css-13548mp .css-vkzxw5").contains("Owner Account");
cy.get(":nth-child(5) > .css-13548mp > .css-vkzxw5").contains("Pool size");
cy.get(":nth-child(6) > .css-13548mp > .css-vkzxw5").contains("Stake limit");
cy.get(":nth-child(7) > .css-13548mp > .css-vkzxw5").contains("Delegators");

cy.get("div > .css-27jcwj").contains("Fixed Cost");
cy.get("div > .css-27jcwj").contains("Margin");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe("Deregistration screen", () => {
it("User go to Staking Lifecycle and input the Stake Address, then verify the Deregistration Screen", () => {
const stakeAddress = "stake1uyeqqejrlf0g7d57qydvw78utfw3fv65tcxe0t69edfpdwsk8ksqy";
const stakeAddress = "stake1u8wfran22c8tk3jxvhzkdjfqvvn4g8gj56keq6lrw75s4wcq94rmf";
cy.visit("/");
cy.get('[data-testid="menu-button-staking_lifecycle"]').click();
cy.get("input[placeholder]").type(stakeAddress).type("{enter}");
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/epochs.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ describe("epoch spec", () => {
});

it("redirect to correct epoch detail page", () => {
const epoch = "426";
const epoch = "80";
cy.visit("/epochs");
cy.get('[data-testid="search-bar"]').type(epoch).type("{enter}");
cy.get("div").contains("Epoch details");
cy.get(".css-17lbe4a").contains(epoch);
});

it("should navigate to the epoch detail page", () => {
const epoch = "426";
cy.visit("/epoch/426");
const epoch = "80";
cy.visit("/epoch/80");
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", {
Expand Down
4 changes: 3 additions & 1 deletion cypress/e2e/policy.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ describe("policy spec", () => {
cy.visit("/policy/d5e6bf0500378d4f0da4e8dde6becec7621cd8cbf5cbb9b87013d4cc?page=1&size=50");
cy.contains("Policy Asset Holders").click();
cy.get('[data-testid="table-common"]').contains("Balance").should("be.visible");
cy.get('[data-testid="table-common"] :nth-child(1) > td:nth-child(4)').should("have.text", "2");
cy.get('[data-testid="table-common"]').contains("Token Name").should("be.visible");
cy.get('[data-testid="table-common"]').contains("Address").should("be.visible");
cy.get('[data-testid="table-common"]').contains("Token ID").should("be.visible");
});
});
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const address = "58606cc73281c50b3d6eb9a0c19db60f1bd321ff3e896145ab7177755a7e18cb";
const datumHash = "521ae7c96a41ef7b3ff0d0c78e17faf1f5fd024e4cd7ad6d6931896ba37d1f73";
const datum = "9f582082ca817919eb8a2857ba794b0eb85001980ca7f8032e7bed4084277c4d53af781a001e8480ff";
const address = "a943d9e1bba373e1cc9f3ae105d3d4bd54b13e681ac51254e534ec99d779186b";
const datumHash = "288337b1682c4009a4a594186db1fd6ef5b6587399da9312a7b0aaf1ce105aa9";
const datum =
"d8799f581cd4399ffdf2a33c9bd5565d9232278295fc1d4b7ca2bca9f84d04ff5b1a0206cc80581c43647af85d68093da3895ce31d1e8c4aeb20f3c2dfee8b0536d55b215443617264616e6f436c616e6e734d656e32343630581cde0ce548875ed1d37e8892ece3da878f480814691dfb3c1a76c63b9b1832ff";

describe("user interact with contract tab", () => {
beforeEach(() => {
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/spoTabularView/PoolGeneralInformationTest.cy.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
describe("Pool general information ", () => {
it("User go to Staking Lifecycle and input the Pool ID , switch to tabular view then verify the Pool general information ", () => {
const poolId = "pool1mrv06cwwdjnp6zz6y8wq7epav5eywka75r2k2xqy58ez6dge9cf";
const poolId = "pool1g60m45m23f5vta30x5z7e0n2gc02yc4wyz6darfeluy2kgu65fa";
cy.visit("/");
cy.get('[data-testid="menu-button-staking_lifecycle"]').click();
cy.get("input[placeholder]").type(poolId).type("{enter}");
cy.get("span").contains("Deregistration").click();
cy.wait(1000);
cy.get('div>div>button[active="0"]').click();
cy.get('[data-testid="spo.tabularMode"]').click();
cy.get('[data-testid="table-common"]').should("be.visible");
cy.get("div").contains("Pool Size", { matchCase: false }).should("be.visible");
cy.get("div").contains("Status").should("be.visible");
Expand Down
20 changes: 9 additions & 11 deletions cypress/e2e/spoTabularView/SPOTabularViewTest.cy.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
describe("SPO Tabular view", () => {
it("User go to Staking Lifecycle and input the Pool ID, switch to tabular view then verify the Staking Lifecycle Screen", () => {
const poolId = "pool1mrv06cwwdjnp6zz6y8wq7epav5eywka75r2k2xqy58ez6dge9cf"
cy.visit("/");
cy.get('[data-testid="menu-button-staking_lifecycle"]').click();
cy.get('input[placeholder]').type(poolId).type('{enter}');
cy.get('span').contains('Deregistration').click();
cy.get('div>div>button[active="0"]').click();
cy.get('[data-testid="table-common"]').should('be.visible');

});
it("User go to Staking Lifecycle and input the Pool ID, switch to tabular view then verify the Staking Lifecycle Screen", () => {
const poolId = "pool1g60m45m23f5vta30x5z7e0n2gc02yc4wyz6darfeluy2kgu65fa";
cy.visit("/");
cy.get('[data-testid="menu-button-staking_lifecycle"]').click();
cy.get("input[placeholder]").type(poolId).type("{enter}");
cy.get("span").contains("Deregistration").click();
cy.get('[data-testid="spo.tabularMode"]').click();
cy.get('[data-testid="table-common"]').should("be.visible");
});
});
4 changes: 2 additions & 2 deletions cypress/e2e/spoTabularView/TransactionTableTest.cy.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
describe("Transaction table", () => {
it("User go to Staking Lifecycle and input the Pool Id, switch to tabular view then verify the Transaction table", () => {
const poolId = "pool1mrv06cwwdjnp6zz6y8wq7epav5eywka75r2k2xqy58ez6dge9cf";
const poolId = "pool1g60m45m23f5vta30x5z7e0n2gc02yc4wyz6darfeluy2kgu65fa";
cy.visit("/");
cy.get('[data-testid="menu-button-staking_lifecycle"]').click();
cy.get("input[placeholder]").type(poolId).type("{enter}");
cy.get("span").contains("Deregistration").click();
cy.get('div>div>button[active="0"]').click();
cy.get('[data-testid="spo.tabularMode"]').click();
cy.get(".MuiAccordionSummary-content").contains("Registration");
cy.get(".MuiAccordionSummary-content").contains("Pool Update");
cy.get(".MuiAccordionSummary-content").contains("Operator Rewards");
Expand Down
20 changes: 9 additions & 11 deletions cypress/e2e/stakeKeyTabularView/StakeKeyTabularViewTest.cy.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
describe("Stake Key Tabular view", () => {
it("User go to Staking Lifecycle and input the Stake Address, switch to tabular view then verify the Staking Delegation Screen", () => {
const stakeAddr = "stake1u98ujxfgzdm8yh6qsaar54nmmr50484t4ytphxjex3zxh7g4tuwna"
cy.visit("/");
cy.get('[data-testid="menu-button-staking_lifecycle"]').click();
cy.get('input[placeholder]').type(stakeAddr).type('{enter}');
cy.get('span').contains('Deregistration').click();
cy.get('div>div>button[active="0"]').click();
cy.get('[data-testid="table-common"]').should('be.visible');

});
it("User go to Staking Lifecycle and input the Stake Address, switch to tabular view then verify the Staking Delegation Screen", () => {
const stakeAddr = "stake1u98ujxfgzdm8yh6qsaar54nmmr50484t4ytphxjex3zxh7g4tuwna";
cy.visit("/");
cy.get('[data-testid="menu-button-staking_lifecycle"]').click();
cy.get("input[placeholder]").type(stakeAddr).type("{enter}");
cy.get("span").contains("Deregistration").click();
cy.get('[data-testid="delegator.tabularMode"]').click();
cy.get('[data-testid="table-common"]').should("be.visible");
});
});
2 changes: 1 addition & 1 deletion cypress/e2e/stakingLifecycle/DeregistrationListTest.cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe("Deregistration List screen", () => {
it("User go to Staking Lifecycle and input the Pool ID, then verify the Deregistration List Screen", () => {
const poolId = "pool1mrv06cwwdjnp6zz6y8wq7epav5eywka75r2k2xqy58ez6dge9cf";
const poolId = "pool1g60m45m23f5vta30x5z7e0n2gc02yc4wyz6darfeluy2kgu65fa";
cy.visit("/");
cy.get('[data-testid="menu-button-staking_lifecycle"]').click();
cy.get("input[placeholder]").type(poolId).type("{enter}");
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/transactions.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe("transactions spec", () => {
});

it("redirect to correct transaction detail page", () => {
const txHash = "b87b6d4296d43480f4915cdd11a3b97f3fb48e997ea4973b922fec477808bcf6";
const txHash = "90c41c0e968d9c86949a2aecb18decc08da4fa0b4f756d9415b82b09e01fb6c1";
cy.visit("/transactions");
cy.get('[data-testid="transactions-card"]').contains("Transactions");
cy.get('[data-testid="search-bar"]').type(txHash).type("{enter}");
Expand All @@ -24,8 +24,8 @@ describe("transactions spec", () => {
});

it("should navigate to the transaction detail page", () => {
const txHash = "b87b6d4296d43480f4915cdd11a3b97f3fb48e997ea4973b922fec477808bcf6";
cy.visit("/transaction/b87b6d4296d43480f4915cdd11a3b97f3fb48e997ea4973b922fec477808bcf6");
const txHash = "90c41c0e968d9c86949a2aecb18decc08da4fa0b4f756d9415b82b09e01fb6c1";
cy.visit("/transaction/90c41c0e968d9c86949a2aecb18decc08da4fa0b4f756d9415b82b09e01fb6c1");
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");
Expand Down
5 changes: 1 addition & 4 deletions lib/pkg/uplc_js.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,7 @@ async function __wbg_load(module, imports) {
return await WebAssembly.instantiateStreaming(module, imports);
} catch (e) {
if (module.headers.get("Content-Type") != "application/wasm") {
console.warn(
"`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",
e
);
/* empty */
} else {
throw e;
}
Expand Down
Loading

0 comments on commit b0f30de

Please sign in to comment.