Skip to content

Commit

Permalink
Fe e2e handle addr mixed case (#480)
Browse files Browse the repository at this point in the history
  • Loading branch information
MariuszSzpyt authored Aug 29, 2024
1 parent 07b7c6c commit 3d76655
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion test/rollup-test/rollup-main.deposit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe("Gasp UI deposit tests", () => {

driver = await DriverBuilder.getInstance();
acc_addr = await importMetamaskExtension(driver, true);
acc_addr_short = acc_addr.slice(-4).toLowerCase();
acc_addr_short = acc_addr.slice(-4);

await setupPage(driver);
await connectWallet(driver, "MetaMask", acc_addr_short);
Expand Down
4 changes: 3 additions & 1 deletion test/rollup-test/rollup-main.metamask.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
} from "../../utils/frontend/rollup-utils/Handlers";
import { WalletConnectModal } from "../../utils/frontend/rollup-pages/WalletConnectModal";
import { WalletWrapper } from "../../utils/frontend/rollup-pages/WalletWrapper";
import { sleep } from "../../utils/utils";

jest.spyOn(console, "log").mockImplementation(jest.fn());

Expand All @@ -37,7 +38,7 @@ describe("Gasp UI wallet tests", () => {

driver = await DriverBuilder.getInstance();
acc_addr = await importMetamaskExtension(driver);
acc_addr_short = acc_addr.slice(-4).toLowerCase();
acc_addr_short = acc_addr.slice(-4);

await setupPage(driver);
await connectWallet(driver, "MetaMask", acc_addr_short);
Expand All @@ -58,6 +59,7 @@ describe("Gasp UI wallet tests", () => {
expect(isAccInfoDisplayed).toBeTruthy();

await walletModal.disconnect();
await sleep(1000);
const isWalletConnected = await walletWrapper.isWalletConnected();
expect(isWalletConnected).toBeFalsy();
});
Expand Down
4 changes: 3 additions & 1 deletion test/rollup-test/rollup-main.my-positions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { WalletWrapper } from "../../utils/frontend/rollup-pages/WalletWrapper";
import { TransactionType } from "../../utils/frontend/rollup-pages/NotificationToast";
import { Sidebar } from "../../utils/frontend/rollup-pages/Sidebar";
import { MyPositionsPage } from "../../utils/frontend/rollup-pages/MyPositionsPage";
import { sleep } from "../../utils/utils";

jest.spyOn(console, "log").mockImplementation(jest.fn());

Expand All @@ -46,7 +47,7 @@ describe("Gasp UI swap tests", () => {

driver = await DriverBuilder.getInstance();
acc_addr = await importMetamaskExtension(driver, true);
acc_addr_short = acc_addr.slice(-4).toLowerCase();
acc_addr_short = acc_addr.slice(-4);

await setupPage(driver);
await connectWallet(driver, "MetaMask", acc_addr_short);
Expand All @@ -72,6 +73,7 @@ describe("Gasp UI swap tests", () => {

await myPositionsPage.clickSwitchNetwork();
await acceptNetworkSwitchInNewWindow(driver);
await sleep(500);
await myPositionsPage.clickRemoveLiquidity();
await myPositionsPage.clickConfirmFeeAmount();
await waitForActionNotification(driver, TransactionType.RemoveLiquidity);
Expand Down
2 changes: 1 addition & 1 deletion test/rollup-test/rollup-main.swap.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe("Gasp UI swap tests", () => {

driver = await DriverBuilder.getInstance();
acc_addr = await importMetamaskExtension(driver, true);
acc_addr_short = acc_addr.slice(-4).toLowerCase();
acc_addr_short = acc_addr.slice(-4);

await setupPage(driver);
await connectWallet(driver, "MetaMask", acc_addr_short);
Expand Down
2 changes: 1 addition & 1 deletion test/rollup-test/rollup-main.withdraw.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe("Gasp UI withdraw tests", () => {

driver = await DriverBuilder.getInstance();
acc_addr = await importMetamaskExtension(driver, true);
acc_addr_short = acc_addr.slice(-4).toLowerCase();
acc_addr_short = acc_addr.slice(-4);

await setupPage(driver);
await connectWallet(driver, "MetaMask", acc_addr_short);
Expand Down
2 changes: 1 addition & 1 deletion test/rollup-test/rollup-prod.deposit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe("Gasp Prod UI deposit tests", () => {

driver = await DriverBuilder.getInstance();
acc_addr = await importMetamaskExtension(driver, true);
acc_addr_short = acc_addr.slice(-4).toLowerCase();
acc_addr_short = acc_addr.slice(-4);

await setupPage(driver);
await connectWallet(driver, "MetaMask", acc_addr_short);
Expand Down
2 changes: 1 addition & 1 deletion test/rollup-test/rollup-prod.withdraw.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe("Gasp Prod UI withdraw tests", () => {

driver = await DriverBuilder.getInstance();
acc_addr = await importMetamaskExtension(driver, true);
acc_addr_short = acc_addr.slice(-4).toLowerCase();
acc_addr_short = acc_addr.slice(-4);

await setupPage(driver);
await connectWallet(driver, "MetaMask", acc_addr_short);
Expand Down

0 comments on commit 3d76655

Please sign in to comment.