Remove snapshottoken variable and playwright-secrets.env file (#6801)

* Remove snapshottoken
Fixes #6800

* Add placeholder in .env.development

* Clean up language

* Update CONTRIBUTING.md

Co-authored-by: Jace Browning <jacebrowning@gmail.com>

* Add dotenv to secrets for local testing

* Lint

* Reorg things

* Quick fix

* Last one for windows

---------

Co-authored-by: Jace Browning <jacebrowning@gmail.com>
This commit is contained in:
Pierre Jacquier
2025-05-09 09:32:35 -07:00
committed by GitHub
parent 6f49c88382
commit e1d401adfe
8 changed files with 17 additions and 46 deletions

View File

@ -13,11 +13,15 @@ import fsp from 'fs/promises'
import pixelMatch from 'pixelmatch'
import type { Protocol } from 'playwright-core/types/protocol'
import { PNG } from 'pngjs'
import dotenv from 'dotenv'
const NODE_ENV = process.env.NODE_ENV || 'development'
dotenv.config({ path: [`.env.${NODE_ENV}.local`, `.env.${NODE_ENV}`] })
export const token = process.env.token || ''
import type { ProjectConfiguration } from '@rust/kcl-lib/bindings/ProjectConfiguration'
import { isErrorWhitelisted } from '@e2e/playwright/lib/console-error-whitelist'
import { secrets } from '@e2e/playwright/secrets'
import { TEST_SETTINGS, TEST_SETTINGS_KEY } from '@e2e/playwright/storageStates'
import { test } from '@e2e/playwright/zoo-test'
@ -891,7 +895,7 @@ export async function setup(
localStorage.setItem('PLAYWRIGHT_TEST_DIR', PLAYWRIGHT_TEST_DIR)
},
{
token: secrets.token,
token,
settingsKey: TEST_SETTINGS_KEY,
settings: settingsToToml({
settings: {
@ -919,7 +923,7 @@ export async function setup(
await context.addCookies([
{
name: COOKIE_NAME,
value: secrets.token,
value: token,
path: '/',
domain: 'localhost',
secure: true,