Include frontend tests, update readme, fix bugs #163

Merged
philipp merged 20 commits from test-playwright into staging 2024-01-16 23:44:04 +01:00
2 changed files with 18 additions and 11 deletions
Showing only changes of commit beec5ba6c6 - Show all commits

View File

@ -1,15 +1,22 @@
# Frontend Process # Build
´cd frontend´
´npm install´
´npm run (watch/build)´
# Notes / Bugfixes
## Frontend ## Frontend
- [] support esc to close sidebar 1. `cd frontend`
- [] reload page -> don't throw input away! 2. `npm install`
3. `npm run (watch/build)`
# Run
## Backend ## Backend
1. `cargo r`
# Test
# Nice to have
## Frontend ## Frontend
- [] my trips for cox - `npx playwright test --workers 1 --project firefox`
- Nice UI: `--ui`
- Generate tests: `npx playwright codegen`
## Backend (Unit + Integration)
`cargo t`

View File

@ -1,4 +1,4 @@
import { test, expect } from '@playwright/test'; import { test, expect, Page } from '@playwright/test';
test('cox can create and delete trip', async ({ page }) => { test('cox can create and delete trip', async ({ page }) => {
await page.goto('http://localhost:8000/auth'); await page.goto('http://localhost:8000/auth');
@ -25,7 +25,7 @@ test('cox can create and delete trip', async ({ page }) => {
}); });
test.describe('cox can edit trips', () => { test.describe('cox can edit trips', () => {
let sharedPage; let sharedPage: Page;
test.beforeEach(async ({ browser }) => { test.beforeEach(async ({ browser }) => {
const page = await browser.newPage(); const page = await browser.newPage();