Skip to content

Conversation

xdubx
Copy link
Contributor

@xdubx xdubx commented Sep 19, 2025

TaskWPB-19935 [Web/QA] Write the account settings regression tests in Playwright

Description

Checklist

  • mentions the JIRA issue in the PR name (Ex. [WPB-XXXX])
  • PR has been self reviewed by the author;
  • Hard-to-understand areas of the code have been commented;
  • If it is a core feature, unit tests have been added;

Copy link

codecov bot commented Sep 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.65%. Comparing base (35ce2e5) to head (f9ab8ce).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #19540      +/-   ##
==========================================
- Coverage   43.66%   43.65%   -0.01%     
==========================================
  Files        1294     1294              
  Lines       32318    32318              
  Branches     7177     7177              
==========================================
- Hits        14111    14110       -1     
  Misses      16515    16515              
- Partials     1692     1693       +1     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@xdubx xdubx marked this pull request as ready for review September 23, 2025 12:24
@xdubx xdubx requested review from a team and otto-the-bot as code owners September 23, 2025 12:24
Copy link
Contributor

github-actions bot commented Sep 23, 2025

🔗 Download Full Report Artifact

🧪 Playwright Test Summary

  • Passed: 8
  • Failed: 5
  • Skipped: 0
  • 🔁 Flaky: 1
  • 📊 Total: 14
  • Total Runtime: 892.4s (~ 14 min 52 sec)

Failed Tests:

❌ Calls in channels with device switch and screenshare (tags: TC-8754, crit-flow-web)

Location: specs/CriticalFlow/channelsCall-TC-8755.spec.ts:38
Duration: 36576ms

Errors:

TimeoutError: locator.click: Timeout 20000ms exceeded.
Call log:
  - waiting for locator('[data-uie-name="go-next"]')


   at pageManager/webapp/pages/groupCreation.page.ts:49

  47 |
  48 |   async clickNextButton() {
> 49 |     await this.nextButton.click();
     |                           ^
  50 |   }
  51 |
  52 |   async clickCreateGroupButton() {
    at GroupCreationPage.clickNextButton (/home/runner/actions-runner/_work/wire-webapp/wire-webapp/test/e2e_tests/pageManager/webapp/pages/groupCreation.page.ts:49:27)
    at /home/runner/actions-runner/_work/wire-webapp/wire-webapp/test/e2e_tests/specs/CriticalFlow/channelsCall-TC-8755.spec.ts:88:40
    at /home/runner/actions-runner/_work/wire-webapp/wire-webapp/test/e2e_tests/specs/CriticalFlow/channelsCall-TC-8755.spec.ts:85:5
❌ Channels Management (tags: TC-8752, crit-flow-web)

Location: specs/CriticalFlow/channelsManagement-TC-8752.spec.ts:36
Duration: 42625ms

Errors:

TimeoutError: locator.click: Timeout 20000ms exceeded.
Call log:
  - waiting for locator('[data-uie-name="go-next"]')


   at pageManager/webapp/pages/groupCreation.page.ts:49

  47 |
  48 |   async clickNextButton() {
> 49 |     await this.nextButton.click();
     |                           ^
  50 |   }
  51 |
  52 |   async clickCreateGroupButton() {
    at GroupCreationPage.clickNextButton (/home/runner/actions-runner/_work/wire-webapp/wire-webapp/test/e2e_tests/pageManager/webapp/pages/groupCreation.page.ts:49:27)
    at /home/runner/actions-runner/_work/wire-webapp/wire-webapp/test/e2e_tests/specs/CriticalFlow/channelsManagement-TC-8752.spec.ts:72:33
    at /home/runner/actions-runner/_work/wire-webapp/wire-webapp/test/e2e_tests/specs/CriticalFlow/channelsManagement-TC-8752.spec.ts:69:3
❌ Planning group call with sending various messages during call (tags: TC-8632, crit-flow-web)

Location: specs/CriticalFlow/groupCalls-TC-8632.spec.ts:37
Duration: 25279ms

Errors:

Error: expect(received).toBeFalsy()

Received: true

  125 |     await test.step('Member unmutes themselves', async () => {
  126 |       await memberCalling.unmuteSelfInFullScreen();
> 127 |       expect(await memberCalling.isSelfUserMutedInFullScreen()).toBeFalsy();
      |                                                                 ^
  128 |     });
  129 |
  130 |     await test.step('Validation: Owner sees member is unmuted', async () => {
    at /home/runner/actions-runner/_work/wire-webapp/wire-webapp/test/e2e_tests/specs/CriticalFlow/groupCalls-TC-8632.spec.ts:127:65
    at /home/runner/actions-runner/_work/wire-webapp/wire-webapp/test/e2e_tests/specs/CriticalFlow/groupCalls-TC-8632.spec.ts:125:5
❌ Group Video call (tags: TC-8637, crit-flow-web)

Location: specs/CriticalFlow/groupVideoCall-TC-8637.spec.ts:39
Duration: 52809ms

Errors:

TimeoutError: locator.click: Timeout 20000ms exceeded.
Call log:
  - waiting for locator('[data-uie-name="item-call"]').locator('[data-uie-name="do-call-controls-call-accept"]')


   at pageManager/webapp/pages/calling.page.ts:66

  64 |
  65 |   async clickAcceptCallButton() {
> 66 |     await this.acceptCallButton.click();
     |                                 ^
  67 |   }
  68 |
  69 |   async clickToggleVideoButton() {
    at CallingPage.clickAcceptCallButton (/home/runner/actions-runner/_work/wire-webapp/wire-webapp/test/e2e_tests/pageManager/webapp/pages/calling.page.ts:66:33)
    at /home/runner/actions-runner/_work/wire-webapp/wire-webapp/test/e2e_tests/specs/CriticalFlow/groupVideoCall-TC-8637.spec.ts:147:34
    at /home/runner/actions-runner/_work/wire-webapp/wire-webapp/test/e2e_tests/specs/CriticalFlow/groupVideoCall-TC-8637.spec.ts:145:16
❌ Messages in Channels (tags: TC-8753, crit-flow-web)

Location: specs/CriticalFlow/messagesInChannels-TC-8753.spec.ts:44
Duration: 36107ms

Errors:

TimeoutError: locator.click: Timeout 20000ms exceeded.
Call log:
  - waiting for locator('[data-uie-name="go-next"]')


   at pageManager/webapp/pages/groupCreation.page.ts:49

  47 |
  48 |   async clickNextButton() {
> 49 |     await this.nextButton.click();
     |                           ^
  50 |   }
  51 |
  52 |   async clickCreateGroupButton() {
    at GroupCreationPage.clickNextButton (/home/runner/actions-runner/_work/wire-webapp/wire-webapp/test/e2e_tests/pageManager/webapp/pages/groupCreation.page.ts:49:27)
    at setupOwner (/home/runner/actions-runner/_work/wire-webapp/wire-webapp/test/e2e_tests/specs/CriticalFlow/messagesInChannels-TC-8753.spec.ts:78:42)
    at /home/runner/actions-runner/_work/wire-webapp/wire-webapp/test/e2e_tests/specs/CriticalFlow/messagesInChannels-TC-8753.spec.ts:89:7
    at /home/runner/actions-runner/_work/wire-webapp/wire-webapp/test/e2e_tests/specs/CriticalFlow/messagesInChannels-TC-8753.spec.ts:71:5

Flaky Tests:

⚠️ Setting up new device with a backup (tags: TC-8634, crit-flow-web)

Location: specs/CriticalFlow/backupRestoration-TC-8634.spec.ts:35

Attempt 1
Result: ❌ Failed
Duration: 39778ms

Errors:

Error: locator.waitFor: Test ended.
Call log:
  - waiting for locator('[data-uie-name="item-message"] .message-body:not(:has(p.text-foreground)):has(.text)').last() to be visible


   at pageManager/webapp/pages/conversation.page.ts:162

  160 |     if (waitForVisibility) {
  161 |       // Wait for the last message to be visible
> 162 |       await this.messages.last().waitFor({state: 'visible', timeout: 20_000});
      |                                  ^
  163 |     }
  164 |
  165 |     // Then get all matching elements
    at ConversationPage.isMessageVisible (/home/runner/actions-runner/_work/wire-webapp/wire-webapp/test/e2e_tests/pageManager/webapp/pages/conversation.page.ts:162:34)
    at /home/runner/actions-runner/_work/wire-webapp/wire-webapp/test/e2e_tests/specs/CriticalFlow/backupRestoration-TC-8634.spec.ts:87:33
    at /home/runner/actions-runner/_work/wire-webapp/wire-webapp/test/e2e_tests/specs/CriticalFlow/backupRestoration-TC-8634.spec.ts:72:3

Attempt 2
Result: ✅ Passed
Duration: 42318ms

@xdubx xdubx force-pushed the WPB-19935-web-qa-write-the-account-settings-regression-tests-in-playwright branch from 1ba75cd to 7ef30fa Compare September 23, 2025 12:30
@xdubx
Copy link
Contributor Author

xdubx commented Sep 23, 2025

for the code duplication. i wanna refactor all modals but the tests are failing so i cannot test it in this case.

@xdubx xdubx requested a review from thisisamir98 September 23, 2025 14:20
@xdubx
Copy link
Contributor Author

xdubx commented Sep 23, 2025

one note the vars:
SSO_USERNAME
SSO_PASSWORD
SSO_EMAIL
need to be added to the action that run the tests.

Copy link
Contributor

@e-maad e-maad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done 🚀
Added few comments, you can decide it you want to cater them in next PR or not cater at all.

constructor(page: Page, modalLocator: string) {
this.page = page;
this.modal = page.locator(modalLocator);
this.modalTitle = this.modal.locator("[data-uie-name='status-modal-title']");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can also replace these with getByTestId.

Copy link
Contributor

@iskvortsov iskvortsov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a few comments

this.allConverationsButton = page.locator(`${selectByDataAttribute('go-recent-view')}`);
this.connectButton = page.locator(`button${selectByDataAttribute('go-people')}`);
this.archiveButton = page.locator(selectByDataAttribute('go-archive'));
this.manageTeamButton = page.locator(selectByDataAttribute('go-team-management'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I doesn't make sense to have both getByTestId and selectByDataAttribute because they both locate elements by data-uie-name.


export class ErrorModal extends BaseModal {
constructor(page: Page) {
super(page, "[data-uie-name='primary-modals-container']");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it doesn't make much sense since a lot of modals we have utilise the same [data-uie-name='primary-modals-container']. We either need to distinguish modals with some other means or add unique identifiers. @e-maad what do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @iskvortsov, we should add unique identifiers.

@xdubx xdubx enabled auto-merge (squash) September 26, 2025 14:28
Copy link

sonarqubecloud bot commented Oct 8, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants