From 86669e07d5caded348cb6d8e0321a5049dd1b4d6 Mon Sep 17 00:00:00 2001 From: wajeht <58354193+wajeht@users.noreply.github.com> Date: Mon, 2 Sep 2024 21:01:18 -0500 Subject: [PATCH] test(test-unit): Rename and update unit test script for headless browser testing --- Makefile | 9 +++------ playwright.config.ts | 2 +- .../tests-examples}/demo-todo-app.spec.ts | 0 {tests => src/tests}/home-page.test.ts | 0 4 files changed, 4 insertions(+), 7 deletions(-) rename {tests-examples => src/tests-examples}/demo-todo-app.spec.ts (100%) rename {tests => src/tests}/home-page.test.ts (100%) diff --git a/Makefile b/Makefile index 6c77244..b6273cd 100644 --- a/Makefile +++ b/Makefile @@ -11,14 +11,11 @@ fix-git: @git add . @git commit -m "Untrack files in .gitignore" -test: +test-unit: @docker compose -f docker-compose.dev.yml exec notify npm run test -test-ete: - @docker compose -f docker-compose.dev.yml exec notify npm run test:ete - -test-w: - @docker compose -f docker-compose.dev.yml exec notify npm run test:watch +test-browser: + @docker compose -f docker-compose.dev.yml exec notify npm run test:browser:headless format: @docker compose -f docker-compose.dev.yml exec notify npm run format diff --git a/playwright.config.ts b/playwright.config.ts index 08ea761..f412afe 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -12,7 +12,7 @@ import { defineConfig, devices } from '@playwright/test'; * See https://playwright.dev/docs/test-configuration. */ export default defineConfig({ - testDir: './tests', + testDir: './src/tests', /* Run tests in files in parallel */ fullyParallel: true, /* Fail the build on CI if you accidentally left test.only in the source code. */ diff --git a/tests-examples/demo-todo-app.spec.ts b/src/tests-examples/demo-todo-app.spec.ts similarity index 100% rename from tests-examples/demo-todo-app.spec.ts rename to src/tests-examples/demo-todo-app.spec.ts diff --git a/tests/home-page.test.ts b/src/tests/home-page.test.ts similarity index 100% rename from tests/home-page.test.ts rename to src/tests/home-page.test.ts