Skip to content

Commit

Permalink
Merge pull request #252 from qld-gov-au/QOLSVC-6875_additional_Update…
Browse files Browse the repository at this point in the history
…_frequencies

[QOLSVC-6875] Add Biennially,Quadrennially to update_frequency list
  • Loading branch information
duttonw authored Sep 19, 2024
2 parents 8756881 + 6cb6859 commit e753141
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
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
14 changes: 7 additions & 7 deletions test/features/resource_freshness.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ Feature: Resource freshness
| TestOrgAdmin |
| TestOrgEditor |

Scenario Outline: An editor, admin or sysadmin user, when I go to the dataset new page and select 'monthly' update frequency, then the text 'Next update due' should be visible
Scenario Outline: An editor, admin or sysadmin user, when I go to the dataset new page and select an 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 "monthly" from "update_frequency"
And I select "<Frequency>" from "update_frequency"
Then I should see "Next update due"

Examples: Users
| User |
| SysAdmin |
| TestOrgAdmin |
| TestOrgEditor |
Examples: Frequencies
| User | Frequency |
| SysAdmin | monthly |
| TestOrgAdmin | biennially |
| TestOrgEditor | quadrennially |

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
Expand Down

0 comments on commit e753141

Please sign in to comment.