From 2aabb066b8355123f8249fc3f0bb1aae0ba7eb86 Mon Sep 17 00:00:00 2001 From: waltem01 Date: Thu, 23 Nov 2023 13:24:38 +0100 Subject: [PATCH] moved and renamed playwright tests --- Webserver/playwright.config.ts | 2 +- Webserver/tests/test.ts | 6 ------ Webserver/vite.config.ts | 3 ++- 3 files changed, 3 insertions(+), 8 deletions(-) delete mode 100644 Webserver/tests/test.ts diff --git a/Webserver/playwright.config.ts b/Webserver/playwright.config.ts index 1c5d7a1..a3949ba 100644 --- a/Webserver/playwright.config.ts +++ b/Webserver/playwright.config.ts @@ -5,7 +5,7 @@ const config: PlaywrightTestConfig = { command: 'npm run build && npm run preview', port: 4173 }, - testDir: 'tests', + testDir: 'src/playwright', testMatch: /(.+\.)?(test|spec)\.[jt]s/ }; diff --git a/Webserver/tests/test.ts b/Webserver/tests/test.ts deleted file mode 100644 index 5816be4..0000000 --- a/Webserver/tests/test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { expect, test } from '@playwright/test'; - -test('index page has expected h1', async ({ page }) => { - await page.goto('/'); - await expect(page.getByRole('heading', { name: 'Welcome to SvelteKit' })).toBeVisible(); -}); diff --git a/Webserver/vite.config.ts b/Webserver/vite.config.ts index 37b6a84..fea8786 100644 --- a/Webserver/vite.config.ts +++ b/Webserver/vite.config.ts @@ -4,6 +4,7 @@ import { defineConfig } from 'vitest/config'; export default defineConfig({ plugins: [sveltekit()], test: { - include: ['src/**/*.{test,spec}.{js,ts}'] + include: ['src/**/*.{test,spec}.{js,ts}'], + exclude: ['src/playwright'] } });