diff --git a/ckanext/data_qld/ckan_dataset.json b/ckanext/data_qld/ckan_dataset.json index 1038386c..d1ebf723 100644 --- a/ckanext/data_qld/ckan_dataset.json +++ b/ckanext/data_qld/ckan_dataset.json @@ -172,6 +172,14 @@ "value": "annually", "label": "Annually" }, + { + "value": "biennially", + "label": "Biennially" + }, + { + "value": "quadrennially", + "label": "Quadrennially" + }, { "value": "non-regular", "label": "Non-regular" diff --git a/ckanext/data_qld/resource_freshness/helpers/helpers.py b/ckanext/data_qld/resource_freshness/helpers/helpers.py index 50737e99..f10ed980 100644 --- a/ckanext/data_qld/resource_freshness/helpers/helpers.py +++ b/ckanext/data_qld/resource_freshness/helpers/helpers.py @@ -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 } diff --git a/test/features/resource_freshness.feature b/test/features/resource_freshness.feature index 53719462..9bd14a1c 100644 --- a/test/features/resource_freshness.feature +++ b/test/features/resource_freshness.feature @@ -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 "" 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 "" 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 "" as the persona When I log in