You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{defineConfig,devices}from'@playwright/test';import'dotenv/config';importpathfrom'path';/** * Read environment variables from file. * https://github.com/motdotla/dotenv */require('dotenv').config({path: path.resolve(__dirname,'e2e','.env')});/** * See https://playwright.dev/docs/test-configuration. */exportdefaultdefineConfig({testDir: './e2e/tests',/* Run tests in files in parallel */fullyParallel: true,/* Fail the build on CI if you accidentally left test.only in the source code. */forbidOnly: !!process.env.CI,/* Retry on CI only */retries: process.env.CI ? 2 : 0,/* Opt out of parallel tests on CI. */workers: process.env.CI ? 1 : undefined,/* Reporter to use. See https://playwright.dev/docs/test-reporters */reporter: 'html',/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */use: {/* Base URL to use in actions like `await page.goto('/')`. */// baseURL: 'http://127.0.0.1:3000',/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */trace: 'on-first-retry',locale: 'en-us',},/* Configure projects for major browsers */projects: [{name: 'setup',testMatch: /.*\.setup\.ts/},{name: 'chromium',testMatch: /.*\.spec\.ts/,use: {
...devices['Desktop Chrome'],storageState: '.auth/user.json',contextOptions: {permissions: ['clipboard-read','clipboard-write'],},},dependencies: ['setup'],},{name: 'firefox',testMatch: /.*\.spec\.ts/,use: {
...devices['Desktop Firefox'],storageState: '.auth/user.json',},dependencies: ['setup'],},{name: 'webkit',testMatch: /.*\.spec\.ts/,use: {
...devices['Desktop Safari'],storageState: '.auth/user.json',contextOptions: {permissions: ['clipboard-read'],},},dependencies: ['setup'],},{name: 'smoke-chromium',testMatch: /.*\.smoke\.ts/,use: {
...devices['Desktop Chrome'],storageState: '.auth/user.json',},dependencies: ['setup'],},{name: 'smoke-firefox',testMatch: /.*\.smoke\.ts/,use: {
...devices['Desktop Firefox'],storageState: '.auth/user.json',},dependencies: ['setup'],},{name: 'smoke-webkit',testMatch: /.*\.smoke\.ts/,use: {
...devices['Desktop Safari'],storageState: '.auth/user.json',},dependencies: ['setup'],},});
npx playwright install --with-deps
npx playwright test --project=webkit
running ci:
npx playwright install --with-deps
npx playwright test --project=webkit
Expected behavior
The tests behave the same for local and ci.
Actual behavior
Local: works as expected
CI: Throws error: Error: page.evaluate: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.
Version
1.48.2
Steps to reproduce
Local: MacOS
CI Runner: Docker Linux
config:
code:
running local:
running ci:
Expected behavior
The tests behave the same for local and ci.
Actual behavior
Local: works as expected
CI: Throws error:
Error: page.evaluate: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.
Additional context
No response
Environment
The text was updated successfully, but these errors were encountered: