Skip to content

Commit

Permalink
updated .prettierignore and fixed failing prettier files
Browse files Browse the repository at this point in the history
  • Loading branch information
aasimsyed committed Apr 23, 2024
1 parent ec5d22a commit e672bec
Show file tree
Hide file tree
Showing 11 changed files with 315 additions and 243 deletions.
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
node_modules/
.nuxt/

playwright-report/
tests-examples/
test-results/
36 changes: 18 additions & 18 deletions frontend/.github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
name: Playwright Tests
on:
push:
branches: [ main, master ]
branches: [main, master]
pull_request:
branches: [ main, master ]
branches: [main, master]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm install -g yarn && yarn
- name: Install Playwright Browsers
run: yarn playwright install --with-deps
- name: Run Playwright tests
run: yarn playwright test
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm install -g yarn && yarn
- name: Install Playwright Browsers
run: yarn playwright install --with-deps
- name: Run Playwright tests
run: yarn playwright test
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
46 changes: 23 additions & 23 deletions frontend/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineConfig, devices } from '@playwright/test';
import { defineConfig, devices } from "@playwright/test";

/**
* Read environment variables from file.
Expand All @@ -12,15 +12,15 @@ import { defineConfig, devices } from '@playwright/test';

// Environment configurations
const environments = {
local: 'http://127.0.0.1:3000',
prod: 'https://activist.org'
local: "http://127.0.0.1:3000",
prod: "https://activist.org",
};

// Determine the environment from the command line or default to 'local'
const ENV = (process.env.TEST_ENV || 'local') as keyof typeof environments;
const ENV = (process.env.TEST_ENV || "local") as keyof typeof environments;

export default defineConfig({
testDir: './tests/specs',
testDir: "./tests/specs",
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
Expand All @@ -30,53 +30,53 @@ export default defineConfig({
/* 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',
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: environments[ENV],

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
trace: "on-first-retry",
},

/* Configure projects for major desktop browsers */
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},

{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
name: "firefox",
use: { ...devices["Desktop Firefox"] },
},

{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
name: "webkit",
use: { ...devices["Desktop Safari"] },
},
{
name: 'Microsoft Edge',
use: { ...devices['Desktop Edge'], channel: 'msedge' },
name: "Microsoft Edge",
use: { ...devices["Desktop Edge"], channel: "msedge" },
},

/* Test against mobile viewports. */
{
name: 'Mobile Chrome',
use: { ...devices['Pixel 5'], isMobile: true },
name: "Mobile Chrome",
use: { ...devices["Pixel 5"], isMobile: true },
},
{
name: 'Mobile Safari',
use: { ...devices['iPhone 12'], isMobile: true },
name: "Mobile Safari",
use: { ...devices["iPhone 12"], isMobile: true },
},
{
name: 'Mobile Samsung',
use: { ...devices['Galaxy S20'], isMobile: true },
name: "Mobile Samsung",
use: { ...devices["Galaxy S20"], isMobile: true },
},
{
name: 'Mobile iPad',
use: { ...devices['iPad (gen 8)'], isMobile: true },
name: "Mobile iPad",
use: { ...devices["iPad (gen 8)"], isMobile: true },
},

/* Test against branded browsers. */
Expand Down
Loading

0 comments on commit e672bec

Please sign in to comment.