Commit a33e3d2b by 张立顺

docs: refine boutique list source plan

1 parent 451d99df
...@@ -24,13 +24,12 @@ ...@@ -24,13 +24,12 @@
- Modify: `tabWorkOrder/pages/createOrder/services/customerDailyFields.helpers.js:190-203` - Modify: `tabWorkOrder/pages/createOrder/services/customerDailyFields.helpers.js:190-203`
- Modify: `tabWorkOrder/pages/tabWorkOrderRelevance/index.js:4,529-531` - Modify: `tabWorkOrder/pages/tabWorkOrderRelevance/index.js:4,529-531`
- Test: `tabWorkOrder/pages/createOrder/tests/customerDailyFields.helpers.test.mjs` - Test: `tabWorkOrder/pages/createOrder/tests/customerDailyFields.helpers.test.mjs`
- Test: `tabWorkOrder/pages/createOrder/tests/customerDailyFields.ui.test.mjs`
**Interfaces:** **Interfaces:**
- Consumes: `buildBoutiqueCustomerDailyDisplay(customer): BoutiqueCustomerDailyDisplay`. - Consumes: `buildBoutiqueCustomerDailyDisplay(customer): BoutiqueCustomerDailyDisplay`.
- Produces: `buildBoutiqueCustomerDailyListDisplay(orderItem = {}): BoutiqueCustomerDailyDisplay`. - Produces: `buildBoutiqueCustomerDailyListDisplay(orderItem = {}): BoutiqueCustomerDailyDisplay`.
- [ ] **Step 1: Add failing executable and page-contract tests** - [ ] **Step 1: Add the failing executable adapter test**
Add a helper test that calls the production adapter through the existing `customerDailyFields` namespace: Add a helper test that calls the production adapter through the existing `customerDailyFields` namespace:
...@@ -70,17 +69,15 @@ it('IT-WO-DAILY-019: boutique list reads daily fields only from nested customer' ...@@ -70,17 +69,15 @@ it('IT-WO-DAILY-019: boutique list reads daily fields only from nested customer'
}) })
``` ```
Extend `IT-WO-DAILY-UI-005` to read `../../tabWorkOrderRelevance/index.js` and assert that the list imports `buildBoutiqueCustomerDailyListDisplay` and calls it with the whole item `e`.
- [ ] **Step 2: Run the focused tests and verify RED** - [ ] **Step 2: Run the focused tests and verify RED**
Run: Run:
```bash ```bash
node --experimental-detect-module --test tabWorkOrder/pages/createOrder/tests/customerDailyFields.helpers.test.mjs tabWorkOrder/pages/createOrder/tests/customerDailyFields.ui.test.mjs node --experimental-detect-module --test tabWorkOrder/pages/createOrder/tests/customerDailyFields.helpers.test.mjs
``` ```
Expected: the new helper test fails because `buildBoutiqueCustomerDailyListDisplay` is not yet exported, and the UI contract fails because the list still calls `buildBoutiqueCustomerDailyDisplay(e.customer)`. Expected: the new helper test fails because `buildBoutiqueCustomerDailyListDisplay` is not yet exported.
- [ ] **Step 3: Implement the minimal nested-customer adapter** - [ ] **Step 3: Implement the minimal nested-customer adapter**
...@@ -103,7 +100,7 @@ e.customerDailyDisplay = buildBoutiqueCustomerDailyListDisplay(e) ...@@ -103,7 +100,7 @@ e.customerDailyDisplay = buildBoutiqueCustomerDailyListDisplay(e)
Run: Run:
```bash ```bash
node --experimental-detect-module --test tabWorkOrder/pages/createOrder/tests/customerDailyFields.helpers.test.mjs tabWorkOrder/pages/createOrder/tests/customerDailyFields.ui.test.mjs node --experimental-detect-module --test tabWorkOrder/pages/createOrder/tests/customerDailyFields.helpers.test.mjs
npm run test:createOrder npm run test:createOrder
npm test npm test
``` ```
...@@ -113,10 +110,10 @@ Expected: every command exits `0`; the new nested-customer contract passes and n ...@@ -113,10 +110,10 @@ Expected: every command exits `0`; the new nested-customer contract passes and n
- [ ] **Step 5: Commit only the implementation files** - [ ] **Step 5: Commit only the implementation files**
```bash ```bash
git add tabWorkOrder/pages/createOrder/services/customerDailyFields.helpers.js tabWorkOrder/pages/tabWorkOrderRelevance/index.js tabWorkOrder/pages/createOrder/tests/customerDailyFields.helpers.test.mjs tabWorkOrder/pages/createOrder/tests/customerDailyFields.ui.test.mjs git add tabWorkOrder/pages/createOrder/services/customerDailyFields.helpers.js tabWorkOrder/pages/tabWorkOrderRelevance/index.js tabWorkOrder/pages/createOrder/tests/customerDailyFields.helpers.test.mjs
git diff --cached --name-only git diff --cached --name-only
git diff --cached --check git diff --cached --check
git commit -m "fix: read boutique list fields from customer" git commit -m "fix: read boutique list fields from customer"
``` ```
Before committing, verify the staged file list contains exactly those four paths and excludes `config.js`. Before committing, verify the staged file list contains exactly those three paths and excludes `config.js`.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!