Skip to content

Commit e9cd2e7

Browse files
zhouLioncwandevpeoray
authored
feat: add web-preview component and related test cases, example, and doc (#28)
* feat: add WebPreview component and related subcomponents for enhanced web preview functionality * refactor: update props definition to use TypeScript interface for improved type safety * feat: integrate Vitest for testing and add web preview tests - Added Vitest configuration for testing with Playwright support. - Implemented test cases for WebPreview - Enhanced TypeScript configuration for JSX support. * feat: add web preview example component with navigation and console logs * feat: add WebPreview documentation and installation instructions * feat: convert WebPreview component to Vue 3 and update backend route handling * feat: add GitHub Actions workflow for testing with Node.js * refactor: enhanced WebPreview loading slot functionality * feat: add script to generate .code-group.md files for components * chore: resolved conflicts and move web-preview into vibe-coding folder * chore: install Playwright 1.56.1 dependencie * ci: make test github action work * chore: update Vitest configuration with path aliases for improved module resolution * chore: update Vitest configuration to use shadcn-vue path aliases * chore: removed irrelevant script code * chore: update WebPreviewUrl component Input class * chore(docs): update code blocks in web-preview.md for clarity --------- Co-authored-by: Charlie Wang <18888351756@163.com> Co-authored-by: Emmanuel Raymond <peoray@yahoo.com>
1 parent 0fff7f0 commit e9cd2e7

File tree

22 files changed

+1794
-85
lines changed

22 files changed

+1794
-85
lines changed

.github/workflows/test.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Test
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
name: Run Tests (Node.js ${{ matrix.node-version }})
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
node-version: [20, 22, 24]
19+
20+
steps:
21+
- name: Checkout Repo
22+
uses: actions/checkout@v5
23+
24+
- name: Setup pnpm
25+
uses: pnpm/action-setup@v4
26+
27+
- name: Setup Node.js ${{ matrix.node-version }}
28+
uses: actions/setup-node@v6
29+
with:
30+
node-version: ${{ matrix.node-version }}
31+
32+
- name: Install Dependencies
33+
run: pnpm i
34+
35+
- name: Install Playwright Browsers
36+
run: pnpm --filter @repo/elements exec playwright install --with-deps chromium
37+
38+
- name: Run Tests
39+
run: pnpm test

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,9 @@ dist-ssr
2828
.env
2929
.env.*
3030
!.env.example
31+
32+
# Testing
33+
coverage
34+
**/__screenshots__
35+
36+
.code-group.md

0 commit comments

Comments
 (0)