mirror of
https://github.com/RocketChat/Rocket.Chat.git
synced 2025-12-28 06:47:25 +00:00
test: inject initial data after each test in E2EE Key Reset (#37759)
This commit is contained in:
parent
c034e41d51
commit
7fbe79435d
@ -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 }) => {
|
||||
|
||||
@ -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}`);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user