Update dev branch #29

Merged
glazk0 merged 14 commits from main into dev 2024-11-25 21:37:01 +01:00
4 changed files with 431 additions and 954 deletions
Showing only changes of commit 027628290f - Show all commits

View file

@ -6,7 +6,6 @@
"dev": "vite dev", "dev": "vite dev",
"build": "vite build", "build": "vite build",
"preview": "vite preview", "preview": "vite preview",
"test": "npm run test:integration && npm run test:unit",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --plugin-search-dir . --check . && eslint .", "lint": "prettier --plugin-search-dir . --check . && eslint .",
@ -24,14 +23,13 @@
"mode-watcher": "^0.3.1", "mode-watcher": "^0.3.1",
"svelte-boring-avatars": "^1.2.6", "svelte-boring-avatars": "^1.2.6",
"svelte-sonner": "^0.3.28", "svelte-sonner": "^0.3.28",
"tailwind-merge": "^2.5.2", "tailwind-merge": "^2.5.4",
"tailwind-variants": "^0.2.1", "tailwind-variants": "^0.2.1",
"vaul-svelte": "^0.3.2" "vaul-svelte": "^0.3.2"
}, },
"devDependencies": { "devDependencies": {
"@playwright/test": "^1.47.1", "@sveltejs/adapter-node": "^5.2.7",
"@sveltejs/adapter-node": "^5.2.3", "@sveltejs/kit": "^2.7.1",
"@sveltejs/kit": "^2.5.28",
"@sveltejs/vite-plugin-svelte": "^3.1.2", "@sveltejs/vite-plugin-svelte": "^3.1.2",
"@tailwindcss/typography": "^0.5.15", "@tailwindcss/typography": "^0.5.15",
"@typescript-eslint/eslint-plugin": "^7.18.0", "@typescript-eslint/eslint-plugin": "^7.18.0",
@ -40,19 +38,18 @@
"boring-avatars": "^1.11.2", "boring-avatars": "^1.11.2",
"eslint": "^8.57.1", "eslint": "^8.57.1",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.44.0", "eslint-plugin-svelte": "^2.44.1",
"postcss": "^8.4.47", "postcss": "^8.4.47",
"prettier": "^3.3.3", "prettier": "^3.3.3",
"prettier-plugin-svelte": "^3.2.6", "prettier-plugin-svelte": "^3.2.7",
"prettier-plugin-tailwindcss": "^0.5.14", "prettier-plugin-tailwindcss": "^0.5.14",
"svelte": "^4.2.19", "svelte": "^4.2.19",
"svelte-check": "^3.8.6", "svelte-check": "^3.8.6",
"sveltekit-superforms": "^2.18.1", "sveltekit-superforms": "^2.19.1",
"tailwindcss": "^3.4.12", "tailwindcss": "^3.4.14",
"tslib": "^2.7.0", "tslib": "^2.8.0",
"typescript": "^5.6.2", "typescript": "^5.6.3",
"vite": "^5.4.6", "vite": "^5.4.9",
"vitest": "^1.6.0",
"zod": "^3.23.8" "zod": "^3.23.8"
} }
} }

1304
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -1,7 +0,0 @@
import { describe, it, expect } from 'vitest';
describe('sum test', () => {
it('adds 1 + 2 to equal 3', () => {
expect(1 + 2).toBe(3);
});
});

View file

@ -1,51 +0,0 @@
import { expect, test } from '@playwright/test';
test('index page redirects to login page', async ({ page }) => {
await page.goto('/');
await page.waitForURL('/login');
await expect(page.url()).toContain('/login');
});
test('login page has a register link that redirects to the register page', async ({ page }) => {
await page.goto('/login');
const link = await page.$('a[href*="/register"]');
await link?.click();
await page.waitForURL('/register');
await expect(page.url()).toContain('/register');
});
test('register page has a login link that redirects to the login page', async ({ page }) => {
await page.goto('/register');
const link = await page.$('a[href*="/login"]');
await link?.click();
await page.waitForURL('/login');
await expect(page.url()).toContain('/login');
});
test('dashboard page redirects to login page if user is not logged in', async ({ page }) => {
await page.goto('');
await expect(page.url()).toContain('/login');
});
test('login form accepts valid credentials', async ({ page }) => {
await page.context().clearCookies();
await page.goto('/login');
await page.fill('input[name="pseudo"]', 'glazk0');
await page.fill('input[name="passwd"]', 'Cookies Are #Miam42');
await Promise.all([page.getByRole('button').click(), page.waitForURL('')]);
await expect(page.url()).toContain('');
});