Skip to content

Commit

Permalink
the flow for the tests(transfer and withdraw) has changed
Browse files Browse the repository at this point in the history
  • Loading branch information
vadimnikonov1 committed Jan 22, 2024
1 parent 7c05cd8 commit 89fb9bf
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
20 changes: 10 additions & 10 deletions e2e-ci-cd/__tests__/goerli_eth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ test.beforeEach(async ({metamask, zkAccount}) => {
await OperationsWithToken.SelectGoerliNetwork()
await OperationsWithToken.SelectETHGoerli()
await OperationsWithToken.SelectWETHToken()
await OperationsWithToken.InputAmount()
await OperationsWithToken.InputETHAmount()
await OperationsWithToken.button_Deposit()
await OperationsWithToken.TheCheckingTheDepositSent()
});
Expand All @@ -42,10 +42,10 @@ test.beforeEach(async ({metamask, zkAccount}) => {
await OperationsWithToken.CheckTransfer()
});

test('Withdraw ETH', async ({ OperationsWithToken }) => {
test.only('Withdraw ETH', async ({ OperationsWithToken }) => {
await OperationsWithToken.GoToWithdrawTab()
await OperationsWithToken.SelectSepoliaNetwork()
await OperationsWithToken.SelectBOBSepolia()
await OperationsWithToken.SelectGoerliNetwork()
await OperationsWithToken.SelectETHGoerli()
await OperationsWithToken.InputAmountWithdrawTab()
await OperationsWithToken.EnterWeb3WalletAddress(WEB3_WALLET_ADDRESS)
await OperationsWithToken.button_Withdraw()
Expand Down Expand Up @@ -78,8 +78,8 @@ test.beforeEach(async ({metamask, zkAccount}) => {

test('Withdraw USDC', async ({ OperationsWithToken }) => {
await OperationsWithToken.GoToWithdrawTab()
await OperationsWithToken.SelectSepoliaNetwork()
await OperationsWithToken.SelectBOBSepolia()
await OperationsWithToken.SelectGoerliNetwork()
await OperationsWithToken.SelectUSDCGoerli()
await OperationsWithToken.InputAmountWithdrawTab()
await OperationsWithToken.EnterWeb3WalletAddress(WEB3_WALLET_ADDRESS)
await OperationsWithToken.button_Withdraw()
Expand All @@ -89,7 +89,7 @@ test.beforeEach(async ({metamask, zkAccount}) => {
});

test.describe('USDM pool', () => {
test('Deposit USDM', async ({ OperationsWithToken }) => {
test.only('Deposit USDM', async ({ OperationsWithToken }) => {
await OperationsWithToken.GoToDepositTab()
await OperationsWithToken.SelectGoerliNetwork()
await OperationsWithToken.SelectUSDMGoerli()
Expand All @@ -109,10 +109,10 @@ test.beforeEach(async ({metamask, zkAccount}) => {
await OperationsWithToken.CheckTransfer()
});

test('Withdraw USDM', async ({ OperationsWithToken }) => {
test.only('Withdraw USDM', async ({ OperationsWithToken }) => {
await OperationsWithToken.GoToWithdrawTab()
await OperationsWithToken.SelectSepoliaNetwork()
await OperationsWithToken.SelectBOBSepolia()
await OperationsWithToken.SelectGoerliNetwork()
await OperationsWithToken.SelectUSDMGoerli()
await OperationsWithToken.InputAmountWithdrawTab()
await OperationsWithToken.EnterWeb3WalletAddress(WEB3_WALLET_ADDRESS)
await OperationsWithToken.button_Withdraw()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,19 @@ export default class OperationsWithTokenPages extends BasePage{
}

async SelectUSDMGoerli():Promise<void> {
await this.locator('//div[@id="root"]/div[3]/div[1]/div[2]/div[1]').click();
await this.locator('//button[@data-ga-id="pool-bob2usdc-goerli"]').click();
await this.sleep(TIMEOUTS.medium);
}

async SelectUSDCGoerli():Promise<void> {
await this.locator('//div[@id="root"]/div[3]/div[1]/div[2]/div[1]').click();
await this.locator('//button[@data-ga-id="pool-usdc-goerli"]').click();
await this.sleep(TIMEOUTS.medium);
}

async SelectETHGoerli():Promise<void> {
await this.locator('//div[@id="root"]/div[3]/div[1]/div[2]/div[1]').click();
await this.locator('//button[@data-ga-id="pool-weth-goerli"]').click();
await this.sleep(TIMEOUTS.medium);
}
Expand Down Expand Up @@ -131,6 +134,11 @@ export default class OperationsWithTokenPages extends BasePage{
await this.locator(OperationsWithTokenElementsLocators.input_amount_in_deposit_tab).type('1', {delay: 100});
}

async InputETHAmount():Promise<void> {
await expect(this.locator('//button[text()="Enter amount"]')).toBeVisible({timeout: TIMEOUTS.fiveMinutes});
await this.locator(OperationsWithTokenElementsLocators.input_amount_in_deposit_tab).type('0.001', {delay: 100});
}

async InputAmountTransferTab():Promise<void> {
await expect(this.locator('//button[text()="Enter amount"]')).toBeVisible({timeout: TIMEOUTS.oneMinute});
await this.locator(OperationsWithTokenElementsLocators.input_amount_in_transfer_tab ).type('1', {delay: 100});
Expand Down

0 comments on commit 89fb9bf

Please sign in to comment.