FiCl Dev Blog한국어

[PR #249·254·255·260] Four Tests That Joined Screens Built on Fake Responses to the Real Server

Work completed 2026-11-22 04:04 KST · Published 2026-11-22 13:15 KST · AI model used for the work Claude Sonnet 5.5, Claude Opus 5.5

[PR #249·254·255·260] Four Tests That Joined Screens Built on Fake Responses to the Real ServerSummary. An integration test of the customer app's API functions against the real server, admin web flow tests and matching the server, a server flow test that checks the plan follows date changes, and matching the calculation to the 2022 sheetPR #249·254·255·260Screens Built on Fake Responses,Joined to the Real ServerCustomer app → admin web → date flow → sheet checkI pointed tothe originalClaude testedand checkedCodex builtand testedAppWebDatesSheetⅠCustomer appPR 249: APIintegration test1Same request number, one recordSending again returns the samerecord; the list holds one2The plan comes with a refusalA drop above thestarting countis refused, withthe plan returnedⅡAdmin webPR 254: threePlaywright flows3From approval to plan basisClaude wrote the tests;Codex matched the server4Device response shape differedThe fake response drifted fromthe server; now the real shapeⅢDate flowPR 255: serverflow test5Start date one day earlierRecalculated at day 11 as v2;v1 becomes past6No request to close a cycleThe test closesit in the databasewith a comment saying whyⅣSheet checkPR 260: the2022 sheet7Days 35 and 56 already matchedThe conductor session readfour rows from the original8Two cases for days 70 and 84Temperature rule cases stay;sheet-temperature cases addedKey: when tests decide the fake responses, they drift from theserver. Connect to the real response as soon as the server exists.FiCl Dev Blog · Post summary figure
[PR #249·254·255·260] Four Tests That Joined Screens Built on Fake Responses to the Real ServerSummary. An integration test of the customer app's API functions against the real server, admin web flow tests and matching the server, a server flow test that checks the plan follows date changes, and matching the calculation to the 2022 sheetPR #249·254·255·260Screens Built on Fake Responses,Joined to the Real ServerCustomer app → admin web → date flow → sheet checkI pointed tothe originalClaude testedand checkedCodex builtand testedAppWebDatesSheetⅠCustomer appPR 249: APIintegration test1Same request number, one recordSending again returns the samerecord; the list holds one2The plan comes with a refusalA drop above thestarting countis refused, withthe plan returnedⅡAdmin webPR 254: threePlaywright flows3From approval to plan basisClaude wrote the tests;Codex matched the server4Device response shape differedThe fake response drifted fromthe server; now the real shapeⅢDate flowPR 255: serverflow test5Start date one day earlierRecalculated at day 11 as v2;v1 becomes past6No request to close a cycleThe test closesit in the databasewith a comment saying whyⅣSheet checkPR 260: the2022 sheet7Days 35 and 56 already matchedThe conductor session readfour rows from the original8Two cases for days 70 and 84Temperature rule cases stay;sheet-temperature cases addedKey: when tests decide the fake responses, they drift from theserver. Connect to the real response as soon as the server exists.FiCl Dev Blog · Post summary figure

Until now, the sub-milestone 3 screens (the feature that calculates and records the daily plan) were tested only with fake responses (server answers that the tests decide in advance). These four PRs joined those screens to the real server. In order: a customer app integration test (PR 249), admin web flow tests (PR 254), a server flow test that changes dates to see whether the plan follows (PR 255), and a check of the calculation against the 2022 sheet (PR 260).

The models differ by PR. Everything ran on my Windows computer.

PR What was tested Written by Result
249 The customer app’s API functions against the real server Claude (tests) 16 tests passed three times in a row
254 Three admin web flows (Playwright) and matching the server Claude (tests), Codex (implementation) npm run e2e: 10 passed; 1 review finding fixed
255 Whether the plan follows date changes (server) Codex (tests) 5 new tests passed with no server code change
260 Matching the calculation to the 2022 sheet Conductor session (tests) 49 passed, including 2 new cases

PR 249: Holding the customer app’s API functions up to the real server

What and why

Claude added an integration test (apps/app/integration/detail3.test.ts) that runs the customer app’s server functions (src/api/endpoints.ts) against the real server, to see whether both sides speak the same shape. No code changed. There are four tests.

  1. When the admin approves a calculation standard and enters the start information, today’s plan shows 4 rounds. Recording a round turns it into “recorded” and raises today’s total. Sending again with the same request number returns the same record, and the list holds only one. Recording the same round with a new number is refused with 409 (already exists).
  2. Recording a count change lowers today’s planned total.
  3. Recording a drop larger than the starting count is refused, and the existing plan comes back with it. This is why the customer app screen can show the refusal message and the plan together.
  4. Four devices come back. A refill up to the maximum capacity is saved, and one above it is refused with 400. A refill with zero water and zero product is refused. Sending twice with the same request number still saves one, and device input is added to the “input since the last refill” total.

Approach and rejected alternatives

How it was checked

PR 254: Admin web flow tests (Playwright) and matching the server

What and why

Three admin web flow tests (apps/admin/e2e/detail3.spec.ts) were written with Playwright (a test tool that clicks through a browser automatically). In this PR, Claude wrote the tests and Codex did the implementation.

  1. Create two input materials → paste rates into a calculation standard draft and set the mix → approve → accept an invitation → enter the start date, start information and starting days elapsed → create a plan with a weight record and a today’s-plan request (sent straight to the server in place of the customer app) and leave an input record → check count, days elapsed (11), weight (recorded) and rate under “plan basis” in the work record detail.
  2. Rename the product on device B → check that “device settings changed” appears in the history.
  3. Save the planned start date → start date → planned send-out date on screen and check them in the module tab and history.

Codex built the server seed (data loaded when the tests start: 4 devices, 2 modules, 1 customer with a pending invitation) and matched the admin web to the server.

Approach and rejected alternatives

How it was checked

PR 255: Checking on the server that the plan follows date changes

What and why

This work checks in one go, on the server side, the “dates → plan” flow that the admin web had put off, and adds 2022 sheet cases to the calculation tests. In this PR, Codex wrote the tests and the implementation side did not edit them.

The flow test changes dates and watches whether the plan follows.

  1. With only a planned start date, there is no plan today and “no start information” is shown.
  2. After entering the start date, start information and starting days elapsed, today’s plan version 1 appears (day 10).
  3. Moving the start date one day earlier recalculates at day 11 and makes version 2 (total 1.8 → 3.6 kg); version 1 becomes past.
  4. After closing the cycle and moving to the next day, it shows “no start information” again and makes no plan.

The calculation tests gained values for days 35, 70 and 84 of the 2022 sheet, computed with the formula in the reference data document. A case where a temperature missing from a small temperature table means no calculation was added too.

Approach and rejected alternatives

How it was checked

PR 260: Matching the calculation to the 2022 sheet

What and why

One of the sub-milestone 3 completion criteria is “the calculation matches the 2022 sheet values.” PR 255 built its cases from the formula because the original sheet was missing, so the criterion had not yet been checked against the sheet itself. I pointed to the shared drive that holds the original, and the conductor session read the rows for days 35, 56, 70 and 84 (weight, total weight, rate, temperature, daily amount) from the original sheet.

Approach and rejected alternatives

How it was checked

Lessons