diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 33a1482..c062fe4 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -9,7 +9,7 @@ on:
- main
jobs:
- build-and-test:
+ test-and-build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
@@ -29,9 +29,31 @@ jobs:
- name: Build project
run: npm run build
+ e2e-test:
+ name: 'Playwright Tests'
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 18
+ - name: Install dependencies
+ run: npm ci
+ - name: Install Playwright Browsers
+ run: npx playwright install --with-deps
+ - name: Run Playwright tests
+ run: npx playwright test
+ - uses: actions/upload-artifact@v4
+ if: ${{ !cancelled() }}
+ with:
+ name: playwright-report
+ path: playwright-report/
+ retention-days: 30
deploy:
if: github.ref == 'refs/heads/main'
- needs: build-and-test
+ needs:
+ - test-and-build
+ - e2e-test
runs-on: ubuntu-latest
steps:
- name: Checkout code
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index d0d65b5..82fadbb 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,12 +4,11 @@
-
+
-
+
-
-
+
@@ -25,7 +24,7 @@
@@ -59,7 +58,7 @@
"Vitest.mergeText.executor": "Run",
"Vitest.mergeText.should merge lines and preserve blank lines when deleteBlankLines is false.executor": "Run",
"Vitest.mergeText.should merge lines, preserve blank lines and trailing spaces when both deleteBlankLines and deleteTrailingSpaces are false.executor": "Run",
- "git-widget-placeholder": "4-convert-jpg-to-png",
+ "git-widget-placeholder": "main",
"ignore.virus.scanning.warn.message": "true",
"kotlin-language-version-configured": "true",
"last_opened_file_path": "C:/Users/HP/IdeaProjects/omni-tools/src/assets",
@@ -201,64 +200,6 @@
-
-
-
-
-
- 1719103372481
-
-
-
- 1719103372481
-
-
-
- 1719152057230
-
-
-
- 1719152057230
-
-
-
- 1719153044395
-
-
-
- 1719153044395
-
-
-
- 1719154187887
-
-
-
- 1719154187887
-
-
-
- 1719154927957
-
-
-
- 1719154927957
-
-
-
- 1719165093734
-
-
-
- 1719165093734
-
-
-
- 1719165600245
-
-
-
- 1719165600245
@@ -588,15 +529,71 @@
1719519913328
-
+
- 1719521563441
+ 1719586077004
- 1719521563441
+ 1719586077005
-
+
+
+ 1719587132558
+
+
+
+ 1719587132558
+
+
+
+ 1719587281298
+
+
+
+ 1719587281298
+
+
+
+ 1719588326608
+
+
+
+ 1719588326608
+
+
+
+ 1719588378907
+
+
+
+ 1719588378907
+
+
+
+ 1719588501953
+
+
+
+ 1719588501953
+
+
+
+ 1719588854025
+
+
+
+ 1719588854025
+
+
+
+ 1719589144843
+
+
+
+ 1719589144843
+
+
@@ -629,7 +626,6 @@
-
@@ -653,8 +649,9 @@
-
-
+
+
+
diff --git a/README.md b/README.md
index 1d6b1b4..ee58f81 100644
--- a/README.md
+++ b/README.md
@@ -54,6 +54,18 @@ npm run script:create:tool my-tool-name folder1/folder2
Use `folder1\folder2` on Windows
+### Run tests
+
+```bash
+npm run test
+```
+
+- For e2e tests
+
+```bash
+npm run test:e2e
+```
+
### Contributors
diff --git a/package.json b/package.json
index 663fe62..05f56b7 100644
--- a/package.json
+++ b/package.json
@@ -17,8 +17,7 @@
"build": "tsc && vite build",
"serve": "vite preview",
"test": "vitest",
- "test:e2e": "start-server-and-test dev http://localhost:5173 test:e2e:run",
- "test:e2e:run": "playwright test",
+ "test:e2e": "playwright test",
"test:ui": "vitest --ui",
"script:create:tool": "node scripts/create-tool.mjs",
"lint": "eslint src --max-warnings=0 --fix",
diff --git a/playwright.config.ts b/playwright.config.ts
index 8672300..9b0c4bc 100644
--- a/playwright.config.ts
+++ b/playwright.config.ts
@@ -6,9 +6,13 @@ export default defineConfig({
fullyParallel: true,
retries: 1,
use: {
- baseURL: 'http://localhost:5173',
+ baseURL: 'http://localhost:4173',
trace: 'on-first-retry'
},
+ webServer: {
+ command: 'npm run build && npm run serve',
+ url: 'http://localhost:4173'
+ },
projects: [
{
name: 'chromium',