oneie 2.0.3 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +220 -29
- package/LICENSE.md +84 -0
- package/README.md +489 -931
- package/folders.yaml +78 -17
- package/one/.obsidian/workspace.json +6 -6
- package/one/events/CASCADE-2-BACKEND-AGNOSTIC.md +412 -0
- package/one/events/FEATURE-2-4-COMPLETE.md +302 -0
- package/one/events/FEATURE_2_3_COMPLETE.md +575 -0
- package/one/events/GROUPS-MIGRATION.md +625 -0
- package/one/events/INSTALL-TESTS.md +293 -0
- package/one/events/INTEGRATION-ARCHITECTURE.md +561 -0
- package/one/events/INTEGRATION-CHECKLIST.md +1234 -0
- package/one/events/INTEGRATION-ORCHESTRATION.md +2623 -0
- package/one/events/INTEGRATION-SUMMARY.md +653 -0
- package/one/events/MIGRATION-REPORT.md +435 -0
- package/one/events/MIGRATION.md +69 -0
- package/one/events/README-archived.md +519 -0
- package/one/events/TEST-SUMMARY.md +393 -0
- package/one/events/TESTS-QUICK-REF.md +262 -0
- package/one/groups/groups.md +543 -0
- package/one/knowledge/CLOUDFLARE_ENV_SETUP.md +49 -0
- package/one/knowledge/architecture-any-backend.md +1366 -0
- package/one/knowledge/docs/flow.md +0 -0
- package/one/knowledge/ontology-documentation.md +18 -18
- package/one/knowledge/ontology.md +154 -143
- package/one/knowledge/ontology.md.backup +2822 -0
- package/one/knowledge/ontology.yaml +87 -87
- package/one/knowledge/provider-creation-guide.md +1064 -0
- package/one/knowledge/todo.md +251 -0
- package/one/license.md +84 -0
- package/one/things/CHECKLIST.md +356 -0
- package/one/things/ONE.md +510 -0
- package/one/things/{cli.md → cli/cli.md} +27 -4
- package/one/things/features/2-1-dataprovider-interface.md +2358 -0
- package/one/things/features/2-2-config-system.md +3075 -0
- package/one/things/features/2-3-effectts-services.md +1498 -0
- package/one/things/features/2-4-react-hooks.md +2120 -0
- package/one/things/features/2-5-auth-migration.md +2046 -0
- package/one/things/features/2-6-dashboard-migration.md +1985 -0
- package/one/things/features/2-7-alternative-providers.md +2505 -0
- package/one/things/features/2-7-implementation-report.md +680 -0
- package/one/things/features/2-cli.md +39 -39
- package/one/things/features/2-design.md +1738 -0
- package/one/things/features/2-tests.md +520 -0
- package/one/things/features/AUTH_HOOKS_IMPLEMENTATION.md +521 -0
- package/one/things/features/DECOUPLING.md +272 -0
- package/one/things/features/DEPLOYMENT.md +452 -0
- package/one/things/features/IMPLEMENTATION_SUMMARY.md +316 -0
- package/one/things/features/dataprovider-interface/1-tests.md +1522 -0
- package/one/things/features/improve.md +843 -0
- package/one/things/features/remove-convex-deps.md +45 -0
- package/one/things/features/top-features.md +79 -0
- package/one/things/ideas/2-backend-agnostic-frontend.md +384 -0
- package/one/things/plans/2-backend-agnostic-frontend.md +543 -0
- package/one/things/plans/3-groups.md +502 -0
- package/one/things/plans/backend-agnostic-frontend.md +323 -0
- package/one/things/plans/deploy-to-cloudflare.md +581 -0
- package/one/things/plans/organizations-to-groups.md +705 -0
- package/one/things/plans/release.md +432 -0
- package/one/things/products/ontology.md +1 -1
- package/one/things/system.md +600 -0
- package/one/things/tests/2-1-dataprovider-interface.md +1144 -0
- package/one/things/tests/2-1-test-analysis.md +496 -0
- package/one/things/vision/elegant-interface.md +214 -0
- package/package.json +1 -1
- package/one/organisation/organisation.md +0 -438
- package/one/repomix-output.md +0 -92634
- /package/one/{things → connections}/agentkit.md +0 -0
- /package/one/{things → connections}/copilotkit.md +0 -0
- /package/one/{organisation → groups}/one.md +0 -0
- /package/one/{organisation → groups}/revenue.md +0 -0
- /package/one/{organisation → groups}/strategy.md +0 -0
- /package/one/{organisation → groups}/vision.md +0 -0
- /package/one/things/{cli-code.md → cli/cli-code.md} +0 -0
- /package/one/things/{cli-compiler-code.md → cli/cli-compiler-code.md} +0 -0
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
# Test Suite Installation Guide
|
|
2
|
+
|
|
3
|
+
Quick guide to install dependencies and run the comprehensive groups test suite.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
- Node.js 18+ installed
|
|
8
|
+
- Bun package manager installed (for frontend)
|
|
9
|
+
- Backend and frontend directories in place
|
|
10
|
+
|
|
11
|
+
## Backend Installation
|
|
12
|
+
|
|
13
|
+
### 1. Navigate to Backend
|
|
14
|
+
```bash
|
|
15
|
+
cd /Users/toc/Server/ONE/backend
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### 2. Install Dependencies
|
|
19
|
+
```bash
|
|
20
|
+
npm install
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
This will install:
|
|
24
|
+
- `vitest@^2.2.6` - Test framework
|
|
25
|
+
- `@vitest/coverage-v8@^2.2.6` - Coverage reporter
|
|
26
|
+
- `@types/node@^22.10.5` - TypeScript types
|
|
27
|
+
|
|
28
|
+
### 3. Verify Installation
|
|
29
|
+
```bash
|
|
30
|
+
npm test
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**Expected Output:**
|
|
34
|
+
```
|
|
35
|
+
✓ backend/convex/tests/groups-mutations.test.ts (15 tests)
|
|
36
|
+
✓ backend/convex/tests/groups-queries.test.ts (28 tests)
|
|
37
|
+
✓ backend/convex/tests/groups-integration.test.ts (12 tests)
|
|
38
|
+
|
|
39
|
+
Test Files 3 passed (3)
|
|
40
|
+
Tests 55 passed (55)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Backend Test Commands
|
|
44
|
+
```bash
|
|
45
|
+
# Run tests once
|
|
46
|
+
npm test
|
|
47
|
+
|
|
48
|
+
# Watch mode (re-run on changes)
|
|
49
|
+
npm run test:watch
|
|
50
|
+
|
|
51
|
+
# Generate coverage report
|
|
52
|
+
npm run test:coverage
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Frontend Installation
|
|
56
|
+
|
|
57
|
+
### 1. Navigate to Frontend
|
|
58
|
+
```bash
|
|
59
|
+
cd /Users/toc/Server/ONE/frontend
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### 2. Install Test Dependencies
|
|
63
|
+
```bash
|
|
64
|
+
bun add -D vitest @testing-library/react @testing-library/jest-dom @vitejs/plugin-react jsdom
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
This will install:
|
|
68
|
+
- `vitest` - Test framework
|
|
69
|
+
- `@testing-library/react` - React testing utilities
|
|
70
|
+
- `@testing-library/jest-dom` - DOM matchers
|
|
71
|
+
- `@vitejs/plugin-react` - React plugin for Vite
|
|
72
|
+
- `jsdom` - Browser environment simulation
|
|
73
|
+
|
|
74
|
+
### 3. Verify Installation
|
|
75
|
+
```bash
|
|
76
|
+
bun test test/groups
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Expected Output:**
|
|
80
|
+
```
|
|
81
|
+
✓ frontend/test/groups/components.test.tsx (29 tests)
|
|
82
|
+
✓ frontend/test/groups/workflows.test.tsx (16 tests)
|
|
83
|
+
✓ frontend/test/groups/pages.test.tsx (17 tests)
|
|
84
|
+
|
|
85
|
+
Test Files 3 passed (3)
|
|
86
|
+
Tests 62 passed (62)
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Frontend Test Commands
|
|
90
|
+
```bash
|
|
91
|
+
# Run groups tests once
|
|
92
|
+
bun test test/groups
|
|
93
|
+
|
|
94
|
+
# Watch mode (re-run on changes)
|
|
95
|
+
bun test test/groups --watch
|
|
96
|
+
|
|
97
|
+
# Generate coverage report
|
|
98
|
+
bun test test/groups --coverage
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Quick Start (All Tests)
|
|
102
|
+
|
|
103
|
+
Run both backend and frontend tests in one go:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# From project root
|
|
107
|
+
cd /Users/toc/Server/ONE
|
|
108
|
+
|
|
109
|
+
# Backend tests
|
|
110
|
+
(cd backend && npm test)
|
|
111
|
+
|
|
112
|
+
# Frontend tests
|
|
113
|
+
(cd frontend && bun test test/groups)
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Expected Results
|
|
117
|
+
|
|
118
|
+
### Backend (55 tests)
|
|
119
|
+
- ✅ Mutations: 15 tests
|
|
120
|
+
- ✅ Queries: 28 tests
|
|
121
|
+
- ✅ Integration: 12 tests
|
|
122
|
+
|
|
123
|
+
### Frontend (62 tests)
|
|
124
|
+
- ✅ Components: 29 tests
|
|
125
|
+
- ✅ Workflows: 16 tests
|
|
126
|
+
- ✅ Pages: 17 tests
|
|
127
|
+
|
|
128
|
+
### Total: 117 tests
|
|
129
|
+
|
|
130
|
+
## Troubleshooting
|
|
131
|
+
|
|
132
|
+
### Backend Issues
|
|
133
|
+
|
|
134
|
+
**Problem:** `Cannot find module 'vitest'`
|
|
135
|
+
```bash
|
|
136
|
+
cd backend
|
|
137
|
+
npm install
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**Problem:** Tests timeout
|
|
141
|
+
- Increase timeout in `vitest.config.ts`:
|
|
142
|
+
```typescript
|
|
143
|
+
test: {
|
|
144
|
+
testTimeout: 10000, // 10 seconds
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Frontend Issues
|
|
149
|
+
|
|
150
|
+
**Problem:** `Cannot find module '@testing-library/react'`
|
|
151
|
+
```bash
|
|
152
|
+
cd frontend
|
|
153
|
+
bun add -D @testing-library/react @testing-library/jest-dom jsdom
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**Problem:** `jsdom not found`
|
|
157
|
+
```bash
|
|
158
|
+
cd frontend
|
|
159
|
+
bun add -D jsdom
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Problem:** React import errors
|
|
163
|
+
- Ensure React 19 is installed:
|
|
164
|
+
```bash
|
|
165
|
+
bun add react@^19.1.1 react-dom@^19.1.1
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Directory Structure
|
|
169
|
+
|
|
170
|
+
After installation, your test structure should look like:
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
ONE/
|
|
174
|
+
├── backend/
|
|
175
|
+
│ ├── convex/
|
|
176
|
+
│ │ ├── tests/
|
|
177
|
+
│ │ │ ├── vitest.config.ts
|
|
178
|
+
│ │ │ ├── setup.ts
|
|
179
|
+
│ │ │ ├── groups-mutations.test.ts
|
|
180
|
+
│ │ │ ├── groups-queries.test.ts
|
|
181
|
+
│ │ │ ├── groups-integration.test.ts
|
|
182
|
+
│ │ │ └── README.md
|
|
183
|
+
│ │ ├── mutations/
|
|
184
|
+
│ │ │ └── groups.ts
|
|
185
|
+
│ │ └── queries/
|
|
186
|
+
│ │ └── groups.ts
|
|
187
|
+
│ ├── package.json (with vitest scripts)
|
|
188
|
+
│ └── node_modules/
|
|
189
|
+
│
|
|
190
|
+
└── frontend/
|
|
191
|
+
├── test/
|
|
192
|
+
│ └── groups/
|
|
193
|
+
│ ├── vitest.config.ts
|
|
194
|
+
│ ├── setup.ts
|
|
195
|
+
│ ├── components.test.tsx
|
|
196
|
+
│ ├── workflows.test.tsx
|
|
197
|
+
│ ├── pages.test.tsx
|
|
198
|
+
│ └── README.md
|
|
199
|
+
├── package.json
|
|
200
|
+
└── node_modules/
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## Coverage Reports
|
|
204
|
+
|
|
205
|
+
### Backend Coverage
|
|
206
|
+
```bash
|
|
207
|
+
cd backend
|
|
208
|
+
npm run test:coverage
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Report generated at: `backend/coverage/index.html`
|
|
212
|
+
|
|
213
|
+
### Frontend Coverage
|
|
214
|
+
```bash
|
|
215
|
+
cd frontend
|
|
216
|
+
bun test test/groups --coverage
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Report generated at: `frontend/coverage/index.html`
|
|
220
|
+
|
|
221
|
+
## Continuous Integration
|
|
222
|
+
|
|
223
|
+
### GitHub Actions Example
|
|
224
|
+
|
|
225
|
+
```yaml
|
|
226
|
+
name: Tests
|
|
227
|
+
|
|
228
|
+
on: [push, pull_request]
|
|
229
|
+
|
|
230
|
+
jobs:
|
|
231
|
+
backend:
|
|
232
|
+
runs-on: ubuntu-latest
|
|
233
|
+
steps:
|
|
234
|
+
- uses: actions/checkout@v3
|
|
235
|
+
- uses: actions/setup-node@v3
|
|
236
|
+
with:
|
|
237
|
+
node-version: '18'
|
|
238
|
+
- run: cd backend && npm install
|
|
239
|
+
- run: cd backend && npm test
|
|
240
|
+
|
|
241
|
+
frontend:
|
|
242
|
+
runs-on: ubuntu-latest
|
|
243
|
+
steps:
|
|
244
|
+
- uses: actions/checkout@v3
|
|
245
|
+
- uses: oven-sh/setup-bun@v1
|
|
246
|
+
- run: cd frontend && bun install
|
|
247
|
+
- run: cd frontend && bun test test/groups
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
## Next Steps
|
|
251
|
+
|
|
252
|
+
1. ✅ Install dependencies (above)
|
|
253
|
+
2. ✅ Run tests to verify
|
|
254
|
+
3. ✅ Review test coverage reports
|
|
255
|
+
4. ✅ Add tests to CI/CD pipeline
|
|
256
|
+
5. ✅ Write additional tests as needed
|
|
257
|
+
|
|
258
|
+
## Test Files Created
|
|
259
|
+
|
|
260
|
+
### Backend
|
|
261
|
+
- `/Users/toc/Server/ONE/backend/convex/tests/vitest.config.ts`
|
|
262
|
+
- `/Users/toc/Server/ONE/backend/convex/tests/setup.ts`
|
|
263
|
+
- `/Users/toc/Server/ONE/backend/convex/tests/groups-mutations.test.ts`
|
|
264
|
+
- `/Users/toc/Server/ONE/backend/convex/tests/groups-queries.test.ts`
|
|
265
|
+
- `/Users/toc/Server/ONE/backend/convex/tests/groups-integration.test.ts`
|
|
266
|
+
- `/Users/toc/Server/ONE/backend/convex/tests/README.md`
|
|
267
|
+
- `/Users/toc/Server/ONE/backend/package.json` (updated)
|
|
268
|
+
|
|
269
|
+
### Frontend
|
|
270
|
+
- `/Users/toc/Server/ONE/frontend/test/groups/vitest.config.ts`
|
|
271
|
+
- `/Users/toc/Server/ONE/frontend/test/groups/setup.ts`
|
|
272
|
+
- `/Users/toc/Server/ONE/frontend/test/groups/components.test.tsx`
|
|
273
|
+
- `/Users/toc/Server/ONE/frontend/test/groups/workflows.test.tsx`
|
|
274
|
+
- `/Users/toc/Server/ONE/frontend/test/groups/pages.test.tsx`
|
|
275
|
+
- `/Users/toc/Server/ONE/frontend/test/groups/README.md`
|
|
276
|
+
|
|
277
|
+
### Documentation
|
|
278
|
+
- `/Users/toc/Server/ONE/TEST-SUMMARY.md`
|
|
279
|
+
- `/Users/toc/Server/ONE/INSTALL-TESTS.md` (this file)
|
|
280
|
+
|
|
281
|
+
## Support
|
|
282
|
+
|
|
283
|
+
For issues or questions:
|
|
284
|
+
1. Check the README files in each test directory
|
|
285
|
+
2. Review the TEST-SUMMARY.md for overview
|
|
286
|
+
3. Check vitest documentation: https://vitest.dev
|
|
287
|
+
4. Check Testing Library docs: https://testing-library.com
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
**Installation Status: Ready to Install**
|
|
292
|
+
|
|
293
|
+
Run the commands above to install dependencies and start testing!
|