Skip to content

Commit

Permalink
[QOLSVC-6875] Add Biennially,Quadrennially to update_frequency list
Browse files Browse the repository at this point in the history
  • Loading branch information
duttonw committed Sep 19, 2024
1 parent 8756881 commit c445aed
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
8 changes: 8 additions & 0 deletions ckanext/data_qld/ckan_dataset.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,14 @@
"value": "annually",
"label": "Annually"
},
{
"value": "biennially",
"label": "Biennially"
},
{
"value": "quadrennially",
"label": "Quadrennially"
},
{
"value": "non-regular",
"label": "Non-regular"
Expand Down
5 changes: 4 additions & 1 deletion ckanext/data_qld/resource_freshness/helpers/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@

log = logging.getLogger(__name__)

# Also update ckanext-data-qld/ckanext/data_qld/ckan_dataset.json
update_frequencies = {
"monthly": 30,
"quarterly": 91,
"half-yearly": 182,
"annually": 365
"annually": 365,
"biennially": 730,
"quadrennially": 1460
}


Expand Down
26 changes: 26 additions & 0 deletions test/features/resource_freshness.feature
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,32 @@ Feature: Resource freshness
| TestOrgAdmin |
| TestOrgEditor |

Scenario Outline: An editor, admin or sysadmin user, when I go to the dataset new page and select 'biennially' update frequency, then the text 'Next update due' should be visible
Given "<User>" as the persona
When I log in
And I go to "/dataset/new"
And I select "biennially" from "update_frequency"
Then I should see "Next update due"

Examples: Users
| User |
| SysAdmin |
| TestOrgAdmin |
| TestOrgEditor |

Scenario Outline: An editor, admin or sysadmin user, when I go to the dataset new page and select 'quadrennially' update frequency, then the text 'Next update due' should be visible
Given "<User>" as the persona
When I log in
And I go to "/dataset/new"
And I select "quadrennially" from "update_frequency"
Then I should see "Next update due"

Examples: Users
| User |
| SysAdmin |
| TestOrgAdmin |
| TestOrgEditor |

Scenario Outline: As a user with editing privileges, when I set a 'monthly' update frequently, I should still be able to update the dataset via the API
Given "<User>" as the persona
When I log in
Expand Down

0 comments on commit c445aed

Please sign in to comment.