trezor / trezor-suite

Trezor Suite Monorepo
https://trezor.io/trezor-suite
Other
736 stars 255 forks source link

Trading - e2e tests #3689

Open keraf opened 3 years ago

keraf commented 3 years ago

Cover trading section by E2E tests

Current state of automated test coverage in suite-web/e2e: There are 2 tests currently enabled, which are covering the invity powered trading page in packages/suite-web/e2e/tests/coinmarket/buy.test.ts

  • Should buy crypto best offer successfully - basic buy flow (✅ Passing)
  • Should buy crypto with comparing all offers successfully - flow with comparing different offers (✅ Passing)

Both tests are using mocked responses for the invity backend (I suppose that it's fine, but not really E2E). As most tests in the suite, these also don't use common patterns like page objects for better abstraction.

I couldn't find any other currently enabled tests for trading flows e.g. sell, swap, dca) or for other coins than BTC.

Additionally there is a more complex scenario for exchanging coins in packages/suite-web/e2e/tests/coinmarket/exchange.test.ts but it's currently skipped. I tried running it and it failed ❌ so it needs fixing. And lastly in packages/suite-web/e2e/tests/dashboard/dashboard.test.ts there is just very basic checking that the trading form actually has all the input fields.

martinboehm commented 3 years ago

Totally agree. And finally we also have resources to create them @LukasRada.

tsusanka commented 3 years ago

@LukasRada @martinboehm how is this looking?

tomasklim commented 2 years ago

Would be nice to have e2e tests on Invity forms to check that #4650 does not break anything

tomasklim commented 2 years ago

Any progress @LukasRada @martinboehm?

LukasRada commented 2 years ago

We're actively looking for tester so he/she can finish the e2e tests. When the tester is in our team, we allocate him/her on it. Our main priority for now is to finish DCA.

HajekOndrej commented 1 month ago

Current state of automated test coverage in suite-web/e2e: There are 2 tests currently enabled, which are covering the invity powered trading page in packages/suite-web/e2e/tests/coinmarket/buy.test.ts

Both tests are using mocked responses for the invity backend (I suppose that it's fine, but not really E2E). As most tests in the suite, these also don't use common patterns like page objects for better abstraction.

I couldn't find any other currently enabled tests for trading flows e.g. sell, swap, dca) or for other coins than BTC.

Additionally there is a more complex scenario for exchanging coins in packages/suite-web/e2e/tests/coinmarket/exchange.test.ts but it's currently skipped. I tried running it and it failed ❌ so it needs fixing. And lastly in packages/suite-web/e2e/tests/dashboard/dashboard.test.ts there is just very basic checking that the trading form actually has all the input fields.