TryQuiet / quiet

A private, p2p alternative to Slack and Discord built on Tor & IPFS
https://www.tryquiet.org
GNU General Public License v3.0
1.96k stars 85 forks source link

Two player e2e tests for join, receive message, and sync performance. #379

Closed holmesworcester closed 2 years ago

holmesworcester commented 2 years ago

Right now we don't have e2e tests that cover a user joining a community, or two users talking to each other, syncing newly created channels, etc.

Let's make an e2e test for joining a community and receiving a message, by:

  1. Running nectar/waggle "test" through the create process, until the registrar is up and running, we've created some channels and sent some messages, and we have an invite code.
  2. Running testcafe tests through the "join" process, using the invite code to join the community and connect to the nectar/waggle registrar we have running.
  3. Ensure we see all channels and messages in the testcafe test, given some timeout.
  4. Ensure we can send a message to the channel right away, once the text entry field becomes visible, and that the message is visible almost immediately.

We should make two versions of the test:

  1. Smoke test
  2. Performance test

The smoke test will run with a small amount of data in the community.

The performance test will run with a lot of data in the community. It will test that a user can send a message immediately, and switch channels, with minimal lag, and it will test to make sure that all the channel data syncs before some timeout.

EmiM commented 2 years ago

https://github.com/ZbayApp/monorepo/pull/407 <- this covers one scenario where the user launching actual app is a joining user and user creating community is handled by integration tests ("headless") logic. Right now the test case is simple:

Other cases will be added in separate MRs.

EmiM commented 2 years ago

I noticed the specific problem that sometimes occurs when running e2e test. It's often seen in CI but I am able to reproduce it locally:

EmiM commented 2 years ago

Temporarly removed sentryWarning modal and disabled sentry. To be enabled: https://github.com/ZbayApp/monorepo/issues/408

EmiM commented 2 years ago

Fix returning user tests: https://github.com/ZbayApp/monorepo/issues/427