Fix Store tab stuck on Loading; adjustable idle time for family devices; videos count as in use
build-container / build (push) Successful in 3m35s
build-container / build (push) Successful in 3m35s
- A bare #/store now opens at #/store/books so the Book store page draws - Admins choose how long a family device waits before returning to the board (1 to 30 minutes) - Any playing video or audio keeps a family device signed in - Test updated Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4c6b1a8458
commit
aac6f6efc2
5 files changed
+18
-7
No files matched your search
@@ -35,6 +35,7 @@ const hub = http.createServer((req, res) => req.url.startsWith('/api/chores') ?
|
||||
assert.equal((await post('/api/device/pin', { pin: '12' }, session(bob))).status, 400, 'a PIN is 4 to 8 digits'); assert.equal((await post('/api/device/pin', { pin: '2468' }, session(bob))).status, 200); assert.equal((await call('/api/board?day=2026-10-26', {}, dev)).json.people.find(p => p.name === 'Bob').pinLen, 4, 'the board knows how many digits, to enter the PIN as soon as it is all typed');
|
||||
assert.equal((await post('/api/board/switch', { uid: bob.id, pin: '1111' }, dev)).status, 401); assert.equal((await post('/api/board/switch', { uid: bob.id, pin: '2468' }, dev)).status, 200);
|
||||
for (let i = 0; i < 5; i++) await post('/api/board/switch', { uid: bob.id, pin: '0000' }, dev); assert.equal((await post('/api/board/switch', { uid: bob.id, pin: '2468' }, dev)).status, 429, 'five wrong tries lock it for a few minutes');
|
||||
assert.equal((await call('/api/device', {}, session(ann) + '; ' + dev)).json.idleMin, 5, 'five idle minutes unless changed'); assert.equal((await post('/api/device/idle', { minutes: 2 }, session(bob))).status, 403); assert.equal((await post('/api/device/idle', { minutes: 7 }, session(ann))).status, 400, 'only the offered choices'); assert.equal((await post('/api/device/idle', { minutes: 2 }, session(ann))).status, 200); assert.equal((await call('/api/device', {}, session(ann) + '; ' + dev)).json.idleMin, 2, 'the new idle time sticks');
|
||||
assert.equal((await call('/api/device', {}, session(ann) + '; ' + dev)).json.devices.length, 1);
|
||||
r = await post('/api/device/remove', {}, session(ann) + '; ' + dev); assert.equal(r.status, 200); assert.equal((await call('/api/board', {}, dev)).status, 403, 'switched off: the old cookie no longer works');
|
||||
console.log('board ok');
|
||||
|
||||
Reference in new issue
Block a user