-
Notifications
You must be signed in to change notification settings - Fork 295
test(e2e): implement account settings regression tests [WPB-19935] #19540
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
base: dev
Are you sure you want to change the base?
Changes from all commits
5b72548
b53e99d
68090bb
2364a8d
0377118
071e02d
18878c5
7ef30fa
c5c7ad9
668efb8
be378c0
f341a92
b56cddc
1712d20
931daa3
cd28d28
1d64f6d
83b410e
f9ab8ce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,25 +22,29 @@ import {Page, Locator} from '@playwright/test'; | |
import {selectByDataAttribute} from 'test/e2e_tests/utils/selector.util'; | ||
|
||
export class ConversationSidebar { | ||
readonly pageLoadingTimeout = 60_000; | ||
readonly page: Page; | ||
|
||
readonly personalStatusLabel: Locator; | ||
readonly personalStatusName: Locator; | ||
readonly personalUserName: Locator; | ||
readonly preferencesButton: Locator; | ||
readonly allConverationsButton: Locator; | ||
readonly connectButton: Locator; | ||
readonly archiveButton: Locator; | ||
readonly manageTeamButton: Locator; | ||
readonly sidebar: Locator; | ||
|
||
constructor(page: Page) { | ||
this.page = page; | ||
|
||
this.personalStatusLabel = page.getByTestId('status-availability'); | ||
this.personalStatusName = page.locator(`${selectByDataAttribute('status-name')}`); | ||
this.personalUserName = page.locator(`${selectByDataAttribute('user-handle')}`); | ||
this.preferencesButton = page.locator(`${selectByDataAttribute('go-preferences')}`); | ||
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')); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I doesn't make sense to have both |
||
this.sidebar = page.locator(`.conversations-sidebar-items`); | ||
} | ||
|
||
|
@@ -65,7 +69,7 @@ export class ConversationSidebar { | |
} | ||
|
||
async isPageLoaded() { | ||
await this.preferencesButton.waitFor({state: 'visible'}); | ||
await this.preferencesButton.waitFor({state: 'visible', timeout: this.pageLoadingTimeout}); | ||
} | ||
|
||
async clickArchive() { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,23 +17,12 @@ | |
* | ||
*/ | ||
|
||
import {addCreatedTeam, addCreatedUser} from './tearDown.util'; | ||
import {inviteMembers} from './userActions'; | ||
import {Page} from '@playwright/test'; | ||
|
||
import {ApiManagerE2E} from '../backend/apiManager.e2e'; | ||
import {User} from '../data/user'; | ||
import {BaseModal} from './base.modal'; | ||
|
||
/** | ||
* add an team with one owner and 2 member | ||
*/ | ||
export const setupBasicTestScenario = async (api: ApiManagerE2E, member: User[], owner: User, teamName: string) => { | ||
const user = await api.createTeamOwner(owner, teamName); | ||
// register credentials for cleanup later | ||
addCreatedTeam(user, user.teamId); | ||
await inviteMembers(member, user, api); | ||
|
||
for (const [, user] of member.entries()) { | ||
addCreatedUser(user); | ||
export class ErrorModal extends BaseModal { | ||
constructor(page: Page) { | ||
super(page, "[data-uie-name='primary-modals-container']"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with @iskvortsov, we should add unique identifiers. |
||
} | ||
return user; | ||
}; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Wire | ||
* Copyright (C) 2025 Wire Swiss GmbH | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see http://www.gnu.org/licenses/. | ||
* | ||
*/ | ||
|
||
import {Page, Locator} from '@playwright/test'; | ||
|
||
import {selectByDataAttribute} from 'test/e2e_tests/utils/selector.util'; | ||
|
||
export class OptionsPage { | ||
readonly checkboxSoundAlertsAll: Locator; | ||
readonly checkboxSoundAlertsSome: Locator; | ||
readonly checkboxSoundAlertsNone: Locator; | ||
|
||
constructor(page: Page) { | ||
this.checkboxSoundAlertsAll = page.locator(selectByDataAttribute('preferences-options-audio-all')); | ||
this.checkboxSoundAlertsSome = page.locator(selectByDataAttribute('preferences-options-audio-some')); | ||
this.checkboxSoundAlertsNone = page.locator(selectByDataAttribute('preferences-options-audio-none')); | ||
} | ||
|
||
async checkSoundAll() { | ||
await this.checkboxSoundAlertsAll.check(); | ||
} | ||
async checkSoundSome() { | ||
await this.checkboxSoundAlertsSome.check(); | ||
} | ||
async checkSoundNone() { | ||
await this.checkboxSoundAlertsNone.check(); | ||
} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.