Skip to content

Commit

Permalink
Checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
cammoore committed Nov 6, 2024
1 parent ff0bda8 commit f1a48c6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:
run: npx playwright install --with-deps
- name: Run ESLint
run: npm run lint
# - name: Run Playwright tests
# run: npx playwright test
# - uses: actions/upload-artifact@v4
# if: always()
# with:
# name: playwright-report
# path: playwright-report/
# retention-days: 30
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
20 changes: 20 additions & 0 deletions tests/list-stuff-page.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { test, expect } from '@playwright/test';

test.use({
storageState: 'john-auth.json',
});

test('test', async ({ page }) => {
await page.goto('http://localhost:3000/list');
await expect(page.getByRole('navigation')).toBeVisible();
await page.getByRole('heading', { name: 'Stuff' }).click();
await expect(page.getByRole('cell', { name: 'Name' })).toBeVisible();
await expect(page.getByRole('cell', { name: 'Quantity' })).toBeVisible();
await expect(page.getByRole('cell', { name: 'Condition' })).toBeVisible();
await expect(page.getByRole('cell', { name: 'Actions' })).toBeVisible();
await expect(page.getByRole('cell', { name: 'Basket' })).toBeVisible();
await expect(page.getByRole('cell', { name: 'Bicycle' })).toBeVisible();
await expect(page.getByRole('link', { name: 'Add Stuff' })).toBeVisible();
await expect(page.getByRole('link', { name: 'List Stuff' })).toBeVisible();
await expect(page.getByRole('button', { name: '[email protected]' })).toBeVisible();
});

0 comments on commit f1a48c6

Please sign in to comment.