test: write the federation regression tests [WPB-19988]#21440
test: write the federation regression tests [WPB-19988]#21440zhannach wants to merge 17 commits into
Conversation
This way it's possible to connect to federated users
|
|
||
| getUserAvailabilityIcon(fullName: string) { | ||
| return this.getLocatorByUser(fullName).getByTestId('status-availability-icon'); | ||
| getParticipant(fullName: string) { |
| const messageNormalUser = normalUserPages.conversation().getMessage({sender: normalUser}); | ||
| await expect(messageNormalUser).toBeVisible(); | ||
| await expect(federatedUserPages.conversation().getMessage({sender: normalUser})).toBeVisible(); | ||
|
|
||
| await normalUserPages.conversation().deleteMessage(messageNormalUser, 'Everyone'); | ||
| await expect(messageNormalUser).not.toBeVisible(); | ||
| await expect(federatedUserPage.getByTestId('element-message-delete')).toBeVisible(); |
There was a problem hiding this comment.
Why use the "element-message-deleted" test id? How about checking the message is there and then expecting it to be gone after deletion? :)
| const messageNormalUser = normalUserPages.conversation().getMessage({sender: normalUser}); | |
| await expect(messageNormalUser).toBeVisible(); | |
| await expect(federatedUserPages.conversation().getMessage({sender: normalUser})).toBeVisible(); | |
| await normalUserPages.conversation().deleteMessage(messageNormalUser, 'Everyone'); | |
| await expect(messageNormalUser).not.toBeVisible(); | |
| await expect(federatedUserPage.getByTestId('element-message-delete')).toBeVisible(); | |
| const messageNormalUser = normalUserPages.conversation().getMessage({sender: normalUser}); | |
| const messageFederatedUser = federatedUserPages.conversation().getMessage({sender: normalUser}); | |
| await expect(messageNormalUser).toBeVisible(); | |
| await expect(messageFederatedUser).toBeVisible(); | |
| await normalUserPages.conversation().deleteMessage(messageNormalUser, 'Everyone'); | |
| await expect(messageNormalUser).not.toBeVisible(); | |
| await expect(messageFederatedUser).not.toBeVisible(); |
There was a problem hiding this comment.
It was implemented according to the requirements:
User A deletes previous text message for all users
User B sees deleted message
| let backupName: string; | ||
| await test.step('Create and save backup for the normal user', async () => { | ||
| await normalUserComponents.conversationSidebar().clickPreferencesButton(); | ||
| backupName = await createAndSaveBackup(testInfo, normalUserPageManager); | ||
| }); |
There was a problem hiding this comment.
🎨 I learned that this was possible from you in one of your previous PRs ;)
| let backupName: string; | |
| await test.step('Create and save backup for the normal user', async () => { | |
| await normalUserComponents.conversationSidebar().clickPreferencesButton(); | |
| backupName = await createAndSaveBackup(testInfo, normalUserPageManager); | |
| }); | |
| const backupName = await test.step('Create and save backup for the normal user', async () => { | |
| await normalUserComponents.conversationSidebar().clickPreferencesButton(); | |
| return await createAndSaveBackup(testInfo, normalUserPageManager); | |
| }); |
| await createGroup(normalUserPages, groupName, []); | ||
| await normalUserPages.conversationList().getConversation(groupName).open(); | ||
| await normalUserPages.conversation().toggleGroupInformation(); | ||
| await normalUserPages.conversationDetails().clickAddPeopleButton(); | ||
| await normalUserPages.conversationDetails().addUsersToConversation([federatedUser.fullName]); |
There was a problem hiding this comment.
Is there a specific reason why you're adding the federatedUser like this instead of just passing him to the users array?
| await createGroup(normalUserPages, groupName, []); | |
| await normalUserPages.conversationList().getConversation(groupName).open(); | |
| await normalUserPages.conversation().toggleGroupInformation(); | |
| await normalUserPages.conversationDetails().clickAddPeopleButton(); | |
| await normalUserPages.conversationDetails().addUsersToConversation([federatedUser.fullName]); | |
| await createGroup(normalUserPages, groupName, [federatedUser]); |
There was a problem hiding this comment.
Yes, the requirements were to create an empty group and then invite the federated user to it. However, since there are no specific checks during this step, I'd like to see if we can align on simplifying it.
|




This PR introduces new Federation regression test suite.
These tests validate key federation capabilities, including asset sharing, cross-backend communication, backup imports, and real-time audio/video calls between different backend environments.
Changes: