Skip to content

Commit 2514638

Browse files
committed
fix(extension-manager): expose cards and run CT in CI
1 parent ad7e8e0 commit 2514638

4 files changed

Lines changed: 48 additions & 4 deletions

File tree

.github/workflows/pr-ci-e2e-test.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,18 @@ jobs:
4747
cd packages/test
4848
npx playwright install --with-deps chromium
4949
50-
- name: Run Playwright Tests
51-
run: pnpm test
50+
- name: Run Playwright E2E Tests
51+
run: pnpm -F tiny-robot-test test:e2e
52+
53+
- name: Run Playwright Component Tests
54+
run: pnpm -F tiny-robot-test test:ct
5255

5356
- name: Upload Playwright Test Report
5457
uses: actions/upload-artifact@v6
5558
if: always()
5659
with:
5760
name: playwright-report-${{ github.sha }}
58-
path: packages/test/playwright-report/
61+
path: |
62+
packages/test/playwright-report/
63+
packages/test/component/playwright-report/
5964
retention-days: 13
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import type { App } from 'vue'
2+
import { ExtensionCard as ExtensionCardComp, ExtensionCardGrid as ExtensionCardGridComp } from './components'
3+
4+
export * from './index.type'
5+
6+
ExtensionCardComp.name = 'TrExtensionCard'
7+
8+
const extensionCardInstall = function <T>(app: App<T>) {
9+
app.component(ExtensionCardComp.name!, ExtensionCardComp)
10+
}
11+
12+
const ExtensionCard = ExtensionCardComp as typeof ExtensionCardComp & {
13+
install: typeof extensionCardInstall
14+
}
15+
16+
ExtensionCard.install = extensionCardInstall
17+
18+
ExtensionCardGridComp.name = 'TrExtensionCardGrid'
19+
20+
const extensionCardGridInstall = function <T>(app: App<T>) {
21+
app.component(ExtensionCardGridComp.name!, ExtensionCardGridComp)
22+
}
23+
24+
const ExtensionCardGrid = ExtensionCardGridComp as typeof ExtensionCardGridComp & {
25+
install: typeof extensionCardGridInstall
26+
}
27+
28+
ExtensionCardGrid.install = extensionCardGridInstall
29+
30+
export { ExtensionCard, ExtensionCardGrid }

packages/components/src/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import ThemeProvider from './theme-provider'
2222
import Welcome from './welcome'
2323
import McpServerPicker from './mcp-server-picker'
2424
import McpAddForm from './mcp-add-form'
25+
import { ExtensionCard, ExtensionCardGrid } from './extension-manager'
2526
import {
2627
ActionButton,
2728
SubmitButton,
@@ -54,6 +55,7 @@ export * from './theme-provider/index.type'
5455
export * from './welcome/index.type'
5556
export * from './mcp-server-picker/index.type'
5657
export * from './mcp-add-form/index.type'
58+
export * from './extension-manager/index.type'
5759

5860
export { useSenderContentRegistration } from './shared/composables/useSenderContentRegistration'
5961
export type { SenderContentRegister } from './shared/composables/useSenderContentRegistration'
@@ -100,6 +102,8 @@ const components = [
100102
Welcome,
101103
McpServerPicker,
102104
McpAddForm,
105+
ExtensionCard,
106+
ExtensionCardGrid,
103107
ActionButton,
104108
SubmitButton,
105109
ClearButton,
@@ -171,6 +175,10 @@ export {
171175
McpServerPicker as TrMcpServerPicker,
172176
McpAddForm,
173177
McpAddForm as TrMcpAddForm,
178+
ExtensionCard,
179+
ExtensionCard as TrExtensionCard,
180+
ExtensionCardGrid,
181+
ExtensionCardGrid as TrExtensionCardGrid,
174182
ActionButton,
175183
ActionButton as TrActionButton,
176184
SubmitButton,

packages/test/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"dev": "vite",
88
"build": "vue-tsc && vite build",
99
"preview": "vite preview",
10-
"test": "playwright test",
10+
"test": "pnpm run test:e2e && pnpm run test:ct",
11+
"test:e2e": "playwright test",
1112
"test:ct": "playwright test -c playwright-ct.config.ts",
1213
"test:ui": "playwright test --ui",
1314
"test:codegen": "playwright codegen localhost:3333",

0 commit comments

Comments
 (0)