From 3b265eee6c725fd5e9d8b24d801606162231813a Mon Sep 17 00:00:00 2001 From: Jeremy Sfez Date: Wed, 8 Nov 2023 15:44:39 +0100 Subject: [PATCH] test: install playwright --- .github/workflows/playwright.yml | 27 ++ .gitignore | 6 + app/page.tsx | 7 +- package.json | 5 +- playwright.config.ts | 83 ++++++ pnpm-lock.yaml | 425 +++++++++++++++++++++++++++++++ tests/createProject.spec.ts | 18 ++ 7 files changed, 566 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/playwright.yml create mode 100644 playwright.config.ts create mode 100644 tests/createProject.spec.ts diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml new file mode 100644 index 0000000..0404c10 --- /dev/null +++ b/.github/workflows/playwright.yml @@ -0,0 +1,27 @@ +name: Playwright Tests +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] +jobs: + test: + timeout-minutes: 60 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + - name: Install dependencies + run: npm install -g pnpm && pnpm install + - name: Install Playwright Browsers + run: pnpm exec playwright install --with-deps + - name: Run Playwright tests + run: pnpm exec playwright test + - uses: actions/upload-artifact@v3 + if: always() + with: + name: playwright-report + path: playwright-report/ + retention-days: 30 diff --git a/.gitignore b/.gitignore index fd3dbb5..5f9fc0a 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,9 @@ yarn-error.log* # typescript *.tsbuildinfo next-env.d.ts +/test-results/ +/playwright-report/ +/blob-report/ +/playwright/.cache/ +screenshots/ +tests-examples/ diff --git a/app/page.tsx b/app/page.tsx index b25479f..2eb90b0 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -75,7 +75,7 @@ export default function Home() { - +