Skip to content

Commit

Permalink
Fe prod checks update (#519)
Browse files Browse the repository at this point in the history
  • Loading branch information
MariuszSzpyt authored Oct 25, 2024
1 parent 0b94ca6 commit 5746ba7
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 34 deletions.
33 changes: 15 additions & 18 deletions .github/workflows/gasp-prod-smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ jobs:
--args "-timeout 300s" --browsers 'chrome:119.0;chrome:129.0'
- uses: actions/checkout@v3
with:
ref: ci/prod-tests-old-temp-1

- uses: actions/setup-node@v3
with:
node-version: 18
Expand Down Expand Up @@ -178,18 +175,18 @@ jobs:
testmo report: https://mangata-finance.testmo.net/automation/runs/view/${{needs.setup-report.outputs.testmo-run-id}}"
GITHUB_REF: "https://mangata-finance.github.io/mangata-e2e/${{ github.run_number }}"

slack-notify-nook:
needs: [e2e-tm]
if: failure()
runs-on: ubuntu-latest

steps:
- name: Slack Notification - Error
uses: bryannice/[email protected]
env:
SLACK_INCOMING_WEBHOOK: ${{ secrets.STG_SLACK_WEBHOOK }}
SLACK_TITLE: "PROD GASP smoke UI tests - results - NOOK"
SLACK_COLOR: "#ff0011"
SLACK_MESSAGE: "Test failures [ ${{ env.TEST_SCRIPT }} ]
testmo report: https://mangata-finance.testmo.net/automation/runs/view/${{needs.setup-report.outputs.testmo-run-id}}"
GITHUB_REF: "https://mangata-finance.github.io/mangata-e2e/${{ github.run_number }}"
# slack-notify-nook:
# needs: [e2e-tm]
# if: failure()
# runs-on: ubuntu-latest

# steps:
# - name: Slack Notification - Error
# uses: bryannice/[email protected]
# env:
# SLACK_INCOMING_WEBHOOK: ${{ secrets.STG_SLACK_WEBHOOK }}
# SLACK_TITLE: "PROD GASP smoke UI tests - results - NOOK"
# SLACK_COLOR: "#ff0011"
# SLACK_MESSAGE: "Test failures [ ${{ env.TEST_SCRIPT }} ]
# testmo report: https://mangata-finance.testmo.net/automation/runs/view/${{needs.setup-report.outputs.testmo-run-id}}"
# GITHUB_REF: "https://mangata-finance.github.io/mangata-e2e/${{ github.run_number }}"
10 changes: 5 additions & 5 deletions 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);
acc_addr_short = acc_addr.slice(-4).toUpperCase();

await setupPage(driver);
await connectWallet(driver, "MetaMask", acc_addr_short, true);
Expand Down Expand Up @@ -82,11 +82,11 @@ describe("Gasp Prod UI deposit tests", () => {
expect(isOriginFeeDisplayed).toBeTruthy();

// Skip until we have same behaviour on dev and prod
// const isNetworkButtonEnabled = await depositModal.isNetworkButtonEnabled();
// expect(isNetworkButtonEnabled).toBeTruthy();
const isNetworkButtonEnabled = await depositModal.isNetworkButtonEnabled();
expect(isNetworkButtonEnabled).toBeTruthy();

// await depositModal.clickDepositButtonByText(DepositActionType.Network);
// await acceptNetworkSwitchInNewWindow(driver);
await depositModal.clickDepositButtonByText(DepositActionType.Network);
await acceptNetworkSwitchInNewWindow(driver);

// await depositModal.clickDepositButtonByText(DepositActionType.Approve);
// await waitForActionNotification(driver, TransactionType.ApproveContract);
Expand Down
11 changes: 6 additions & 5 deletions test/rollup-test/rollup-prod.withdraw.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { WebDriver } from "selenium-webdriver";
import { getApi, initApi } from "../../utils/api";
import { DriverBuilder } from "../../utils/frontend/utils/Driver";
import {
acceptNetworkSwitchInNewWindow,
addExtraLogs,
importMetamaskExtension,
uiStringToNumber,
Expand Down Expand Up @@ -50,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);
acc_addr_short = acc_addr.slice(-4).toUpperCase();

await setupPage(driver);
await connectWallet(driver, "MetaMask", acc_addr_short, true);
Expand Down Expand Up @@ -94,11 +95,11 @@ describe("Gasp Prod UI withdraw tests", () => {
expect(isOriginFeeDisplayed).toBeTruthy();

// Skip until we have same behaviour on dev and prod
// const isNetworkButtonEnabled = await withdrawModal.isNetworkButtonEnabled();
// expect(isNetworkButtonEnabled).toBeTruthy();
const isNetworkButtonEnabled = await withdrawModal.isNetworkButtonEnabled();
expect(isNetworkButtonEnabled).toBeTruthy();

// await withdrawModal.clickWithdrawButtonByText(WithdrawActionType.Network);
// await acceptNetworkSwitchInNewWindow(driver);
await withdrawModal.clickWithdrawButtonByText(WithdrawActionType.Network);
await acceptNetworkSwitchInNewWindow(driver);

await withdrawModal.clickWithdrawButtonByText(WithdrawActionType.Withdraw);
await waitForActionNotification(driver, TransactionType.Withdraw);
Expand Down
1 change: 0 additions & 1 deletion utils/frontend/pages/MetaMask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,6 @@ export class MetaMask {
private static async signDeposit(driver: WebDriver) {
const XPATH_SCROLL_DOWN = "//*[@aria-label='Scroll down']";

await waitForElement(driver, XPATH_SCROLL_DOWN, 5000);
if (await isDisplayed(driver, XPATH_SCROLL_DOWN)) {
await clickElement(driver, XPATH_SCROLL_DOWN);
}
Expand Down
7 changes: 2 additions & 5 deletions utils/frontend/rollup-utils/Handlers.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import { WebDriver } from "selenium-webdriver";
import { ApiContext } from "../../Framework/XcmHelper";
import { Polkadot } from "../pages/Polkadot";
import {
acceptNetworkSwitchInNewWindow,
acceptPermissionsWalletExtensionInNewWindow,
} from "../utils/Helper";
import { acceptPermissionsWalletExtensionInNewWindow } from "../utils/Helper";
import { BN_TEN } from "@mangata-finance/sdk";
import { BN } from "@polkadot/util";
import { Main } from "../rollup-pages/Main";
Expand Down Expand Up @@ -42,7 +39,7 @@ export async function connectWallet(

await acceptPermissionsWalletExtensionInNewWindow(driver, walletType);
if (prod) {
await acceptNetworkSwitchInNewWindow(driver);
// await acceptNetworkSwitchInNewWindow(driver);
}

await walletConnectModal.waitForaccountsDisplayed();
Expand Down

0 comments on commit 5746ba7

Please sign in to comment.