updates for efficiency

This commit is contained in:
Nate Kelley 2025-05-01 14:02:51 -06:00
parent ebe4f91ed0
commit 0675ec2fa7
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
3 changed files with 24 additions and 28 deletions

View File

@ -1,27 +0,0 @@
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@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30

View File

@ -0,0 +1,23 @@
import { test, expect } from '@playwright/test';
test('test', async ({ page }) => {
await page.goto('http://localhost:3000/auth/login');
await expect(page.getByRole('button', { name: 'Sign up with Google' })).toBeVisible();
await expect(page.getByRole('button', { name: 'Sign up with Github' })).toBeVisible();
await expect(page.getByRole('button', { name: 'Sign up with Azure' })).toBeVisible();
await expect(page.locator('body')).toContainText('Sign in');
await expect(page.locator('body')).toMatchAriaSnapshot(`
- heading "Sign up for free" [level=1]
- button "Sign up with Google":
- img
- button "Sign up with Github":
- img
- button "Sign up with Azure":
- img
- textbox "What is your email address?"
- textbox "Password"
- textbox "Confirm password"
- button "Sign up" [disabled]
- text: Already have an account? Sign in
`);
});

View File

@ -29,7 +29,7 @@ export default defineConfig({
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
/* Capture screenshot on failure */
screenshot: 'only-on-failure',
screenshot: 'on',
/* Run tests in headed mode (non-headless) */
headless: false
},