gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Main branchmaind2e6d26bMerge branch 'records-park55' into mainTrackermain/tests/people-order.hl

1.8 KB

  1. // HM61: stable ties, repeated physical rows, paging, updates, and the photo snapshot.
  2. import { personsTable } from '../lib/shows.hl'
  3. import { noteViewRow, finishPeopleView, peoplePage, personTouched, peopleCount, photoQueueStart, photoQueueStep } from '../lib/people.hl'
  4. static seed = () => {
  5. let i = 0
  6. while (i < 63) {
  7. id = 'order-person-' + i
  8. p = { id = id name = 'Order ' + i urlSegment = 'order-' + i updatedAt = i < 30 ? 0 : (i < 50 ? 100 : 200) tmdbId = 70000000 + i oldId = id }
  9. personsTable.put(p)
  10. noteViewRow(&p)
  11. if (i == 5) { noteViewRow(&p) }
  12. i = i + 1
  13. }
  14. finishPeopleView()
  15. return true
  16. }
  17. static dump = (String label) => {
  18. if (peopleCount() != 64) { hlError(label + ': expected 64 entries') }
  19. console.log(label + ' count=' + peopleCount())
  20. for (page of ['1', '2', '3', '4', '0', '-1', 'bad']) {
  21. r = peoplePage(&page)
  22. out = []
  23. for (t of r.tiles) { out.push(t.href) }
  24. if (r.pages != 3 || r.tiles.length != (r.page == 3 ? 16 : 24)) { hlError(label + ': incorrect paging') }
  25. if (r.page == 1 && r.tiles[0].href != (label == 'initial' ? '/person/order-62' : '/person/order-new')) { hlError(label + ': incorrect first entry') }
  26. console.log(label + ' raw=' + page + ' page=' + r.page + ' pages=' + r.pages + ' ' + JSON.stringify(out))
  27. }
  28. return true
  29. }
  30. static run = () => {
  31. seed()
  32. dump('initial')
  33. c = photoQueueStart()
  34. personTouched('order-person-5')
  35. personTouched('order-person-12')
  36. personTouched('order-person-5')
  37. p = { id = 'new-order-person' name = 'New' urlSegment = 'order-new' tmdbId = 70009999 oldId = 'new-order-person' }
  38. personsTable.put(p)
  39. personTouched(&p.id)
  40. dump('updated')
  41. dump('revisit')
  42. while (!photoQueueStep(&c)) { }
  43. 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') }
  44. console.log('snapshot ' + JSON.stringify(c.out))
  45. return true
  46. }
  47. run()

Branches

Latest commits

  • d2e6d26bMerge branch 'records-park55' into mainTracker
  • f567f025|||PR records: park #55, no Claude workers ruleTracker
  • c21aff6bMerge branch 'records-hm55c' into mainTracker
  • 9ba258d3|||PR records: HM55b resultTracker
  • 64f2d300Merge branch 'records-hm55b2' into mainTracker
  • ae3b80dc|||PR records: HM55b briefTracker
  • 7ef3cb3bMerge branch 'records-st55' into mainTracker
  • fec2e080|||PR records: STATUS HM55Tracker
  • 8e174918Merge branch 'records-hm55b' into mainTracker
  • b1ecee57|||PR records: HM55 stateTracker
  • 28eab08cMerge branch 'records-hm55' into mainTracker
  • d3edaa05|||PR records: HM55 start, PROCEDURES.mdTracker
  • 3059f86cMerge branch 'records-design-rule' into mainTracker
  • 421a4809|||PR records: his-design rule (Apollo 2026-11-13)Tracker
  • d1390692Merge branch 'records-dp75b' into mainTracker
  • a4d1a7d2|||PR records: later steps checked, branch auditTracker
  • e070e16fMerge branch 'records-dp75' into mainTracker
  • 642b4fa8|||PR records: DP75 day62 live, AP62 briefTracker
  • bfc4ea4dMerge branch 'ap62' into mainTracker
  • 2c95ac46|||PR AP62: re-vendor Hybriel set day62 (source 70341ad2, bin a54f5f08)Tracker