Simplify test until we can get snapshots/traces working in electron tests
This commit is contained in:
@ -625,7 +625,13 @@ export async function setup(
|
||||
})
|
||||
|
||||
await context.addInitScript(
|
||||
async ({ token, settingsKey, settings, appSettingsFileKey, appSettingsFileContent }) => {
|
||||
async ({
|
||||
token,
|
||||
settingsKey,
|
||||
settings,
|
||||
appSettingsFileKey,
|
||||
appSettingsFileContent,
|
||||
}) => {
|
||||
localStorage.setItem('TOKEN_PERSIST_KEY', token)
|
||||
localStorage.setItem('persistCode', ``)
|
||||
localStorage.setItem(settingsKey, settings)
|
||||
@ -635,7 +641,8 @@ export async function setup(
|
||||
{
|
||||
token: secrets.token,
|
||||
appSettingsFileKey: TEST_SETTINGS_FILE_KEY,
|
||||
appSettingsFileContent: overrideDirectory || TEST_SETTINGS.app.projectDirectory,
|
||||
appSettingsFileContent:
|
||||
overrideDirectory || TEST_SETTINGS.app.projectDirectory,
|
||||
settingsKey: TEST_SETTINGS_KEY,
|
||||
settings: TOML.stringify({
|
||||
...TEST_SETTINGS,
|
||||
@ -651,11 +658,7 @@ export async function setup(
|
||||
await page.emulateMedia({ reducedMotion: 'reduce' })
|
||||
}
|
||||
|
||||
export async function setupElectron({
|
||||
testInfo,
|
||||
}: {
|
||||
testInfo: TestInfo
|
||||
}) {
|
||||
export async function setupElectron({ testInfo }: { testInfo: TestInfo }) {
|
||||
// create or otherwise clear the folder
|
||||
const projectDirName = testInfo.outputPath('electron-test-projects-dir')
|
||||
try {
|
||||
@ -691,4 +694,4 @@ export async function setupElectron({
|
||||
await setup(context, page, projectDirName)
|
||||
|
||||
return { electronApp, page }
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user