-
Notifications
You must be signed in to change notification settings - Fork 1.4k
test: fix unread badge test #6752
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
973a8e9
Added test id in badge, added e2e test for badge
Rohit3523 1af4db1
Improve testId case
Rohit3523 bce3eaf
Added 2 more test case
Rohit3523 cd71eab
lint fix
Rohit3523 b933fe3
Some more changes
Rohit3523 4481665
chore: format code and fix lint issues [skip ci]
Rohit3523 105a837
ci rerun
Rohit3523 8e3a778
revert
Rohit3523 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,110 @@ | ||
| appId: chat.rocket.reactnative | ||
| name: Unread badge | ||
| onFlowStart: | ||
| - runFlow: '../../helpers/setup.yaml' | ||
| tags: | ||
| - test-13 | ||
|
|
||
| --- | ||
| - evalScript: ${output.user = output.utils.createUser()} | ||
| - evalScript: ${output.otherUser = output.utils.createUser()} | ||
|
|
||
| - runFlow: | ||
| file: '../../helpers/login-with-deeplink.yaml' | ||
| env: | ||
| USERNAME: ${output.user.username} | ||
| PASSWORD: ${output.user.password} | ||
|
|
||
| # Should have normal unread indicator on normal message | ||
| - evalScript: ${output.message = output.utils.sendMessage(output.otherUser.username, output.otherUser.password, '@' + output.user.username, 'message-mark-as-unread')} | ||
| - extendedWaitUntil: | ||
| visible: | ||
| id: 'rooms-list-view-item-${output.otherUser.username}' | ||
| timeout: 60000 | ||
| - extendedWaitUntil: | ||
| visible: | ||
| id: 'unread-badge-1' | ||
| childOf: | ||
| id: 'rooms-list-view-item-${output.otherUser.username}' | ||
| timeout: 60000 | ||
| - tapOn: | ||
| id: 'rooms-list-view-item-${output.otherUser.username}' | ||
| - tapOn: | ||
| id: header-back | ||
| - extendedWaitUntil: | ||
| notVisible: | ||
| id: 'unread-badge-1' | ||
| childOf: | ||
| id: 'rooms-list-view-item-${output.otherUser.username}' | ||
| timeout: 60000 | ||
|
|
||
| # Should have mention unread indicator on mentioned message | ||
| - evalScript: ${output.message = output.utils.sendMessage(output.otherUser.username, output.otherUser.password, '@' + output.user.username, '@' + output.user.username)} | ||
| - extendedWaitUntil: | ||
| visible: | ||
| id: 'rooms-list-view-item-${output.otherUser.username}' | ||
| timeout: 60000 | ||
| - extendedWaitUntil: | ||
| visible: | ||
| id: 'mention-badge-1' | ||
| childOf: | ||
| id: 'rooms-list-view-item-${output.otherUser.username}' | ||
| timeout: 60000 | ||
| - tapOn: | ||
| id: 'rooms-list-view-item-${output.otherUser.username}' | ||
| - tapOn: | ||
| id: header-back | ||
| - extendedWaitUntil: | ||
| notVisible: | ||
| id: 'mention-badge-1' | ||
| childOf: | ||
| id: 'rooms-list-view-item-${output.otherUser.username}' | ||
| timeout: 60000 | ||
|
|
||
| # send normal message first and mention in next message and it should show mentioned unread indicator | ||
| - evalScript: ${output.message = output.utils.sendMessage(output.otherUser.username, output.otherUser.password, '@' + output.user.username, 'message-mark-as-unread')} | ||
| - evalScript: ${output.message = output.utils.sendMessage(output.otherUser.username, output.otherUser.password, '@' + output.user.username, '@' + output.user.username)} | ||
| - extendedWaitUntil: | ||
| visible: | ||
| id: 'rooms-list-view-item-${output.otherUser.username}' | ||
| timeout: 60000 | ||
| - extendedWaitUntil: | ||
| visible: | ||
| id: 'mention-badge-2' | ||
| childOf: | ||
| id: 'rooms-list-view-item-${output.otherUser.username}' | ||
| timeout: 60000 | ||
| - tapOn: | ||
| id: 'rooms-list-view-item-${output.otherUser.username}' | ||
| - tapOn: | ||
| id: header-back | ||
| - extendedWaitUntil: | ||
| notVisible: | ||
| id: 'mention-badge-2' | ||
| childOf: | ||
| id: 'rooms-list-view-item-${output.otherUser.username}' | ||
| timeout: 60000 | ||
|
|
||
| # send mention message first and normal message in next message and it should show mentioned unread indicator | ||
| - evalScript: ${output.message = output.utils.sendMessage(output.otherUser.username, output.otherUser.password, '@' + output.user.username, '@' + output.user.username)} | ||
| - evalScript: ${output.message = output.utils.sendMessage(output.otherUser.username, output.otherUser.password, '@' + output.user.username, 'message-mark-as-unread')} | ||
| - extendedWaitUntil: | ||
| visible: | ||
| id: 'rooms-list-view-item-${output.otherUser.username}' | ||
| timeout: 60000 | ||
| - extendedWaitUntil: | ||
| visible: | ||
| id: 'mention-badge-2' | ||
| childOf: | ||
| id: 'rooms-list-view-item-${output.otherUser.username}' | ||
| timeout: 60000 | ||
| - tapOn: | ||
| id: 'rooms-list-view-item-${output.otherUser.username}' | ||
| - tapOn: | ||
| id: header-back | ||
| - extendedWaitUntil: | ||
| notVisible: | ||
| id: 'mention-badge-2' | ||
| childOf: | ||
| id: 'rooms-list-view-item-${output.otherUser.username}' | ||
| timeout: 60000 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add cleanup step for created users.
The test creates users but doesn't clean them up. The
mark-as-unread.yamltest includes anonFlowCompletehook to delete created users, which should be added here as well.Add this after line 4:
🤖 Prompt for AI Agents