The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/apps/meteor/tests/e2e/fixtures/createAuxContext.ts

19 lines
461 B

import type { Browser, Page } from '@playwright/test';
import type { IUserState } from './userStates';
export const createAuxContext = async (
browser: Browser,
userState: IUserState,
route = '/',
waitForMainContent = true,
): Promise<{ page: Page }> => {
const page = await browser.newPage({ storageState: userState.state });
await page.goto(route);
if (waitForMainContent) {
await page.locator('#main-content').waitFor();
}
return { page };
};