test: inject initial data after each test in E2EE Key Reset (#37759)

This commit is contained in:
Guilherme Gazzo 2025-12-10 14:25:05 +01:00 committed by GitHub
parent c034e41d51
commit 7fbe79435d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 5 deletions

View File

@ -1,6 +1,7 @@
import type { Page } from '@playwright/test';
import { createAuxContext } from '../fixtures/createAuxContext';
import injectInitialData from '../fixtures/inject-initial-data';
import { Users } from '../fixtures/userStates';
import { AccountProfile } from '../page-objects';
import { preserveSettings } from '../utils/preserveSettings';
@ -35,6 +36,7 @@ test.describe('E2EE Key Reset', () => {
test.afterEach(async () => {
await anotherClientPage.close();
await injectInitialData();
});
test('expect force logout on e2e keys reset', async ({ page }) => {

View File

@ -2,8 +2,7 @@ import { faker } from '@faker-js/faker';
import type { APIRequestContext } from '@playwright/test';
import { BASE_API_URL } from '../config/constants';
import injectInitialData from '../fixtures/inject-initial-data';
import { Users, restoreState } from '../fixtures/userStates';
import { Users } from '../fixtures/userStates';
import { HomeChannel } from '../page-objects';
import { preserveSettings } from '../utils/preserveSettings';
import { test, expect } from '../utils/test';
@ -54,9 +53,6 @@ test.describe('E2EE Legacy Format', () => {
test('legacy expect create a private channel encrypted and send an encrypted message', async ({ page, request }) => {
const channelName = faker.string.uuid();
await injectInitialData();
await restoreState(page, Users.userE2EE, { except: ['private_key', 'public_key', 'e2e.randomPassword'] });
await poHomeChannel.sidenav.createEncryptedChannel(channelName);
await expect(page).toHaveURL(`/group/${channelName}`);