Bug #157 » README.md
type: redmine-readme
project: Endress + Hauser
subject: Wizard end-to-end Playwright suite and the fixes it drove
story_key: dc-wizard-e2e-tests
generated_at: 2026-10-16T16:56:59+05:30
story_type: task
attachments:
- file: dc-wizard-e2e-tests_20261016-1656__dc_wizard_test_report.html
description: Consolidated report of the 100 end-to-end cases, scenarios, results and defects fixed
Wizard end-to-end Playwright suite and the fixes it drove
A 100-case browser test suite that drives the real wizard, and the defects it found and fixed.
1. Summary
The user asked for full UI testing of the wizard in a visible browser (first on 10 Sep, then again on 5 Oct for every scenario and edge case). A Playwright suite of 100 cases was built: 10 spec files covering Start, Header, Items, Movement, Review, the Outward and Inward lifecycles, returns and redirects, and cross-cutting edge cases. Setup uses the API for speed and the checks use the real UI. The final run passed 100 of 100, run headless because the WSLg display stopped responding. An earlier headed run passed 96 of 100; the 4 misses were the browser window closing mid-run and they passed when re-run. The run found seven defects, all fixed in the working tree (listed below). Test documents were left on the site on purpose. The suite itself lived in a temporary scratch folder that no longer exists, so it is not in the repo.
2. Requirement
| # | Requirement | Source | Status |
|---|---|---|---|
| R1 | Run end-to-end UI tests covering all scenarios and edge cases with Playwright | User, 5 Oct (and 10 Sep) | Done |
| R2 | Run in head mode so the browser can be watched | User, 5 Oct | Partial: final run headless |
| R3 | Run cases one by one with results and scenarios and prepare a consolidated report | User, 5 Oct | Done |
| R4 | Keep the test data on the site | User, 5 Oct | Done |
3. Decisions
| Decision | Options considered | Why this one | Date |
|---|---|---|---|
| One worker, serial order | Parallel | Cases create real documents and several depend on workflow state | 2026-10-05 |
| API-driven setup, UI-driven assertions | UI for all setup | Speed; the UI under test is still exercised | 2026-10-05 |
| Do not clean up test documents | Delete PWTEST data | User said not to remove cases or data | 2026-10-05 |
| Fix the product when a test exposes a real defect, fix the test when the test was wrong | Skip failing cases | Goal was a trustworthy result | 2026-10-05 |
4. Logic & Workflow
Defects found by the suite and fixed:
- Partial return failed on create: Qty Received kept the original value when Qty was edited. Now follows Qty on return rows.
- Pre-filled addresses were sometimes blanked: the title of a Business Partner was read instead of its ID. Handlers now use the ID.
- Edit on Start wiped all entered data. Start now keeps the current choice and data unless a different mode is chosen.
- Estimated Return Date stayed hidden on returnable DC types (race with the Returnable value).
- Server errors showed as "Validation failed." Real messages are shown and the duplicate pop-up is suppressed.
- E-Way Bill Sub Type was free text for a Link to Supply Type. Now a Link control.
- GST Rate column after Unit Cost broke Tab order; moved after HSN.
5. Files & Components Changed
| File / DocType / Fixture | Type | Change | Purpose |
|---|---|---|---|
| canofy_custom_eh/public/js/dc_wizard_common.js | Shared JS | Changed | Server message parsing, silent calls, Qty Received rule, GST column order |
| canofy_custom_eh/canofy_custom_eh/page/delivery_challan_wizard/delivery_challan_wizard.js | Page JS | Changed | Start restore, ID-based handlers, return-date race, Sub Type link |
| Playwright suite (10 spec files, helpers, config) | Tests | New | Not in the repo; its scratch folder is gone |
6. Configuration & Deployment
The suite needed a Playwright Chromium build and the Administrator login on the dev site. Credentials are not recorded here. Config used one worker, HEADLESS=1 for headless runs and a slow-motion setting for headed runs.
7. Testing
| Test | Data / Site | Expected | Actual | Status |
|---|---|---|---|---|
| Full suite, headless, one worker | frappe.local, 5 Oct | 100 pass | 100 passed in 19.3 min, 0 failed, 0 flaky | PASS |
| Full suite, headed | frappe.local, 5 Oct | 100 pass | 96 passed; 4 failed from browser window closing; re-run passed | PASS on re-run |
| Backend unit tests | frappe.local | 30 pass | 30 pass | PASS |
8. Known Limitations & Open Items
- The suite sources are lost and would need rebuilding to re-run. The consolidated report is attached.
- The final run was headless because the WSLg display stopped responding.
- The DC Type fixture's
default_eway_bill_sub_type("Exhibition or Fairs (Outward)") is not a valid Supply Type. Not changed. - Uncommitted (working tree of the feature branch) at the time this README was generated.
9. Status
| Item | Value |
|---|---|
| Branch | claude/delivery-challan-wizard-bcb464 |
| Commits | None yet |
| PR | None |
| Version | Not confirmed |
| Deployed to | Local dev site only |
10. References
- Consolidated report page: https://claude.ai/artifact/KkM4TyoVbiSvAHvJoyNoRt (private to the owner)
- Related: all other
dc-wizard-*stories