Skip to content

Commit

Permalink
e2e fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fullstackninja864 committed Oct 20, 2023
1 parent 513c790 commit 37864e8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ context("Portfolio - Send - Address Book", () => {
cy.getByTestID("save_address_label").click().wait(1000);
cy.getByTestID("pin_authorize").type("000000").wait(2000);
cy.wait(1000);
cy.getByTestID("address_input_clear_button").click();
cy.getByTestID("address_book_button").click();
cy.getByTestID(`address_row_label_${index}_WHITELISTED`).contains(
labels[index],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ context("Wallet - DEX - disabled pool pairs", () => {
cy.getByTestID("dex_action_button_composite_swap_button_26").should(
"have.css",
"opacity", // using opacity to check enable
"1"
"1",
); // status: true
cy.getByTestID("dex_action_button_composite_swap_button_28").should(
"have.css",
"opacity", // using opacity to check disable
"0.3"
"0.3",
); // status: false
});
});
Expand Down Expand Up @@ -134,7 +134,8 @@ context("Wallet - DEX - Instant/Future Swap - tabs and dropdowns", () => {
});

it("should be able to choose tokens to swap", () => {
cy.getByTestID("composite_swap").click();
cy.wait(1000);
cy.getByTestID("composite_swap").should("exist").click();
cy.wait(5000);
cy.getByTestID("token_select_button_FROM").click();
cy.getByTestID("select_DFI").click().wait(2000);
Expand All @@ -146,18 +147,18 @@ context("Wallet - DEX - Instant/Future Swap - tabs and dropdowns", () => {
cy.getByTestID("switch_button").click();
cy.getByTestID("token_select_button_FROM_display_symbol").should(
"have.text",
"dTU10"
"dTU10",
);
cy.getByTestID("token_select_button_TO_display_symbol").should(
"have.text",
"DFI"
"DFI",
);
});

it("should be able to disable future swap tab if tokenA and tokenB is not a valid future swap pair", () => {
cy.getByTestID("swap_tabs_FUTURE_SWAP").should(
"have.attr",
"aria-disabled"
"aria-disabled",
);

/* Only DUSD <-> Loan tokens are allowed in future swap */
Expand All @@ -167,19 +168,19 @@ context("Wallet - DEX - Instant/Future Swap - tabs and dropdowns", () => {
cy.getByTestID("select_dTU10").click();
cy.getByTestID("swap_tabs_FUTURE_SWAP").should(
"not.have.attr",
"aria-disabled"
"aria-disabled",
);
});

it("should be able to persist tokenA and tokenB when switching tabs", () => {
cy.getByTestID("swap_tabs_FUTURE_SWAP").click();
cy.getByTestID("token_select_button_FROM_display_symbol").should(
"have.text",
"DUSD"
"DUSD",
);
cy.getByTestID("token_select_button_TO_display_symbol").should(
"have.text",
"dTU10"
"dTU10",
);
});

Expand Down

0 comments on commit 37864e8

Please sign in to comment.