RocketChat / RocketChat/Rocket.Chat.ReactNative

Add notification/deep link E2E tests

Open
#732 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

✅ tests 👍 improvement
Dominant language
TypeScript
Stars
2.4k
Forks
1.5k
Avg merge
1d 18h
Merged PRs (30d)
90

Description

Add tests for notifications and deep link.
This topic is very important and hard to ensure it works without testing it manually before every release.
Detox has APIs for that: deep link and notifications

A simple tap on a notification dispatches several methods like (change server, login, navigate to the room, fetch new messages, etc).
A deep link is when the user taps on a link (https://go.rocket.chat/room\?host\=open.rocket.chat for example) and is redirected to the app. It can dispatch even more methods like (is logged in?, does he have access to the room?, etc).

Note: the user may be logged in two servers at the same time on the app, but only one is active.
On the tests below, I'll call same server as an active server and different server as a server that may be logged in by the user or not.

Note 2: if possible, we should run all tests with the app opened and closed.

Notifications:
  • Receive notification from the same server
  • Receive notification from a different server

Note: test in all room types

Deep link
  • Empty (rocketchat://)
  • Same server without anything else (rocketchat://room\?host\=open.rocket.chat)
  • Same server to a channel (https://go.rocket.chat/room\?host\=open.rocket.chat\&rid\={{RID}}\&path\=channel/{{CHANNEL_NAME}})
  • Same server to a group (https://go.rocket.chat/room\?host\=open.rocket.chat\&rid\={{RID}}\&path\=group/{{GROUP_NAME}})
  • Same server to a direct (https://go.rocket.chat/room\?host\=open.rocket.chat\&rid\={{RID}}\&path\=direct/{{DIRECT_NAME}})
  • With the app positioned in the same room
  • With the app positioned in another room
  • Different server to a room
  • Different server without a room
  • Different server without being logged in (must redirect to onboarding, but with a close button)
  • Invalid different server
  • Different server with auth:// (rocketchat://auth\?host\=open.rocket.chat)

Note: all deep link tests must be written for https://go.rocket.chat/ and rocketchat://

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Detox deep-link and notification API references linked in the issue, then map the checklist to the existing mobile E2E entry points. Cover the listed notification and deep-link scenarios across room types, servers, URLs, and app open or closed states; done means the unchecked cases are automated and pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.