-
Notifications
You must be signed in to change notification settings - Fork 296
test: Write regression tests for blocking users in Playwright [WPB-19940] #19700
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
test: Write regression tests for blocking users in Playwright [WPB-19940] #19700
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #19700 +/- ##
=======================================
Coverage 43.57% 43.57%
=======================================
Files 1294 1294
Lines 32467 32467
Branches 7217 7217
=======================================
Hits 14147 14147
Misses 16615 16615
Partials 1705 1705 🚀 New features to boost your workflow:
|
|
🔗 Download Full Report Artifact 🧪 Playwright Test Summary
Failed Tests:❌ Channels Management (tags: TC-8752, crit-flow-web)Location: specs/CriticalFlow/channelsManagement-TC-8752.spec.ts:36 Errors: ❌ Planning group call with sending various messages during call (tags: TC-8632, crit-flow-web)Location: specs/CriticalFlow/groupCalls-TC-8632.spec.ts:37 Errors: ❌ Group Video call (tags: TC-8637, crit-flow-web)Location: specs/CriticalFlow/groupVideoCall-TC-8637.spec.ts:39 Errors: Flaky Tests: |
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.
Pull Request Overview
This PR implements end-to-end regression tests for user blocking functionality in Playwright, covering various scenarios such as blocking/unblocking users in 1-on-1 conversations, group chats, and connection requests.
Key changes:
- Added comprehensive block regression test suite with 7 test cases
- Created new modal classes to support blocking workflow tests
- Extended existing page objects with unblock button functionality
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| test/e2e_tests/specs/Block/block.spec.ts | New test file containing 7 block/unblock test scenarios covering conversation lists, profile views, group chats, and connection requests |
| test/e2e_tests/pageManager/webapp/modals/userProfile.modal.ts | Added unblockButton locator to support unblocking operations in tests |
| test/e2e_tests/pageManager/webapp/modals/conversationNotConnected.modal.ts | New modal class for handling conversation not connected scenarios |
| test/e2e_tests/pageManager/index.ts | Registered conversationNotConnected modal in PageManager |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
ca7c9ca to
fd339f1
Compare
This commit migrates the regression tests for the 'Block' functionality from Testiny to the new Playwright framework, as described in WPB-19940. Tests related to known bugs (WPB-21052, WPB-18226) are marked as `test.fixme` and will be enabled once the underlying issues are resolved. Refs: WPB-19940
…lity Extracts duplicated login logic from `beforeEach` and `no-setup` tests into a new `loginAndSetup` helper function. Also extracts the manual user connection flow into a `connectUsersManually` helper function to reduce duplication in @TC-142 and @TC-144. These changes resolve the "Duplication on New Code" error reported by SonarQube. Additionally, the `api` fixture initialization is simplified to resolve the "Reliability Rating" issue. Refs: WPB-19940
SonarQube was still reporting significant code duplication in `block.spec.ts`. This commit resolves this by extracting the common user-blocking workflows into three dedicated helper functions in `utils/userActions.ts`: * `blockUserFromConversationList` * `blockUserFromProfileView` * `blockUserFromOpenGroupProfileView` The `block.spec.ts` file is updated to use these new helpers, resolving the duplication issue. Refs: WPB-19940
0229d16 to
bcde921
Compare
|
zskhan
left a comment
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.
LGTM 🚀


Description
Add regression tests for blocking users in eight cases
Checklist