mirror of https://github.com/buster-so/buster.git
updates for efficiency
This commit is contained in:
parent
ebe4f91ed0
commit
0675ec2fa7
|
@ -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
|
|
@ -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
|
||||
`);
|
||||
});
|
|
@ -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
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue