• Mahmoud Aglan's avatar
    test(branch): check the records a screen is handed, not the markup it prints · 20c5cf15
    Mahmoud Aglan authored
    Reported: the weekly schedule shows a schedule on a branch that was never
    scheduled. Investigated against a restored tenant and the component is correct —
    branch 2 gets only branch 2's sessions, and a branch with nothing gets an empty
    grid. But chasing it found a real hole in the suite.
    
    BranchScopedScreensTest searches rendered HTML for another branch's uuids. The
    weekly schedule grid prints group names and times and no uuid at all, and
    training_sessions was not even among the tables it collected uuids for. A
    foreign session sitting in that grid would have left nothing in the markup to
    search for, and the suite would have stayed green while the screen was wrong.
    Several other grids and calendars are the same shape.
    
    So this asserts one level earlier, on the objects rather than the markup. Every
    component reachable at a parameterless URL is mounted under every branch, the
    data handed to its views is captured through a view composer, and every model in
    it that carries a branch_id must belong to the active branch — or be null only
    where null still means "every branch" (people and the academy calendar), or
    belong to a model that declares BRANCH_SCOPE_EXEMPT. It reads that declaration
    rather than keeping a second list that would drift away from it.
    
    Components come from the router rather than a hand-written list, so a screen
    added next month is covered without anyone remembering.
    
    1,188 component mounts across nine branches, 9.5M records inspected, no screen
    handing its view another branch's record.
    Co-Authored-By: 's avatarClaude Opus 5 (1M context) <noreply@anthropic.com>
    20c5cf15
Name
Last commit
Last update
Screenshots Loading commit data...
app Loading commit data...
bootstrap Loading commit data...
config Loading commit data...
database Loading commit data...
docker Loading commit data...
docs Loading commit data...
docs-site Loading commit data...
flutter_shell Loading commit data...
gap-filling-plans Loading commit data...
lang Loading commit data...
marketing-site Loading commit data...
plans Loading commit data...
public Loading commit data...
reference/oc-sport Loading commit data...
resources Loading commit data...
routes Loading commit data...
scripts Loading commit data...
storage Loading commit data...
tests Loading commit data...
.dockerignore Loading commit data...
.editorconfig Loading commit data...
.env.example Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.npmrc Loading commit data...
Beanding Guide.txt Loading commit data...
CLAUDE.md Loading commit data...
Dockerfile Loading commit data...
README.md Loading commit data...
artisan Loading commit data...
captain-definition Loading commit data...
composer.json Loading commit data...
composer.lock Loading commit data...
deploy.sh Loading commit data...
elcaptain-sportsonly-db.md Loading commit data...
one-click-app.yml Loading commit data...
package-lock.json Loading commit data...
package.json Loading commit data...
phpunit.xml Loading commit data...
system info.txt Loading commit data...
vite.config.js Loading commit data...
نادى الشيخ زايد كشف بيانات اللاعبين (2).html Loading commit data...