fix: removed tests

This commit is contained in:
glazk0 2024-10-16 11:26:12 +02:00
parent 5f8c34ef78
commit 027628290f
No known key found for this signature in database
GPG key ID: E45BF177782B9FEB
4 changed files with 431 additions and 954 deletions

View file

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