Skip to content

Add missing smoke and CRUD tests, fix two vacuous tests - #57

Closed
dave-mills wants to merge 2 commits into
devfrom
test-update
Closed

Add missing smoke and CRUD tests, fix two vacuous tests#57
dave-mills wants to merge 2 commits into
devfrom
test-update

Conversation

@dave-mills

Copy link
Copy Markdown
Member

Implements docs/plans/MISSING_SMOKE_CRUD_TESTS.md — the follow-up audit of the original smoke/CRUD test plans. Smoke + CRUD suites go from 77 to 85 tests, all passing.

New tests

Smoke — PublicRoutesTest

  • root path redirects to app login/ is now a redirect to /app (adapted from the obsolete "cover page loads" item).

Admin CRUD

  • Dataset: create dataset requires name, can edit dataset
  • Program: program list links to program panel — asserts the rendered list contains the program/{id} record URL from the recordUrl override
  • XlsformModule: can delete xlsform module via the grouped DeleteBulkAction (the table has no row delete and no create action)

App CRUD

  • Farm: can bulk delete farm — builds the LocationLevel → Location → Farm chain manually (no Farm factory)
  • ChoiceListEntry: create via table header action, edit and delete via row actions, all on team-owned entries (row actions are hidden for global entries). Teams auto-get an English locale, so the label repeater needs exactly one language string — passed as form data on create, seeded on the entry for edit.

Fixed vacuous tests (AdminPanelCrudTest, XlsformModuleVersion block)

  • Deleted the duplicate can create xlsform module version — it asserted a xlsform_modules row the beforeEach had already created.
  • Reworked can delete xlsform module into can delete xlsform module version — it previously asserted against the wrong table (xlsform_modules), so it passed without testing the delete.

Other

  • tests/TestCase.php: declared shared $choiceList property (matches the existing $team/$xlsformTemplate pattern; keeps phpstan clean).
  • Skipped the optional HddsHints smoke test — its mount() 404s without an HDDS module version linked to a deployed xlsform (noted in AppPanelTest).
  • Both original plans (SMOKE_TESTS.md, CRUD_TESTS.md) marked Completed, with obsolete items listed; change log at docs/change-logs/missing-smoke-crud-tests.md.

Verification

  • pest tests/Feature/Smoke tests/Feature/Crud: 85 passed
  • phpstan: no new errors; pint: applied
  • Full suite: 3 pre-existing failures in TranslationImportTest/XlsformTemplateImportTest (broadcast to a local Reverb server on port 8080) — unrelated to this change.

dave-mills and others added 2 commits July 29, 2026 16:14
Implements docs/plans/MISSING_SMOKE_CRUD_TESTS.md:

- Smoke: root path redirects to app login (adapted from removed cover page)
- Admin CRUD: dataset name-required + edit, program record URL, xlsform
  module bulk delete
- Admin CRUD fixes: delete duplicate vacuous module-version create test;
  rework wrong-table delete test into 'can delete xlsform module version'
- App CRUD: farm bulk delete, choice list entry create/edit/delete
- TestCase: declare shared $choiceList property

Smoke + CRUD suites: 77 -> 85 tests, all passing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@dave-mills dave-mills closed this Jul 30, 2026
@dave-mills
dave-mills deleted the test-update branch July 30, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant