Skip to content

Commit

Permalink
Merge develop and resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalkakadiya committed Jan 10, 2024
2 parents 2f7adba + 866eff3 commit ee0c948
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 52 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ name: End-to-End Tests
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches:
branches:
- develop
- master

pull_request:
branches:
branches:
- develop
- master

Expand All @@ -23,14 +23,14 @@ jobs:
# The type of runner that the job will run on
name: Playwright Tests
runs-on: ubuntu-latest
env:
env:
TESRESULT_TOKEN: ${{ secrets.TESRESULT_TOKEN }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
SHA: ${{ github.event.pull_request.head.sha }}
COMMIT_SHA: ${{ github.sha }}
PR_NUMBER: ${{ github.event.pull_request.number }}
working-directory: ./tests/e2e-playwright

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
Expand Down
94 changes: 47 additions & 47 deletions tests/e2e-playwright/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,66 +1,66 @@
/**
* External dependencies
*/
import path from 'path';
import { fileURLToPath } from 'url';
import { devices } from '@playwright/test';
import type { PlaywrightTestConfig } from '@playwright/test';
import path from 'path';
import { fileURLToPath } from 'url';
import { devices } from '@playwright/test';
import type { PlaywrightTestConfig } from '@playwright/test';

const STORAGE_STATE_PATH =
process.env.STORAGE_STATE_PATH ||
path.join( process.cwd(), 'artifacts/storage-states/admin.json' );
const STORAGE_STATE_PATH =
process.env.STORAGE_STATE_PATH ||
path.join( process.cwd(), 'artifacts/storage-states/admin.json' );

const config: PlaywrightTestConfig = {
const config: PlaywrightTestConfig = {
reporter: [
["html", { open: "never" }],
["junit", { outputFile: "playwright-report/results.xml" }],
[
"playwright-tesults-reporter",
// { "tesults-target": process.env.TESRESULT_TOKEN },
],
],
forbidOnly: !! process.env.CI,
workers: 1,
retries: process.env.CI ? 2 : 0,
timeout: parseInt( process.env.TIMEOUT || '', 10 ) || 100_000, // Defaults to 100 seconds.
// Don't report slow test "files", as we will be running our tests in serial.
reportSlowTests: null,
testDir: fileURLToPath( new URL( './specs', 'file:' + __filename ).href ),
outputDir: path.join( process.cwd(), 'artifacts/test-results' ),
globalSetup: fileURLToPath(
new URL( './config/global-setup.ts', 'file:' + __filename ).href
),
use: {
baseURL: 'http://nginx-helper.com/',
headless: true,
viewport: {
width: 960,
height: 700,
},
ignoreHTTPSErrors: true,
locale: 'en-US',
contextOptions: {
reducedMotion: 'reduce',
strictSelectors: true,
},
storageState: STORAGE_STATE_PATH,
actionTimeout: 10_000, // 10 seconds.
trace: 'retain-on-failure',
screenshot: 'only-on-failure',
video: 'on-first-retry',
},
],
forbidOnly: !! process.env.CI,
workers: 1,
retries: process.env.CI ? 2 : 0,
timeout: parseInt( process.env.TIMEOUT || '', 10 ) || 100_000, // Defaults to 100 seconds.
// Don't report slow test "files", as we will be running our tests in serial.
reportSlowTests: null,
testDir: fileURLToPath( new URL( './specs', 'file:' + __filename ).href ),
outputDir: path.join( process.cwd(), 'artifacts/test-results' ),
globalSetup: fileURLToPath(
new URL( './config/global-setup.ts', 'file:' + __filename ).href
),
use: {
baseURL: 'http://nginx-helper.com/',
headless: true,
viewport: {
width: 960,
height: 700,
},
ignoreHTTPSErrors: true,
locale: 'en-US',
contextOptions: {
reducedMotion: 'reduce',
strictSelectors: true,
},
storageState: STORAGE_STATE_PATH,
actionTimeout: 10_000, // 10 seconds.
trace: 'retain-on-failure',
screenshot: 'only-on-failure',
video: 'on-first-retry',
},
// webServer: {
// command: 'npm run wp-env start',
// port: 8889,
// timeout: 120_000, // 120 seconds.
// reuseExistingServer: true,
// },
projects: [
{
name: 'chromium',
use: { ...devices[ 'Desktop Chrome' ] },
},
],
};
projects: [
{
name: 'chromium',
use: { ...devices[ 'Desktop Chrome' ] },
},
],
};

export default config;
export default config;

0 comments on commit ee0c948

Please sign in to comment.