Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] CFD update position error #1299

Open
RexBearIU opened this issue Oct 3, 2023 · 7 comments
Open

[BUG] CFD update position error #1299

RexBearIU opened this issue Oct 3, 2023 · 7 comments
Assignees
Labels
5 hard level 5 bug Something isn't working

Comments

@RexBearIU
Copy link
Contributor

  • Environment Description

    • Machine: MacBook Pro (13-inch, 2017, Two Thunderbolt 3 ports)
    • OS version: macOS Ventura 13.5.2(22G91)
    • Browser version: Chromium 117.0.5938.62 (開發人員版本) (x86_64)
  • How to reproduce
    Use Playwright to do the automation test

  • Current Result
    截圖 2023-10-03 下午3 22 01

  • Expect Result
    Successful update

@RexBearIU RexBearIU added bug Something isn't working 2 hard level 2 labels Oct 3, 2023
@RexBearIU
Copy link
Contributor Author

It is highly likely that it is related to #1306

@RexBearIU
Copy link
Contributor Author

Sorry it is not related to #1306, It is a metamask addresses error.

@arealclimber
Copy link
Member

arealclimber commented Oct 16, 2023

image
image

@arealclimber
Copy link
Member

@RexBearIU 根據 PR #1302 新的更新倉位視窗排版調整選取路徑後,重新執行測試 npx playwright test -g "6. 點擊其中一個持倉, 設定止盈點與止損點後,點擊更新持倉。" --trace on --retries=1 測試結果紀錄於 更新持倉 Playwright b622c38d742f44a28cb7abf30d162993.pdf,英文版失敗,簡體中文第二次成功更新倉位,繁體中文第一次就成功。從以下 log 推斷錯誤:測試因超出設定的時間限制(200,000毫秒)而超時,並在嘗試點擊一個元素時因目標頁面被關閉而失敗。

點開 trace ,具體錯誤訊息為 MetaMask - RPC Error: Invalid parameters: must provide an Ethereum address. {code: -32602, message: Invalid parameters: must provide an Ethereum address.),推斷可能是在地址實際可用之前就嘗試使用 Metamask 造成的錯誤。

error log (EN)

Test timeout of 200000ms exceeded.
Error: locator.click: Target closed
=========================== logs ===========================
waiting for getByTestId('signature-request-scroll-button')
============================================================

   at ../pages/TradePage.ts:95

  93 |     const newPage = await pagePromise;
  94 |     await newPage.goto('chrome-extension://' + extensionId + '/popup.html');
> 95 |     await newPage.getByTestId('signature-request-scroll-button').click();
     |                                                                  ^
  96 |     await newPage.getByTestId('page-container-footer-next').click();
  97 |     await this.page
  98 |       .locator('#__next > div > div:nth-child(11) > div > div > div.flex > button > svg')

    at TradePage.updatePosition (/Users/shirley/programming/cafeca/tidebit-defi-dev/intergration-test/pages/TradePage.ts:95:66)
    at /Users/shirley/programming/cafeca/tidebit-defi-dev/intergration-test/tests/TBDTC000001.spec.ts:149:3

error log (CN)

Test timeout of 200000ms exceeded.
Error: locator.click: Page closed
=========================== logs ===========================
waiting for getByTestId('signature-request-scroll-button')
============================================================

   at ../pages/TradePage.ts:95

  93 |     const newPage = await pagePromise;
  94 |     await newPage.goto('chrome-extension://' + extensionId + '/popup.html');
> 95 |     await newPage.getByTestId('signature-request-scroll-button').click();
     |                                                                  ^
  96 |     await newPage.getByTestId('page-container-footer-next').click();
  97 |     await this.page
  98 |       .locator('#__next > div > div:nth-child(11) > div > div > div.flex > button > svg')

    at TradePage.updatePosition (/Users/shirley/programming/cafeca/tidebit-defi-dev/intergration-test/pages/TradePage.ts:95:66)
    at /Users/shirley/programming/cafeca/tidebit-defi-dev/intergration-test/tests/TBDTC000001.spec.ts:149:3

@arealclimber arealclimber added 5 hard level 5 and removed 2 hard level 2 labels Oct 17, 2023
arealclimber added a commit that referenced this issue Oct 20, 2023
@arealclimber
Copy link
Member

arealclimber commented Oct 23, 2023

測試方式 (branch: fix/playwright-update-cfd)

  • 在本地測試,並且把playwright.config.tsbaseURL 改成 http://localhost:3000/ ,在測試過程中會按不到按鈕,測試不了更新持倉的部分。改成部署到 Vercel 上,然後將本地 playwright.config.tsbaseURL 改成 Vercel 部署的網址

測試結果

  • 將 Lunar 更新至 0.5.11 ,從 log 得知錯誤來自 ethereum?.request 沒有拿到 錢包地址 from 的資料
    image

  • 將 Lunar 更新至 0.5.14,錯誤依然存在,獲得新的錯誤訊息
    image

tc.ebable is not a function
TypeError: tc.ebable is not a function
    at tu.<anonymous> (https://tidebit-defi-j0h05mjyj-cafeca.vercel.app/_next/static/chunks/pages/_app-8b2d41087f1cc1aa.js:1:11884)
    at Generator.next (<anonymous>)
    at https://tidebit-defi-j0h05mjyj-cafeca.vercel.app/_next/static/chunks/pages/_app-8b2d41087f1cc1aa.js:1:10999
    at new Promise (<anonymous>)
    at Z (https://tidebit-defi-j0h05mjyj-cafeca.vercel.app/_next/static/chunks/pages/_app-8b2d41087f1cc1aa.js:1:10790)
    at tu.ensureConnection (https://tidebit-defi-j0h05mjyj-cafeca.vercel.app/_next/static/chunks/pages/_app-8b2d41087f1cc1aa.js:1:11819)
    at tu.<anonymous> (https://tidebit-defi-j0h05mjyj-cafeca.vercel.app/_next/static/chunks/pages/_app-8b2d41087f1cc1aa.js:1:12487)
    at Generator.next (<anonymous>)
    at https://tidebit-defi-j0h05mjyj-cafeca.vercel.app/_next/static/chunks/pages/_app-8b2d41087f1cc1aa.js:1:10999
    at new Promise (<anonymous>)

@arealclimber
Copy link
Member

將 Lunar 更新至 0.5.15,錯誤訊息與 v0.5.11 及 v0.5.12 相同
image

@arealclimber
Copy link
Member

等待 Lunar library 更新後才能繼續處理

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 hard level 5 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants