Skip to content

Commit

Permalink
Add Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafamohab committed Dec 7, 2024
1 parent 622bc7d commit 66b8b38
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 19 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ name: Playwright Tests
inputs:
targetBrowser:
description: Choose Target Browser
default: chrome
default: chromium
type: choice
options:
- firefox
- chrome
- microsoftedge
- chromium
- webkit

jobs:
Custom_Linux_Grid:
Expand Down Expand Up @@ -52,10 +52,10 @@ jobs:
if [ '${{ github.event.inputs.targetBrowser }}' == 'firefox' ]; then
BROWSER_VERSION=$(yarn playwright show-browser firefox --version)
echo "Firefox Browser Version: $BROWSER_VERSION"
elif [ '${{ github.event.inputs.targetBrowser }}' == 'chrome' ]; then
elif [ '${{ github.event.inputs.targetBrowser }}' == 'chromium' ]; then
BROWSER_VERSION=$(yarn playwright show-browser chromium --version)
echo "Google Chrome Browser Version: $BROWSER_VERSION"
elif [ '${{ github.event.inputs.targetBrowser }}' == 'microsoftedge' ]; then
elif [ '${{ github.event.inputs.targetBrowser }}' == 'webkit' ]; then
BROWSER_VERSION=$(yarn playwright show-browser webkit --version)
echo "Microsoft Edge Browser Version: $BROWSER_VERSION"
else
Expand All @@ -71,8 +71,8 @@ jobs:
run: |
# Check if Xvfb is needed (for headed mode)
if [ '${{ github.event.inputs.targetBrowser }}' == 'firefox' ] ||
[ '${{ github.event.inputs.targetBrowser }}' == 'chrome' ] ||
[ '${{ github.event.inputs.targetBrowser }}' == 'microsoftedge' ]; then
[ '${{ github.event.inputs.targetBrowser }}' == 'chromium' ] ||
[ '${{ github.event.inputs.targetBrowser }}' == 'webkit' ]; then
echo "Running tests with xvfb-run to simulate display"
xvfb-run -a yarn playwright test --project="${{ github.event.inputs.targetBrowser || 'chromium' }}"
else
Expand Down
13 changes: 1 addition & 12 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { devices ,defineConfig} from '@playwright/test';

export default defineConfig ({
workers: 8, // Increase the number of workers for parallel execution
testDir: './test',
testDir: './src/tests',
timeout: 35 * 1000,
use: {
baseURL: "https://www.automationexercise.com",
Expand All @@ -19,17 +19,6 @@ export default defineConfig ({

projects: [
{
name: 'chrome',
use: { ...devices['Desktop Chrome'] },
},
{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},
{
name: 'MicrosoftEdge',
use: { ...devices['Desktop Edge'] },
},{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
Expand Down

0 comments on commit 66b8b38

Please sign in to comment.