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

kobotoolbox / kpi / 12636459988
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: beccagraber/dev-1497-show-most-recently-created-qual-answer
DEFAULT BRANCH: master
Ran 06 Jan 2025 05:16PM UTC
Jobs 1
Files 622
Run time 2min
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

06 Jan 2025 04:39PM UTC coverage: 80.465%. Remained the same
12636459988

push

github

web-flow
refactor(library locking): migrate files to TypeScript (#5405)

### 💭 Notes
Migrating files to TS introduced some non-trivial changes, like:
- `enum` introduction required some parts of the code to be rewritten
(more `if`'s etc.)
- mocks file had to be rewritten from scratch, as the asset responses
there were extremely outdated and incomplete

### 👀 Preview steps
There is a nice long [Library Locking Technical Reference
article](https://kobotoolbox.github.io/articles/library-locking-technical-reference)
that I feel would be very helpful here :)

Some useful templates for testing:
- [locking template 1
(lock_all).xls](https://github.com/user-attachments/files/18306729/locking.template.1.lock_all.xls)
- [locking template 2 (profile,
language_edit).xls](https://github.com/user-attachments/files/18306730/locking.template.2.profile.language_edit.xls)
- [locking template 3
(profile).xlsx](https://github.com/user-attachments/files/18306731/locking.template.3.profile.xlsx)

Testing:
1. Upload one of the above templates (__no drag&drop!__) using "My
Library" > "NEW" > "Upload file" with "Upload as template" checked
(__important!__ as without this, all locking features would be stripped
by BE code).
6. Open the template in Form Builder
7. 🟢 notice that locking features work as expected (see Technical
Reference linked above)
8. Go to "My Library".
9. For the locked template in the list use "Create project" button.
10. Open the newly created project in Form Builder.
11. 🟢 notice that locking features work as expected

There are three __fixes__ in this PR (_mea culpa_ for not splitting).

__First fix__: I changed how `isAssetLockable` works, by extending it to
also include `template`s (previously only allowed `survey`s). This
function works like a feature flag -ish, and I've noticed that with a
template that is fully locked (has `lock_all: true`), the Form Builder
sidebar wasn't all disabled.

__Second fix__: in the same ar... (continued)

5792 of 9279 branches covered (62.42%)

22164 of 27545 relevant lines covered (80.46%)

0.8 hits per line

Jobs
ID Job ID Ran Files Coverage
1 12636459988.1 06 Jan 2025 05:16PM UTC 622
80.46
Source Files on build 12636459988
  • Tree
  • List 622
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 522a7756 on github
  • Prev Build on main (#12616919643)
  • Next Build on main (#12658695787)
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

© 2025 Coveralls, Inc