• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kobotoolbox / kpi / 29409608300
82%
master: 76%

Build:
Build:
LAST BUILD BRANCH: leszek/dev-1406-bulk-job-alert-nlp-view
DEFAULT BRANCH: master
Ran 15 Jul 2026 10:56AM UTC
Jobs 10
Files 894
Run time 3min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Jul 2026 10:51AM UTC coverage: 81.514% (-0.01%) from 81.528%
29409608300

push

github

web-flow
test(frontend): use orval to generate MSW mocks DEV-2232 (#7219)

### 📣 Summary

Migrates from manually maintained API mocks to Orval-generated ones for
type-safe mocking in Storybook stories and tests. Ensures OpenAPI schema
is the single source of truth for both API types and mock data.

### 💭 Notes

Changes in this branch are quite extensive. Unfortunatelly enabling mock
generation through Orval spilled into type inconsistencies that needed
to be addressed.

**Orval MSW Integration**
- Configured Orval to generate TypeScript types and MSW v2 mock handlers
from OpenAPI schema
- Generated TypeScript model files in `jsapp/js/api/models/`
- Generated complete MSW handlers with mock factories in
`jsapp/js/api/react-query/`
- Updated all existing `.mocks.ts` files to use Orval-generated
factories instead of manual mocks

**Mock Generation Strategy**
- `mode: 'tags-split'` - Generates mocks in separate files to prevent
bundling faker/msw (~600KB) in production
- Structure: `react-query/module-name/index.ts` (runtime) +
`react-query/module-name/msw.ts` (mocks)
- Enables proper tree-shaking - production code never imports test
dependencies
- Mock imports: `from '#/api/react-query/module-name/msw'`
- Runtime imports unchanged: `from '#/api/react-query/module-name'`

**Post-Processing Scripts** (6 scripts run after Orval generation)
1. `orval-rename-to-index.js` - Renames `module/module.ts` →
`module/index.ts`, `module/module.msw.ts` → `module/msw.ts` for clean
imports
2. `orval-fix-referenced-additional-properties.js` - Fixes Orval bug
with `$ref` in `additionalProperties` ([issue
#1077](https://github.com/orval-labs/orval/issues/1077))
3. `orval-fix-mock-factory-type-assertions.js` - Adds `as TypeName` for
types with conflicting index signatures (updated for new file structure)
4. `orval-make-trailing-slash-optional.js` - Makes trailing slashes
optional in MSW URL patterns (Django REST Framework compatibility)
5. `orval-remove-mock-delays.js` - Removes `awa... (continued)

9363 of 12697 branches covered (73.74%)

23 of 41 new or added lines in 5 files covered. (56.1%)

4 existing lines in 2 files now uncovered.

30422 of 37321 relevant lines covered (81.51%)

5.52 hits per line

Uncovered Changes

Lines Coverage ∆ File
17
72.51
-3.23% kpi/schema_extensions/v2/assets/extensions.py
1
79.31
0.0% kpi/schema_extensions/v2/me/extensions.py

Coverage Regressions

Lines Coverage ∆ File
3
72.51
-3.23% kpi/schema_extensions/v2/assets/extensions.py
1
66.67
0.0% kpi/schema_extensions/v2/data/extensions.py
Jobs
ID Job ID Ran Files Coverage
1 29409608300.1 15 Jul 2026 10:56AM UTC 890
52.98
2 29409608300.2 15 Jul 2026 10:56AM UTC 890
44.42
3 29409608300.3 15 Jul 2026 10:57AM UTC 890
49.57
4 29409608300.4 15 Jul 2026 10:58AM UTC 892
54.23
5 29409608300.5 15 Jul 2026 10:58AM UTC 892
50.89
6 29409608300.6 15 Jul 2026 10:58AM UTC 892
45.78
7 29409608300.7 15 Jul 2026 10:59AM UTC 890
59.23
8 29409608300.8 15 Jul 2026 11:00AM UTC 892
66.71
9 29409608300.9 15 Jul 2026 11:01AM UTC 894
69.01
10 29409608300.10 15 Jul 2026 11:01AM UTC 892
60.38
Source Files on build 29409608300
  • Tree
  • List 894
  • Changed 8
  • Source Changed 0
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • b3744850 on github
  • Prev Build on main (#29401900122)
  • Next Build on main (#29418843892)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc