EmerisHQ / demeris

Emeris web app
https://app.emeris.com/
Apache License 2.0
11 stars 2 forks source link

test: fix-e2e-test-back-to-atom #1771

Closed eitjuh closed 2 years ago

eitjuh commented 2 years ago

At some moment I modified this test from ATOM > CRO, because cosmos hub was down and I didn't want it to block PRs We need a more stable fix at some moment that allows for some chains to be down.

Anyway, changing it back for now to tidy it up.

Edit: When tidying it back up, the test broke, because there were multiple elements in the portfolio which had the text "ATOM". This is because we were using mockdata instead of the actual data.

Because of this, I changed it back to using real data.

This means that I removed some checks for the pool information - since this is not included in the test account.

github-actions[bot] commented 2 years ago

Visit the preview URL for this PR (updated for commit 9de5bf6):

https://emeris-app--pr1771-test-fix-e2e-test-ba-l5dvsfl8.web.app

(expires Tue, 17 May 2022 10:14:36 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

fl-y commented 2 years ago

The e2e tests failing seems like a 🚩 - wouldn't this break tests for other PRs?

eitjuh commented 2 years ago

The e2e tests failing seems like a 🚩 - wouldn't this break tests for other PRs?

it's because it found multiple elements in the table, simply have to make the test more specific. Will fix 👍

eitjuh commented 2 years ago

The mocked data implemented in this PR: https://github.com/EmerisHQ/demeris/pull/1530

actually caused a problem which led to the error below. Without the mocked data, there is only one element in the portfolio which has the text ATOM. This is exactly why we want to test with real data and not with the mocked data.


    waiting for selector "table.assets-table >> tr >> :scope:has-text("ATOM")"
      strict mode violation: "table.assets-table >> tr >> :scope:has-text("ATOM")" resolved to 2 elements:
        1) <tr data-v-adb975ee="" data-cy="asset-row" class="as…>…</tr> aka playwright.$("text=ATOM$27.28$135.38$136.475.002664 ATOM4")
        2) <tr data-v-adb975ee="" data-cy="asset-row" class="as…>…</tr> aka playwright.$("text=Gravity 8 LP OSMO · ATOM$2,819,143.76$22.55$22.550.000008 G81")
fl-y commented 2 years ago

Failed e2e again 😭

fl-y commented 2 years ago
Screenshot 2022-05-10 at 7 07 43 PM

Error seems to be an issue with the PR rather than the tests being flaky? 🤔

eitjuh commented 2 years ago

Error seems to be an issue with the PR rather than the tests being flaky? 🤔

yeah rushed too much, should be fixed now