Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions e2e-tests/actions/connectWithUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@

import {Page} from '@playwright/test';

import {User} from './createUser';

import {conversationsSidebar} from '../poms/webapp/conversationsSidebar.page';
import {startUI} from '../poms/webapp/startUI.page';
import {conversationsSidebar, startUI} from '../poms/webapp';
import {User} from '../types';

export async function connectWithUser(page: Page, receiver: User) {
await conversationsSidebar(page).connectButton.click();
Expand Down
9 changes: 2 additions & 7 deletions e2e-tests/actions/createApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,9 @@
*
*/

import {_electron as electron, ElectronApplication, Page} from '@playwright/test';
import {_electron as electron} from '@playwright/test';

export type App = ElectronApplication & {
/* The playwright page for the main electron window wrapping the webapp */
wrapper: Page;
/* The playwright page for the currently shown webapp */
page: Page;
};
import {App} from '../types';

export const createApp = async (options: {env?: string; lang?: string; dataDir: string}): Promise<App> => {
if (!options.env) {
Expand Down
6 changes: 2 additions & 4 deletions e2e-tests/actions/createGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@
*
*/

import {User} from './createUser';

import {Page} from '../fixtures';
import {conversationsList} from '../poms/webapp/conversationList.page';
import {groupCreationModal} from '../poms/webapp/groupCreation.modal';
import {conversationsList, groupCreationModal} from '../poms/webapp';
import {User} from '../types';

export const createGroup = async (page: Page, conversationName: string, users: User[]) => {
await conversationsList(page).createGroupButton.click();
Expand Down
14 changes: 2 additions & 12 deletions e2e-tests/actions/createTeam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,8 @@

import {createUser, registerUser} from './createUser';

import {BrigApiClient} from '../backend/BrigApiClient';
import {GalleyApiClient} from '../backend/GalleyApiClient';
import {PublicApiClient, RegisteredUser, TeamOwner} from '../backend/PublicApiClient';

export type TeamRole = 'admin' | 'partner' | 'owner' | 'member';

export type Team = {
teamId: string;
owner: TeamOwner;
/** Add a new member to the team after its initial creation */
addTeamMember: (member: RegisteredUser, options?: {role?: TeamRole}) => Promise<void>;
};
import {BrigApiClient, GalleyApiClient, PublicApiClient} from '../backend';
import {RegisteredUser, TeamOwner, Team, TeamRole} from '../types';

export const createTeam = async (
api: {publicApi: PublicApiClient; brigApi: BrigApiClient; galleyApi: GalleyApiClient},
Expand Down
14 changes: 2 additions & 12 deletions e2e-tests/actions/createUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,8 @@

import {faker} from '@faker-js/faker';

import {BrigApiClient} from '../backend/BrigApiClient';
import {PublicApiClient, RegisteredUser} from '../backend/PublicApiClient';

export type User = {
firstName: string;
lastName: string;
username: string;
initials: string;
fullName: string;
email: string;
password: string;
};
import {BrigApiClient, PublicApiClient} from '../backend';
import {User, RegisteredUser} from '../types';

export const createUser = (): User => {
const firstName = faker.person.firstName();
Expand Down
28 changes: 28 additions & 0 deletions e2e-tests/actions/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Wire
* Copyright (C) 2026 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/.
*
*/

export * from './connectWithUser';
export * from './createApp';
export * from './createGroup';
export * from './createTeam';
export * from './createUser';
export * from './loginUser';
export * from './mockNotifications';
export * from './sendConnectionRequest';
export * from './watchActiveAccount';
7 changes: 2 additions & 5 deletions e2e-tests/actions/loginUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@

import {Page} from '@playwright/test';

import {User} from './createUser';

import {conversationsSidebar} from '../poms/webapp/conversationsSidebar.page';
import {LOGIN_TIMEOUT, loginPage} from '../poms/webapp/login.page';
import {ssoPage} from '../poms/webapp/sso.page';
import {conversationsSidebar, LOGIN_TIMEOUT, loginPage, ssoPage} from '../poms/webapp';
import {User} from '../types';

/* Visit the sso page and execute the login for the user */
export const loginUser = async (page: Page, user: User) => {
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/actions/mockNotifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import {Page} from '@playwright/test';

import {App} from './createApp';
import {App} from '../types';

declare global {
interface Window {
Expand Down
6 changes: 2 additions & 4 deletions e2e-tests/actions/sendConnectionRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@

import {Page} from '@playwright/test';

import {User} from './createUser';

import {conversationsSidebar} from '../poms/webapp/conversationsSidebar.page';
import {startUI} from '../poms/webapp/startUI.page';
import {conversationsSidebar, startUI} from '../poms/webapp';
import {User} from '../types';

export async function sendConnectionRequest(page: Page, receiver: User) {
await conversationsSidebar(page).connectButton.click();
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/actions/watchActiveAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import {Page} from '@playwright/test';

import {App} from './createApp';
import {App} from '../types';

// eslint-disable-next-line valid-jsdoc
/**
Expand Down
6 changes: 1 addition & 5 deletions e2e-tests/backend/PublicApiClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@ import {ok, type RequestOpts} from '@oazapfts/runtime';

import * as publicApiClient from './generated/publicApi';

import {User} from '../actions/createUser';

export type RegisteredUser = User & {id: string; token: string};

export type TeamOwner = RegisteredUser & {teamId: string};
import {User, RegisteredUser, TeamOwner} from '../types';

export type PublicApiClientConfig = {
baseUrl: string;
Expand Down
22 changes: 22 additions & 0 deletions e2e-tests/backend/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Wire
* Copyright (C) 2026 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/.
*
*/

export * from './BrigApiClient';
export * from './GalleyApiClient';
export * from './PublicApiClient';
9 changes: 3 additions & 6 deletions e2e-tests/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,9 @@ import fs from 'node:fs/promises';
import os from 'node:os';
import path from 'node:path';

import {createApp, type App} from './actions/createApp';
import {createTeam, Team} from './actions/createTeam';
import {createUser, registerUser} from './actions/createUser';
import {BrigApiClient} from './backend/BrigApiClient';
import {GalleyApiClient} from './backend/GalleyApiClient';
import {PublicApiClient, RegisteredUser, TeamOwner} from './backend/PublicApiClient';
import {createApp, createTeam, createUser, registerUser} from './actions';
import {BrigApiClient, GalleyApiClient, PublicApiClient} from './backend';
import {App, Team, TeamOwner, RegisteredUser} from './types';

type FixtureOptions = {appOptions: {env?: string; lang?: string}};

Expand Down
3 changes: 1 addition & 2 deletions e2e-tests/poms/app/accountsSidebar.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
*
*/

import {App} from '../../actions/createApp';
import {RegisteredUser} from '../../backend/PublicApiClient';
import {App, RegisteredUser} from '../../types';

export const accountsSidebar = (app: App) => {
const sidebar = app.wrapper.getByRole('navigation', {name: 'Accounts Sidebar'});
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/poms/app/appIcon.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
*/

import {App} from '../../actions/createApp';
import {App} from '../../types';

export const appIcon = (app: App) => {
return {
Expand Down
21 changes: 21 additions & 0 deletions e2e-tests/poms/app/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Wire
* Copyright (C) 2026 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/.
*
*/

export * from './accountsSidebar.page';
export * from './appIcon.page';
2 changes: 1 addition & 1 deletion e2e-tests/poms/webapp/conversation.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import {Page} from '@playwright/test';

import {User} from '../../actions/createUser';
import {User} from '../../types';

export const conversation = (page: Page) => {
const conversationTitle = page.getByTestId('status-conversation-title-bar-label');
Expand Down
32 changes: 32 additions & 0 deletions e2e-tests/poms/webapp/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Wire
* Copyright (C) 2026 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/.
*
*/

export * from './callCell.page';
export * from './connectionRequest.page';
export * from './conversation.page';
export * from './conversationList.page';
export * from './conversationsSidebar.page';
export * from './emailVerification.page';
export * from './groupCreation.modal';
export * from './login.page';
export * from './registration.page';
export * from './setAccountType.page';
export * from './setHandle.page';
export * from './sso.page';
export * from './startUI.page';
7 changes: 2 additions & 5 deletions e2e-tests/specs/criticalFlow/1on1Call.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,9 @@
*
*/

import {connectWithUser} from '../../actions/connectWithUser';
import {loginUser} from '../../actions/loginUser';
import {connectWithUser, loginUser} from '../../actions';
import {expect, test} from '../../fixtures';
import {callCell} from '../../poms/webapp/callCell.page';
import {conversation} from '../../poms/webapp/conversation.page';
import {conversationsList} from '../../poms/webapp/conversationList.page';
import {callCell, conversation, conversationsList} from '../../poms/webapp';

test(
'I want to call someone directly',
Expand Down
7 changes: 2 additions & 5 deletions e2e-tests/specs/criticalFlow/groupCall.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,10 @@
*
*/

import {loginUser} from './../../actions/loginUser';
import {callCell} from './../../poms/webapp/callCell.page';
import {conversation} from './../../poms/webapp/conversation.page';
import {loginUser, createGroup} from './../../actions';
import {conversation, conversationsList, callCell} from './../../poms/webapp';

import {createGroup} from '../../actions/createGroup';
import {test, expect} from '../../fixtures';
import {conversationsList} from '../../poms/webapp/conversationList.page';

test(
'I want to have a group call',
Expand Down
6 changes: 3 additions & 3 deletions e2e-tests/specs/criticalFlow/login.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
*
*/

import {loginUser} from '../../actions/loginUser';
import {loginUser} from '../../actions';
import {expect, test} from '../../fixtures';
import {accountsSidebar} from '../../poms/app/accountsSidebar.page';
import {conversationsSidebar} from '../../poms/webapp/conversationsSidebar.page';
import {accountsSidebar} from '../../poms/app';
import {conversationsSidebar} from '../../poms/webapp';

test(
'I want to log in with my existing Wire account',
Expand Down
7 changes: 3 additions & 4 deletions e2e-tests/specs/criticalFlow/multipleAccounts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@
*
*/

import {loginUser} from '../../actions/loginUser';
import {loginUser} from '../../actions';
import {expect, test} from '../../fixtures';
import {accountsSidebar} from '../../poms/app/accountsSidebar.page';
import {conversationsSidebar} from '../../poms/webapp/conversationsSidebar.page';
import {ssoPage} from '../../poms/webapp/sso.page';
import {accountsSidebar} from '../../poms/app';
import {conversationsSidebar, ssoPage} from '../../poms/webapp';

test(
'I want to add multiple accounts to the app and switch between them',
Expand Down
21 changes: 12 additions & 9 deletions e2e-tests/specs/criticalFlow/register.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,19 @@
*
*/

import {createUser} from '../../actions/createUser';
import {createUser} from '../../actions';
import {expect, test} from '../../fixtures';
import {accountsSidebar} from '../../poms/app/accountsSidebar.page';
import {conversationsSidebar} from '../../poms/webapp/conversationsSidebar.page';
import {emailVerificationPage} from '../../poms/webapp/emailVerification.page';
import {LOGIN_TIMEOUT, loginPage} from '../../poms/webapp/login.page';
import {registrationPage} from '../../poms/webapp/registration.page';
import {setAccountTypePage} from '../../poms/webapp/setAccountType.page';
import {setHandlePage} from '../../poms/webapp/setHandle.page';
import {ssoPage} from '../../poms/webapp/sso.page';
import {accountsSidebar} from '../../poms/app';
import {
conversationsSidebar,
emailVerificationPage,
LOGIN_TIMEOUT,
loginPage,
registrationPage,
setAccountTypePage,
setHandlePage,
ssoPage,
} from '../../poms/webapp';

test('I want to register a new Wire account', {tag: ['@TC-10924', '@crit-flow-desktop']}, async ({app, brigApi}) => {
const user = createUser();
Expand Down
7 changes: 2 additions & 5 deletions e2e-tests/specs/criticalFlow/sendingMessages.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,9 @@
*
*/

import {connectWithUser} from '../../actions/connectWithUser';
import {createGroup} from '../../actions/createGroup';
import {loginUser} from '../../actions/loginUser';
import {connectWithUser, createGroup, loginUser} from '../../actions';
import {test, expect} from '../../fixtures';
import {conversation} from '../../poms/webapp/conversation.page';
import {conversationsList} from '../../poms/webapp/conversationList.page';
import {conversation, conversationsList} from '../../poms/webapp';

test(
'I want to exchange text messages with other users',
Expand Down
Loading
Loading