diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index b91bb10..7032a75 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -1,12 +1,12 @@ name: Playwright Tests on: push: - branches: [ main, master, feature/trading-v2 ] + branches: [ main, master, feature/nitron-revamp ] pull_request: - branches: [ main, master, feature/trading-v2 ] + branches: [ main, master, feature/nitron-revamp ] jobs: test: - timeout-minutes: 60 + timeout-minutes: 90 runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/pages/HomePage.page.ts b/pages/HomePage.page.ts index 31220b5..53f8126 100644 --- a/pages/HomePage.page.ts +++ b/pages/HomePage.page.ts @@ -1,4 +1,5 @@ import { expect, type Locator, type Page } from '@playwright/test'; +import { AsyncLocalStorage } from 'async_hooks'; export class HomePage{ readonly page: Page; readonly spotHistory; @@ -12,6 +13,7 @@ export class HomePage{ readonly orderBook; readonly orderPrice; readonly carbonTestnet: Locator + readonly demexTestnet: Locator readonly mantle: Locator readonly addressMetaMaskDropBtn: Locator readonly addressPhantomDropBtn: Locator @@ -23,6 +25,8 @@ export class HomePage{ readonly addressDropBtn: Locator readonly firstCopyClipBoardBtn: Locator readonly withdrawnTab: Locator + readonly earnBtn: Locator + readonly lendBorrowMintItem: Locator constructor (page:Page){ this.page=page; @@ -37,6 +41,7 @@ export class HomePage{ this.orderBook=page.locator('xpath=//p[text()="Order Book"]'); this.orderPrice=page.locator('xpath=//p[text()="Order Price"]'); this.carbonTestnet=this.page.getByRole('paragraph').filter({ hasText: 'Carbon Testnet' }) + this.demexTestnet=this.page.getByRole('paragraph').filter({ hasText: 'Demex Testnet' }) //this.carbonTestnet=this.page.getByRole('paragraph').filter({ hasText: 'Carbon Devnet' }) this.mantle=this.page.getByText('Mantle') this.addressMetaMaskDropBtn = this.page.getByRole('img', { name: 'MetaMask' }) @@ -49,6 +54,8 @@ export class HomePage{ this.addressDropBtn = this.page.locator('svg:nth-child(3)').first() this.firstCopyClipBoardBtn=this.page.locator('div[title="Copy to Clipboard"]').first() this.withdrawnTab=this.page.getByRole('button', { name: 'Withdraw', exact: true }) + this.earnBtn = this.page.getByRole('button', { name: 'Earn' }) + this.lendBorrowMintItem = this.page.getByRole('menuitem', { name: 'Lend, Borrow, Mint Lend and' }) } diff --git a/pages/LendBorrowMintPage.ts b/pages/LendBorrowMintPage.ts new file mode 100644 index 0000000..3076e92 --- /dev/null +++ b/pages/LendBorrowMintPage.ts @@ -0,0 +1,100 @@ +import { type Locator, type Page } from '@playwright/test'; + +export class LendBorrowMintPage{ + readonly page: Page; + readonly headersText: Locator + readonly howItWorkBtn: Locator + readonly step1Logo: Locator + readonly step2Logo: Locator + readonly step3Logo: Locator + readonly step4Logo: Locator + readonly learnMoreLink: Locator + readonly xBtn: Locator + readonly yourPositionsItem: Locator + readonly lendingTab: Locator + readonly borrowingTab: Locator + readonly searchTextbox: Locator + readonly usdLendBtn: Locator + readonly usdBorrowBtn: Locator + readonly amountTextbox: Locator + readonly transactionText: Locator + readonly lendBtn: Locator + readonly borrowBtn: Locator + readonly backBtn: Locator + readonly enableModeBtn: Locator + readonly enableBtn: Locator + readonly selectCategoryDropdown: Locator + readonly stablecoinsOption: Locator + readonly thunderIcon: Locator + readonly thunderTooltips: Locator + readonly stableCoinsBtn: Locator + readonly disableEModeBtn: Locator + readonly disableBtn: Locator + readonly viewDetailsBtn: Locator + readonly popupLiquidRiskParamsText: Locator + readonly contentUnderPopupTitle: Locator + readonly healthFactorArea: Locator + readonly currentLTVArea: Locator + readonly xPopupBtn: Locator + readonly eMode: Locator + readonly eModeTooltips: Locator + readonly learnMoreLinkTooltips: Locator + readonly eModeThunderIcon: Locator + + constructor (page:Page){ + this.page=page; + this.headersText = this.page.locator('thead th div') + this.howItWorkBtn = this.page.getByRole('button', { name: 'How it works' }) + this.step1Logo = this.page.getByRole('img', { name: 'step1' }) + this.step2Logo = this.page.getByRole('img', { name: 'step2' }) + this.step3Logo = this.page.getByRole('img', { name: 'step3' }) + this.step4Logo = this.page.getByRole('img', { name: 'step4' }) + this.learnMoreLink = this.page.locator('div').filter({ hasText: /^Learn More$/ }).getByRole('link') + this.xBtn = this.page.locator("div:has-text('How Nitron Works') + button") + this.yourPositionsItem = this.page.locator('div').filter({ hasText: /^Your Positions$/ }).nth(1) + this.lendingTab = this.page.getByRole('button', { name: 'Lending' }) + this.borrowingTab = this.page.getByRole('button', { name: 'Borrowing' }) + this.searchTextbox = this.page.getByRole('textbox', { name: 'Search' }) + this.usdLendBtn = this.page.getByRole('button', { name: 'Lend' }).first() + this.usdBorrowBtn = this.page.getByRole('button', { name: 'Borrow' }).first() + this.amountTextbox = this.page.getByRole('spinbutton') + this.transactionText = this.page.getByText('Transaction Broadcasted') + this.lendBtn = this.page.getByRole('button', { name: 'Lend' }) + this.borrowBtn = this.page.getByRole('button', { name: 'Borrow' }) + this.backBtn = this.page.locator('a').filter({ hasText: 'Back' }) + this.enableModeBtn = this.page.getByRole('button', { name: 'Enable', exact: true }) + this.enableBtn = this.page.getByRole('button', { name: 'Enable', exact: true }) + this.selectCategoryDropdown = this.page.getByText('Select Category') + this.stablecoinsOption = this.page.getByRole('cell', { name: 'Stablecoins' }) + this.thunderIcon = this.page.locator('td:nth-child(9)').first() + this.thunderTooltips = this.page.getByText('Collateralizing this asset boosts borrowing power in your current E-Mode category.') + this.stableCoinsBtn = this.page.getByRole('button', { name: 'Stablecoins' }) + this.disableEModeBtn = this.page.getByLabel('', { exact: true }).first() + this.disableBtn = this.page.getByRole('button', { name: 'Disable' }) + this.viewDetailsBtn = this.page.locator('a').filter({ hasText: 'View Details' }) + this.popupLiquidRiskParamsText = this.page.getByText('Liquidation Risk Parameters') + this.contentUnderPopupTitle = this.page.getByText('Your health factor and loan-to-value determines the assurance of your collateral. Add more collateral or return borrowed assets to avoid liquidation.') + this.healthFactorArea = this.page.getByRole('paragraph').filter({ hasText: 'Health Factor' }) + this.currentLTVArea = this.page.getByText('Current LTV') + this.xPopupBtn = this.page.getByRole('button') + this.eMode = this.page.getByText('E-Mode', { exact: true }) + this.eModeTooltips = this.page.getByText('Efficiency Mode (E-Mode) increases your LTV for a selected category of assets.') + this.learnMoreLinkTooltips = this.page.locator('a[href*="introduction/efficiency-mode"]') + this.eModeThunderIcon = this.page.locator('div').filter({ hasText: /^E-Mode$/ }).locator('svg') + } + + async getLendApyColumnValues() { + const columnValues = await this.page.$$eval('tbody tr', rows => { + return rows.map(row => { + const lendApyCell = row.querySelectorAll('td')[3] + const value = lendApyCell ? lendApyCell.innerText.trim() : null + if (value) { + const number = parseFloat(value.replace('%', '').trim()) + return !isNaN(number) ? number : null + } + return null + }).filter(value => value !== null) + }) + return columnValues + } +} \ No newline at end of file diff --git a/pages/TradeTradePage.page.ts b/pages/TradeTradePage.page.ts index 9bd402b..81299df 100644 --- a/pages/TradeTradePage.page.ts +++ b/pages/TradeTradePage.page.ts @@ -43,7 +43,8 @@ export class TradeTradePage{ this.marketBtn = this.page.getByRole('button', { name: 'Market', exact: true }) this.tradeExecutedPopup = this.page.getByText('Trade Executed', { exact: true }) this.priceOrderTextBox = this.page.locator('form div').filter({ hasText: 'MidUSD' }).nth(2) - this.priceForm = this.page.locator('#priceFormField') + //this.priceForm = this.page.locator('#priceFormField') + this.priceForm = this.page.getByRole('spinbutton').first() } async goToTradePage(){ diff --git a/playwright.config.ts b/playwright.config.ts index 9ec0643..0227b69 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -12,7 +12,7 @@ import { defineConfig, devices } from '@playwright/test'; * See https://playwright.dev/docs/test-configuration. */ export default defineConfig({ - testDir: './tests', + testDir: './tests/NitronRevamp', testMatch: '**/*.spec.ts', timeout: 60_000, /* Run tests in files in parallel */ diff --git a/tests/NitronRevamp/NitronOnKeplrByEK.spec.ts b/tests/NitronRevamp/NitronOnKeplrByEK.spec.ts new file mode 100644 index 0000000..f5d4f1e --- /dev/null +++ b/tests/NitronRevamp/NitronOnKeplrByEK.spec.ts @@ -0,0 +1,281 @@ +import { test, expect, Page, BrowserContext, chromium } from '@playwright/test' +import { HomePage } from '../../pages/HomePage.page'; +import { TradeTradePage } from '../../pages/TradeTradePage.page'; +import { ConnectWalletPage } from '../../pages/ConnectWalletPage'; +import { EncryptedKeyPage } from '../../pages/EncryptedKeyPage'; +import { LendBorrowMintPage } from '../../pages/LendBorrowMintPage'; + +let page: Page +let browserContext: BrowserContext +const encryptedKeplrKey = "ATkNagk48TArQzAvyB7FfqThoLq2NuXu1naRDqqJCN44hEEKULwJCGj2dHyepgMX1C3yUmknktxw3pJe1Z41zWpbE6SUfHhXvyeptoSgiRBPNpNqgKmmA824QFpP3XURoTDszYYL5MRWs1zoWZnHDjfvWJmTUtxdWBRqTfdiLYcipPKQYzRg1jdqXoAqpt51zydX6TfCTnfxBt61SFxsEgbgbb16w1puk9mGfFiysr9R3PystkTja6sX8AbNW9tMMALKQGHtuCjJCmjuBw9RZTfd4XnSmn1tHYEqTbKaBq6oRLJwyzVnyiqmAcmn2Pg7S2aUvWqwpyYe7KyqAQXVQY7vTjN8JtBBihA4TyWUYGhNimtWYw" +const passworld = 'Abc12345789' + +test.beforeAll('Launch browser context with permission', async () => { + test.setTimeout(120_000) + const browser = await chromium.launch() + browserContext = await browser.newContext() + page = await browserContext.newPage() + + const homePage = new HomePage(page) + await homePage.goToHomePage() + expect(homePage.spotHistory).toBeTruthy(); + //await homePage.demexTestnet.click(); + //await homePage.mantle.click() + await page.waitForTimeout(10_000) + + const tradePage = new TradeTradePage(page); + await tradePage.headerConnectWallet.click(); + + const connectWalletPage = new ConnectWalletPage(page) + await connectWalletPage.selectWallet.isVisible() + + await connectWalletPage.encryptedKeyBtn.click({ delay: 2000 }) + const encryptedKeyPage = new EncryptedKeyPage(page) + + await encryptedKeyPage.encryptedKeyTextbox.waitFor({ state: 'visible' }) + await encryptedKeyPage.encryptedKeyTextbox.click() + await encryptedKeyPage.encryptedKeyTextbox.fill(encryptedKeplrKey) + await encryptedKeyPage.encryptedKeyTextbox.press('Tab') + await encryptedKeyPage.passwordTextbox.fill(passworld) + await encryptedKeyPage.passwordTextbox.press('Tab') + await encryptedKeyPage.connectBtn.waitFor({ state: 'visible' }) + await encryptedKeyPage.connectBtn.click({ delay: 2000 }) + await encryptedKeyPage.connectBtn.waitFor({ state: 'detached' }) + await homePage.addressDropBtn.waitFor({ state: 'visible' }) + + await homePage.earnBtn.click() + await homePage.lendBorrowMintItem.click() +}) + +test.describe('Nitron on Keplr by Encrypted Key', () => { + test('TC_NITRON_02: Check the colums in the "All Markets" table', async () => { + const lendBorrowMintPage = new LendBorrowMintPage(page) + + const expectedHeaders = [ + 'Asset', + 'Total Lent', + 'Lend APY', + 'Available to Borrow', + 'Borrow APY', + 'In Wallet' + ] + + await page.waitForTimeout(3000) + const headers = await lendBorrowMintPage.headersText.allInnerTexts() + + const actualHeaders: string[] = [] + for (const header of headers) { + if (header.trim() !== '') { + actualHeaders.push(header.trim()) + } + } + expect(actualHeaders).toEqual(expectedHeaders) + + }) + + test('TC_NITRON_05: Check the link "How it Works"', async () => { + await page.reload() + await page.waitForLoadState() + + const lendBorrowMintPage = new LendBorrowMintPage(page) + await lendBorrowMintPage.howItWorkBtn.click() + await lendBorrowMintPage.xBtn.waitFor({ state: 'visible' }) + await expect(lendBorrowMintPage.xBtn).toBeVisible() + + await lendBorrowMintPage.xBtn.click() + await expect(lendBorrowMintPage.xBtn).not.toBeVisible() + + }) + + test('TC_NITRON_06: Chek the components of the "Hown it Works" drop down', async () => { + await page.reload() + await page.waitForLoadState() + + const lendBorrowMintPage = new LendBorrowMintPage(page) + await lendBorrowMintPage.howItWorkBtn.click() + + await expect(lendBorrowMintPage.step1Logo).toBeVisible() + await expect(lendBorrowMintPage.step2Logo).toBeVisible() + await expect(lendBorrowMintPage.step3Logo).toBeVisible() + await expect(lendBorrowMintPage.step4Logo).toBeVisible() + await expect(lendBorrowMintPage.learnMoreLink).toBeVisible() + + }) + + test('TC_DEMEX_NITRON_1: Access Nitron; test borrowing and lending with assets', async () => { + await page.reload() + await page.waitForLoadState() + + const lendBorrowMintPage = new LendBorrowMintPage(page) + await lendBorrowMintPage.searchTextbox.fill('USD') + await lendBorrowMintPage.usdLendBtn.click({delay: 1000}) + await lendBorrowMintPage.amountTextbox.fill('1') + await lendBorrowMintPage.lendBtn.click() + await expect(lendBorrowMintPage.transactionText).toBeVisible() + + await page.reload() + await lendBorrowMintPage.backBtn.click() + await lendBorrowMintPage.searchTextbox.fill('USD') + await lendBorrowMintPage.usdBorrowBtn.click({delay: 1000}) + await lendBorrowMintPage.amountTextbox.fill('1') + await lendBorrowMintPage.borrowBtn.click() + await expect(lendBorrowMintPage.transactionText).toBeVisible() + await page.reload() + await lendBorrowMintPage.backBtn.click() + + }) + + test('TC_NITRON_12: Verify that the filter all E-Mode related assets to top of page sort by Lend APY', async () => { + await page.reload() + await page.waitForLoadState() + const lendBorrowMintPage = new LendBorrowMintPage(page) + await expect(lendBorrowMintPage.eMode).toBeVisible() + + await page.waitForSelector('table') + await lendBorrowMintPage.usdLendBtn.waitFor({state: 'visible'}) + + const lendApyValues = await lendBorrowMintPage.getLendApyColumnValues() + const sortedLendAPYValues = [...lendApyValues].sort((a, b) => b - a) + expect(lendApyValues).toEqual(sortedLendAPYValues) + + }) + + test('TC_NITRON_13: Check the tooltip of the record collaterallizing the asset boosts on E-mode', async () => { + await page.reload() + await page.waitForLoadState() + + const lendBorrowMintPage = new LendBorrowMintPage(page) + await lendBorrowMintPage.usdLendBtn.waitFor({state: 'visible'}) + await lendBorrowMintPage.enableModeBtn.click() + await lendBorrowMintPage.selectCategoryDropdown.click() + await lendBorrowMintPage.stablecoinsOption.click() + await lendBorrowMintPage.enableBtn.click() + + await lendBorrowMintPage.backBtn.click() + await lendBorrowMintPage.searchTextbox.fill('USD') + await lendBorrowMintPage.thunderIcon.click() + await expect(lendBorrowMintPage.thunderTooltips).toBeVisible() + + await page.reload() + await lendBorrowMintPage.stableCoinsBtn.click() + await lendBorrowMintPage.disableEModeBtn.check() + await lendBorrowMintPage.disableBtn.click() + await lendBorrowMintPage.backBtn.click() + }) + + test('TC_NITRON_15: Verify that the Lending and Borrowing pages are separated into different pages', async () => { + await page.reload() + await page.waitForLoadState() + + const lendBorrowMintPage = new LendBorrowMintPage(page) + await lendBorrowMintPage.yourPositionsItem.click() + await lendBorrowMintPage.lendingTab.click() + + const expectedLendingHeaders = [ + 'Asset', + 'Amount', + 'Collateral', + 'Lend APY' + ] + + await page.waitForTimeout(3000) + const lendingHeaders = await lendBorrowMintPage.headersText.allInnerTexts() + + const actualLendingHeaders: string[] = [] + for (const header of lendingHeaders) { + if (header.trim() !== '') { + actualLendingHeaders.push(header.trim()) + } + } + expect(actualLendingHeaders).toEqual(expectedLendingHeaders) + + await lendBorrowMintPage.borrowingTab.click() + const expectedBorrowingHeaders = [ + 'Asset', + 'Debt', + 'Borrow APY', + 'Available to Borrow' + ] + + await page.waitForTimeout(3000) + const borrowingHeaders = await lendBorrowMintPage.headersText.allInnerTexts() + + const actualBorrowingHeaders: string[] = [] + for (const header of borrowingHeaders) { + if (header.trim() !== '') { + actualBorrowingHeaders.push(header.trim()) + } + } + expect(actualBorrowingHeaders).toEqual(expectedBorrowingHeaders) + }) + + test('TC_NITRON_21: Verify that the Liquidation Risk Parameters pop-up will be displayed when clicking on the "View Details" of the Health Factor', async () => { + await page.reload() + await page.waitForLoadState() + + const lendBorrowMintPage = new LendBorrowMintPage(page) + await lendBorrowMintPage.yourPositionsItem.click() + + await lendBorrowMintPage.viewDetailsBtn.click() + await expect(lendBorrowMintPage.popupLiquidRiskParamsText).toBeVisible() + await expect(lendBorrowMintPage.contentUnderPopupTitle).toBeVisible() + await expect(lendBorrowMintPage.healthFactorArea).toBeVisible() + await expect(lendBorrowMintPage.currentLTVArea).toBeVisible() + await lendBorrowMintPage.xPopupBtn.click() + + }) + + test('TC_NITRON_24: Check that the E-Mode is on the Lending page', async () => { + await page.reload() + await page.waitForLoadState() + + const lendBorrowMintPage = new LendBorrowMintPage(page) + await lendBorrowMintPage.usdLendBtn.waitFor({state: 'visible'}) + await lendBorrowMintPage.enableModeBtn.click() + await lendBorrowMintPage.selectCategoryDropdown.click() + await lendBorrowMintPage.stablecoinsOption.click() + await lendBorrowMintPage.enableBtn.click() + await lendBorrowMintPage.backBtn.click() + + await lendBorrowMintPage.yourPositionsItem.click() + await lendBorrowMintPage.lendingTab.click() + await expect(lendBorrowMintPage.eMode).toBeVisible() + await expect(lendBorrowMintPage.eModeThunderIcon).toBeVisible() + + await page.reload() + await lendBorrowMintPage.stableCoinsBtn.click() + await lendBorrowMintPage.disableEModeBtn.check() + await lendBorrowMintPage.disableBtn.click() + await lendBorrowMintPage.backBtn.click() + + }) + + test('TC_NITRON_26: Check the tooltip of the E-mode', async () => { + await page.reload() + await page.waitForLoadState() + + const lendBorrowMintPage = new LendBorrowMintPage(page) + await lendBorrowMintPage.usdLendBtn.waitFor({state: 'visible'}) + await lendBorrowMintPage.enableModeBtn.click() + await lendBorrowMintPage.selectCategoryDropdown.click() + await lendBorrowMintPage.stablecoinsOption.click() + await lendBorrowMintPage.enableBtn.click() + await lendBorrowMintPage.backBtn.click() + + await lendBorrowMintPage.yourPositionsItem.click() + await lendBorrowMintPage.borrowingTab.click() + await page.pause() + + await lendBorrowMintPage.eMode.hover() + await expect(lendBorrowMintPage.eModeTooltips).toBeVisible() + await expect(lendBorrowMintPage.learnMoreLinkTooltips).toBeVisible() + + await page.reload() + await lendBorrowMintPage.stableCoinsBtn.click() + await lendBorrowMintPage.disableEModeBtn.check() + await lendBorrowMintPage.disableBtn.click() + await lendBorrowMintPage.backBtn.click() + + }) + +}) \ No newline at end of file diff --git a/tests/TradingToken/TradingOnKeplrByEK.spec.ts b/tests/TradingToken/TradingOnKeplrByEK.spec.ts index 561a7e2..30082d5 100644 --- a/tests/TradingToken/TradingOnKeplrByEK.spec.ts +++ b/tests/TradingToken/TradingOnKeplrByEK.spec.ts @@ -63,8 +63,8 @@ test.describe('Trading on Keplr by Encrypted Key', () => { const tradePage = new TradeTradePage(page) await tradePage.buyBtn.waitFor({state: 'visible'}) await tradePage.priceForm.clear() - await tradePage.priceForm.fill('0.01') - await tradePage.amountToken.fill('1000') + await tradePage.priceForm.fill('0.1') + await tradePage.amountToken.fill('10000') await tradePage.buyBtn.click() await tradePage.confirmBtn.click() diff --git a/tests/TradingToken/TradingOnLeapByEK.spec.ts b/tests/TradingToken/TradingOnLeapByEK.spec.ts index 5305bb7..dc502db 100644 --- a/tests/TradingToken/TradingOnLeapByEK.spec.ts +++ b/tests/TradingToken/TradingOnLeapByEK.spec.ts @@ -65,8 +65,8 @@ test.describe('Trading on Leap by Encrypted Key', () => { const tradePage = new TradeTradePage(page) await tradePage.buyBtn.waitFor({state: 'visible'}) await tradePage.priceForm.clear() - await tradePage.priceForm.fill('0.01') - await tradePage.amountToken.fill('1000') + await tradePage.priceForm.fill('0.1') + await tradePage.amountToken.fill('10000') await tradePage.buyBtn.click() await tradePage.confirmBtn.click() diff --git a/tests/TradingToken/TradingOnMetaMaskByEK.spec.ts b/tests/TradingToken/TradingOnMetaMaskByEK.spec.ts index 7f5677a..4a188d2 100644 --- a/tests/TradingToken/TradingOnMetaMaskByEK.spec.ts +++ b/tests/TradingToken/TradingOnMetaMaskByEK.spec.ts @@ -63,8 +63,8 @@ test.describe('Trading on MetaMask by Encrypted Key', () => { const tradePage = new TradeTradePage(page) await tradePage.buyBtn.waitFor({state: 'visible'}) await tradePage.priceForm.clear() - await tradePage.priceForm.fill('0.01') - await tradePage.amountToken.fill('1000') + await tradePage.priceForm.fill('0.1') + await tradePage.amountToken.fill('10000') await tradePage.buyBtn.click() await tradePage.confirmBtn.click() diff --git a/tests/TradingToken/TradingOnPhantom.spec.ts b/tests/TradingToken/TradingOnPhantom.spec.ts index 114ab8e..4af1ba9 100644 --- a/tests/TradingToken/TradingOnPhantom.spec.ts +++ b/tests/TradingToken/TradingOnPhantom.spec.ts @@ -99,9 +99,10 @@ test.describe(' Trading Token with Phantom wallet ', () => { await page.waitForLoadState() const tradePage = new TradeTradePage(page) await tradePage.buyBtn.waitFor({state: 'visible'}) + //await page.pause() await tradePage.priceForm.clear() - await tradePage.priceForm.fill('0.01') - await tradePage.amountToken.fill('1000') + await tradePage.priceForm.fill('0.1') + await tradePage.amountToken.fill('10000') await tradePage.buyBtn.click() const [newPage2] = await Promise.all([ @@ -186,7 +187,7 @@ test.describe(' Trading Token with Phantom wallet ', () => { const tradePage = new TradeTradePage(page) await tradePage.marketBtn.click() await tradePage.buyBtn.waitFor({ state: 'visible' }) - await tradePage.amountOnMarket.fill('1000') + await tradePage.amountOnMarket.fill('3000') await tradePage.buyBtn.click() const [newPage2] = await Promise.all([