tracker
All repositories: gitoria
1.8 KB
// HM61: stable ties, repeated physical rows, paging, updates, and the photo snapshot.import { personsTable } from '../lib/shows.hl'import { noteViewRow, finishPeopleView, peoplePage, personTouched, peopleCount, photoQueueStart, photoQueueStep } from '../lib/people.hl'static seed = () => {let i = 0while (i < 63) {id = 'order-person-' + ip = { id = id name = 'Order ' + i urlSegment = 'order-' + i updatedAt = i < 30 ? 0 : (i < 50 ? 100 : 200) tmdbId = 70000000 + i oldId = id }personsTable.put(p)noteViewRow(&p)if (i == 5) { noteViewRow(&p) }i = i + 1}finishPeopleView()return true}static dump = (String label) => {if (peopleCount() != 64) { hlError(label + ': expected 64 entries') }console.log(label + ' count=' + peopleCount())for (page of ['1', '2', '3', '4', '0', '-1', 'bad']) {r = peoplePage(&page)out = []for (t of r.tiles) { out.push(t.href) }if (r.pages != 3 || r.tiles.length != (r.page == 3 ? 16 : 24)) { hlError(label + ': incorrect paging') }if (r.page == 1 && r.tiles[0].href != (label == 'initial' ? '/person/order-62' : '/person/order-new')) { hlError(label + ': incorrect first entry') }console.log(label + ' raw=' + page + ' page=' + r.page + ' pages=' + r.pages + ' ' + JSON.stringify(out))}return true}static run = () => {seed()dump('initial')c = photoQueueStart()personTouched('order-person-5')personTouched('order-person-12')personTouched('order-person-5')p = { id = 'new-order-person' name = 'New' urlSegment = 'order-new' tmdbId = 70009999 oldId = 'new-order-person' }personsTable.put(p)personTouched(&p.id)dump('updated')dump('revisit')while (!photoQueueStep(&c)) { }if (c.out.length != 64 || c.out[0] != 'order-person-62' || c.out[57] != 'order-person-5' || c.out[58] != 'order-person-5') { hlError('photo snapshot changed') }console.log('snapshot ' + JSON.stringify(c.out))return true}run()
Branches
Latest commits
- ec54fc35Move show page logic into the shows topicmre
- c1a8d074log: correct timesmre
- 5827eba9log: HM57 merged, HM59 startedmre
- d1a91be9Merge hm57-let: tracker#57 let only for reassigned namesmre
- a404ed75Report HM57 audit, gates and integration notesmre
- 1dcb87a7Use plain declarations for unchanged bindingsmre
- b90395e3log: HM51 mergedmre
- 9888d076Merge hm51-classes: tracker#51 views use Style referencesmre
- 4399bc2fReference remaining component-owned root Style rulesmre
- 9edcc2dflog: #58 live, HM57 startedmre
- 73fa20ddMerge hm49b-styles: tracker#49 rest of the component stylesmre
- aed12917Reference owned Style rules in genres and searchmre
- 14195720log: HM49B done, HM51 startedmre
- 78ee6b56Move remaining component styles into Style blocksmre
- 7f04de33log: HM49Bmre
- 00616cf3log: #49 batch merged, DP67 startedmre
- d7232e86Merge hm49-styles: tracker#49 first batch of component stylesmre
- 079f376dMove seven components' styles into Style blocksmre
- 17d66feelog: #58 mergedmre
- 69a6640bMerge hm58-map: tracker#58 project.hl only the mapmre