Skip to content

Commit

Permalink
fix(e2e): network details
Browse files Browse the repository at this point in the history
  • Loading branch information
chloezxyy committed Sep 6, 2023
1 parent 5c49c0b commit 82bd548
Showing 1 changed file with 14 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ context("Wallet - Network detail screen - outside wallet context", () => {
cy.getByTestID(`button_network_${network}_check`).should(
"have.css",
"color",
statusBgColor
statusBgColor,
);
});
});
Expand All @@ -55,7 +55,7 @@ context("Wallet - Network detail screen - outside wallet context", () => {
cy.getByTestID(`button_network_${network}_check`).should(
"have.css",
"color",
statusBgColor
statusBgColor,
);
cy.go("back");
cy.url().should("include", "wallet/onboarding/guidelines");
Expand All @@ -78,13 +78,13 @@ context("Wallet - Network detail screen - outside wallet context", () => {
.filter(":visible")
.click();
cy.getByTestID(`button_network_${network}_uncheck`).should(
"exist"
"exist",
);
cy.getByTestID(
`button_network_${updatedNetwork}_check`
`button_network_${updatedNetwork}_check`,
).should("exist");
cy.getByTestID(
`button_network_${updatedNetwork}_check`
`button_network_${updatedNetwork}_check`,
).should("have.css", "color", updatedStatusBgColor);
});
});
Expand Down Expand Up @@ -161,7 +161,7 @@ context("Wallet - Network detail screen - outside wallet context", () => {
cy.getByTestID(`button_network_${network}_check`).should(
"have.css",
"color",
statusBgColor
statusBgColor,
);
cy.getByTestID("network_details_block_height")
.should("exist")
Expand All @@ -177,7 +177,9 @@ context("Wallet - Network detail screen - outside wallet context", () => {
.invoke("text")
.then((updatedLastSync) => {
expect(
dayjs(lastSuccessfulSync).isBefore(dayjs(updatedLastSync))
dayjs(lastSuccessfulSync).isBefore(
dayjs(updatedLastSync),
),
).to.be.eq(true);
});
});
Expand Down Expand Up @@ -208,7 +210,7 @@ context("Wallet - Network detail screen - with wallet context", () => {
cy.getByTestID(`button_network_${network}_check`).should(
"have.css",
"color",
"rgb(0, 173, 29)"
"rgb(0, 173, 29)",
);
});
});
Expand All @@ -231,7 +233,7 @@ context("Wallet - Network detail screen - with wallet context", () => {
cy.getByTestID(`button_network_${network}_check`).should(
"have.css",
"color",
statusBgColor
statusBgColor,
);
cy.getByTestID("button_network_Playground").click();
cy.exitWallet();
Expand All @@ -254,7 +256,7 @@ context("Wallet - Network detail screen - with wallet context", () => {
.should("exist")
.contains(updatedNetwork);
cy.getByTestID(
`button_network_${updatedNetwork}_check`
`button_network_${updatedNetwork}_check`,
).should("have.css", "color", updatedStatusBgColor);
});
});
Expand All @@ -266,6 +268,7 @@ context("Wallet - Network detail screen - with wallet context", () => {
cy.getByTestID("bottom_tab_portfolio").click();
cy.getByTestID("header_settings").click().wait(3000);
cy.getByTestID("header_network_icon").filter(":visible").click();
cy.getByTestID("block_detail_explorer_url").scrollIntoView();
cy.getByTestID("block_detail_explorer_url")
.invoke("text")
.then(() => {
Expand Down Expand Up @@ -333,5 +336,5 @@ context(
cy.go("back");
cy.url().should("include", "app/Settings");
});
}
},
);

0 comments on commit 82bd548

Please sign in to comment.