Enables ContextIsolation

This commit is contained in:
Josh Perez 2023-01-12 19:24:59 -05:00 committed by GitHub
parent 4bbf5eb5d4
commit 9374832ea4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
83 changed files with 1009 additions and 1073 deletions

View file

@ -2,6 +2,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
/* eslint-disable no-await-in-loop, no-console */
import type { PrimaryDevice } from '@signalapp/mock-server';
import { StorageState } from '@signalapp/mock-server';
import type { App } from './fixtures';
@ -23,6 +24,7 @@ void (async () => {
const { phone, server } = bootstrap;
let state = StorageState.getEmpty();
let lastContact: PrimaryDevice | undefined;
for (const [i, profileName] of contactNames.entries()) {
const contact = await server.createPrimaryDevice({
profileName,
@ -39,6 +41,10 @@ void (async () => {
if (i >= contactNames.length - 4) {
state = state.pin(contact);
}
if (i === contactNames.length - 1) {
lastContact = contact;
}
}
await phone.setStorageState(state);
@ -52,8 +58,7 @@ void (async () => {
const leftPane = window.locator('.left-pane-wrapper');
const item = leftPane.locator(
'_react=BaseConversationListItem' +
`[title = ${JSON.stringify(contactNames[contactNames.length - 1])}]`
`[data-testid="${lastContact?.toContact().uuid}"]`
);
await item.waitFor();