https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41294

--- Comment #20 from Matt Blenkinsop <[email protected]> ---
Created attachment 210616
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210616&action=edit
Bug 41294: Update unit tests

harvest_periods: one month, several months across a year boundary, a
leap year, equal dates, a missing date, a begin date after the end date,
an end date in the future reduced to today, an end date of today, and a
begin date in the future. The clock is fixed with Time::Fake for the
cases that depend on today.

enqueue_sushi_harvest_jobs: one job per report type and month with the
monthly dates in the job data. The API test checks the returned jobs,
equal dates, the 400 answers and the permission check. The Cypress tests
check the queued jobs message with one link per month, and the period
column of the dashboard widget.

Test plan:
prove -l t/db_dependent/Koha/ERM/EUsage/UsageDataProvider.t \
  t/db_dependent/api/v1/erm_usage_data_providers.t \
  t/db_dependent/Koha/BackgroundJobs/ErmSushiHarvester.t
yarn cypress run --spec t/cypress/integration/ERM/DataProviders_spec.ts
yarn cypress run --spec t/cypress/integration/ERM/ModuleDashboard_spec.ts
misc/cronjobs/erm_run_harvester.pl --begin-date 2024-01-01 --dry-run

Assisted-by: Sonnet 5 (Anthropic)

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to