Skip to content

Commit

Permalink
View data set and functional test update #2957
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisala committed Sep 6, 2023
1 parent 4f7d6af commit 534baa5
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 85 deletions.
75 changes: 43 additions & 32 deletions grails-app/views/dataSet/_viewDataSet.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,25 @@
</div>

</div>
%{-- Support for legacy data set summaries --}%
<!-- ko if:term() -->
<div class="form-group row">
<label class="col-sm-5 col-form-label">7. Is this data being collected for reporting against short or medium term outcome statements?</label>
<div class="col-sm-7">
<span data-bind="text:term"></span>
</div>
</div>
<!-- /ko -->

<!-- ko if:!term() -->
<div class="form-group row">
<label class="col-sm-5 col-form-label">7. Which project service and outcome/s does this data set support? </label>
<div class="col-sm-7">
<span data-bind="text:serviceAndOutcomes"></span>
</div>
</div>
<!-- /ko -->

<div class="form-group row">
<label class="col-sm-5 col-form-label required">8. Is this (a) a baseline dataset associated with a project outcome i.e. against which, change will be measured, (b) a project progress dataset that is tracking change against an established project baseline dataset or (c) a standalone, foundational dataset to inform future management interventions?</label>
<div class="col-sm-7">
Expand Down Expand Up @@ -130,65 +143,64 @@
</div>

<div class="form-group row">
<label class="col-sm-5 col-form-label">16a. Has your data been included in the Threatened Species Index?</label>
<label class="col-sm-5 col-form-label">16a. Has your data been uploaded to the Threatened Species Index?</label>
<div class="col-sm-7">
<span data-bind="text:threatenedSpeciesIndex"></span>
</div>
</div>

<div class="row form-subheading">
<div class="col-12">
<i>Dataset accessibility</i>
</div>
</div>
<div class="form-group row">
<label class="col-sm-5 col-form-label required">17. Who developed the dataset?</label>
<div class="col-sm-7">
<span data-bind="text:collectorType"></span>
<label class="col-sm-5 col-form-label required">16b. Date of upload, if you answered 'Yes' to 16a above.</label>
<div class="col-sm-3">
<div class="input-group input-append">
<span data-bind="text:threatenedSpeciesIndexUploadDate.formattedDate"></span>
</div>
</div>
</div>
<div class="form-group row">
<label class="col-sm-5 col-form-label required">18. Has a quality assurance check been undertaken on the data?</label>
<div class="col-sm-7">
<span data-bind="text:qa"></span>
<div class="row form-subheading">
<div class="col-12">
<i>Dataset accessibility</i>
</div>
</div>
<div class="form-group row">
<label class="col-sm-5 col-form-label required">19. Has the data contributed to a publication?</label>
<label class="col-sm-5 col-form-label">17. Please provide the location/system of where the dataset is held. If possible, provide a URL of the published location. If stored internally by your organisation, write ‘stored internally’.</label>
<div class="col-sm-7">
<span data-bind="text:published"></span>
<span data-bind="text:publicationUrl"></span>
</div>
</div>

<div class="form-group row">
<label class="col-sm-5 col-form-label required">20. Where is the data held?</label>
<label class="col-sm-5 col-form-label">18. What format is the dataset?</label>
<div class="col-sm-7">
<span data-bind="text:storageType"></span>
<span data-bind="text:format"></span>
</div>
</div>

<div class="form-group row">
<label class="col-sm-5 col-form-label">21. For all public datasets, please provide the published location. If stored internally by your organisation, write ‘stored internally’.</label>
<div class="col-sm-7">
<span data-bind="text:publicationUrl"></span>
<div class="col-sm-5">
<label class="col-form-label">19. What is the size of the dataset (KB)?</label>
<p>If you don't know the size, check the 'Unknown' checkbox</p>
</div>
</div>
<div class="form-group row">
<label class="col-sm-5 col-form-label required">22. What format is the dataset?</label>
<div class="col-sm-7">
<span data-bind="text:format"></span>

<div class="col-sm-3">
<!-- ko if:!sizeUnknown() -->
<span data-bind="text:sizeInKB"></span>
<!-- /ko -->
<!-- ko if:sizeUnknown() -->
<span>Unknown</span>
<!-- /ko -->
</div>
</div>

<div class="form-group row">
<label class="col-sm-5 col-form-label required">23. Are there any sensitivities in the dataset?</label>
<label class="col-sm-5 col-form-label required">20. Are there any sensitivities in the dataset?</label>
<div class="col-sm-7">
<span data-bind="text:sensitivities"></span>
<span data-bind="text:sensitivities"></span><span data-bind="text:otherSensitivity"></span>
</div>
</div>

<div class="form-group row">
<div class="col-sm-5">
<label class="col-form-label required">24. Primary source of data (organisation or individual that owns or maintains the dataset)</label>
<p>Please include the contact name, physical address, email address and phone number where possible</p>
<label class="col-form-label required">21. Primary source of data (organisation that owns or maintains the dataset)</label>
</div>
<div class="col-sm-7">
<span data-bind="text:owner"></span>
Expand All @@ -197,8 +209,7 @@

<div class="form-group row">
<div class="col-sm-5 col-form-label">
<label class="required">25. Dataset custodian (name of contact to obtain access to dataset)</label>
<p>Please include the contact name, physical address, email address and phone number where possible</p>
<label class="required">22. Dataset custodian (name of organisation to obtain access to dataset)</label>
</div>
<div class="col-sm-7">
<span data-bind="text:custodian"></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ class DatasetSpec extends StubbedCasSpec{
def dataSet = datasetContent
dataSet.title = "Title"
dataSet.programOutcome = "5. By 2023, there is an increase in the awareness and adoption of land management practices that improve and protect the condition of soil, biodiversity and vegetation."
dataSet.investmentPriorities = ["Soil acidification", "Other"]
dataSet.otherInvestmentPriority = "Other Priority"
dataSet.term = "Short-term outcome statement"
dataSet.investmentPriorities = ["Soil acidification"]
dataSet.type = "Baseline dataset associated with a project outcome"
dataSet.measurementTypes = ["Soil erosion"]
dataSet.methods = ["Genetic sampling", "Area sampling"]
Expand All @@ -46,10 +44,6 @@ class DatasetSpec extends StubbedCasSpec{
dataSet.endDate ="21-01-2022"
dataSet.addition = "Yes"
dataSet.threatenedSpeciesIndex = "Yes"
dataSet.collectorType = "University researcher"
dataSet.qa = "Yes"
dataSet.published = "Yes"
dataSet.storageType = "Aurion"
dataSet.publicationUrl = "url"
dataSet.format = "JSON"
dataSet.sensitivities =["Commercially sensitive", "Ecologically sensitive"]
Expand Down Expand Up @@ -96,9 +90,7 @@ class DatasetSpec extends StubbedCasSpec{
def set = datasetContent
set.title == "Title"
set.programOutcome == "5. By 2023, there is an increase in the awareness and adoption of land management practices that improve and protect the condition of soil, biodiversity and vegetation."
set.investmentPriorities == ["Soil acidification", "Other"]
set.otherInvestmentPriority == "Other Priority"
set.term == "Short-term outcome statement"
set.investmentPriorities == ["Soil acidification"]
set.type == "Baseline dataset associated with a project outcome"
set.measurementTypes == ["Soil erosion"]
set.methods == ["Genetic sampling", "Area sampling"]
Expand All @@ -109,17 +101,12 @@ class DatasetSpec extends StubbedCasSpec{
set.endDate =="21-01-2022"
set.addition == "Yes"
set.threatenedSpeciesIndex == "Yes"
set.collectorType == "University researcher"
set.qa == "Yes"
set.published == "Yes"
set.storageType == "Aurion"
set.publicationUrl == "url"
set.format == "JSON"
set.sensitivities ==["Commercially sensitive", "Ecologically sensitive"]
set.dataOwner == "data owner"
set.custodian == "custodian"
set.dataCollectionOngoing.size() == 1
set.dataCollectionOngoingChecked.size() == 0
!set.dataCollectionOngoing.checked


when:
cancel()
Expand Down Expand Up @@ -175,8 +162,7 @@ class DatasetSpec extends StubbedCasSpec{

def set = datasetContent
set.title == "Title"
set.dataCollectionOngoing.size() == 1
set.dataCollectionOngoingChecked.size() == 0
!set.dataCollectionOngoing.checked

when:
set.markCompleted.click()
Expand All @@ -190,8 +176,7 @@ class DatasetSpec extends StubbedCasSpec{
when:
set.title = "Title"
set.programOutcome = "5. By 2023, there is an increase in the awareness and adoption of land management practices that improve and protect the condition of soil, biodiversity and vegetation."
set.investmentPriorities = ["Soil acidification", "Other"]
set.otherInvestmentPriority = "Other Priority"
set.investmentPriorities = ["Soil acidification"]
set.type = "Baseline dataset associated with a project outcome"
set.measurementTypes = ["Soil erosion"]
set.methods = ["Genetic sampling", "Area sampling"]
Expand All @@ -202,16 +187,13 @@ class DatasetSpec extends StubbedCasSpec{
set.endDate ="21-01-2022"
set.addition = "Yes"
set.threatenedSpeciesIndex = "Yes"
set.collectorType = "University researcher"
set.qa = "Yes"
set.published = "Yes"
set.storageType = "Aurion"
set.publicationUrl = "url"
set.format = "JSON"
set.sensitivities =["Commercially sensitive", "Ecologically sensitive"]
set.dataOwner = "data owner"
set.custodian = "custodian"

set.publicationUrl = "https://www.ala.org.au"
set.threatenedSpeciesDateOfUpload = '21-01-2021'
set.dataSetSize = '200'
set.createButton.click()

then:
Expand Down
50 changes: 24 additions & 26 deletions src/integration-test/groovy/pages/modules/DatasetPageModule.groovy
Original file line number Diff line number Diff line change
@@ -1,36 +1,34 @@
package pages.modules

import geb.Module
import geb.module.Checkbox

class DatasetPageModule extends Module{

static content = {
title(required: false) {$('#title')}
programOutcome(required: false) {$('#programOutcome')}
investmentPriorities(required: false) {$('#investmentPriority')}
otherInvestmentPriority(required: false) {$(".otherPriorityTextArea")}
term(required: false){$("#term")}
type(required: false){$("#type")}
measurementTypes(required: false) {$("#measurementTypes")}
methods (required: false){$("#methods")}
methodDescription (required: false) {$("#methodDescription")}
collectionApp(required: false){$("#collectionApp")}
location(required: false) {$('#location')}
startDate(required: false) {$("#startDate")}
endDate(required: false) {$("#endDate")}
addition(required: false) {$("#addition")}
collectorType(required: false){$('#collectorType')}
threatenedSpeciesIndex(required: false){$('#threatenedSpeciesIndex')}
qa(required: false) {$("#qa")}
published(required: false) {$("#published")}
storageType(required: false) {$("#storageType")}
publicationUrl(required: false) {$("#publicationUrl")}
format(required: false) {$("#format")}
sensitivities(required: false) {$("#sensitivities")}
dataOwner(required: false) {$("#owner")}
custodian(required: false) {$("#custodian")}
dataCollectionOngoing(required: false) {$("#dataCollectionOngoing")}
dataCollectionOngoingChecked(required: false) {$("#dataCollectionOngoing:checked")}
title {$('#title')}
programOutcome {$('#programOutcome')}
investmentPriorities {$('#investmentPriority')}
serviceAndOutcomes {$('#projectOutcomes')}
type{$("#type")}
measurementTypes {$("#measurementTypes")}
methods {$("#methods")}
methodDescription {$("#methodDescription")}
collectionApp {$("#collectionApp")}
location {$('#location')}
startDate {$("#startDate")}
endDate {$("#endDate")}
addition {$("#addition")}
threatenedSpeciesIndex{$('#threatenedSpeciesIndex')}
threatenedSpeciesDateOfUpload {$('#threatenedSpeciesIndexUploadDate')}

publicationUrl {$("#publicationUrl")}
format {$("#format")}
dataSetSize {$('#sizeinkb')}
sensitivities {$("#sensitivities")}
dataOwner {$("#owner")}
custodian {$("#custodian")}
dataCollectionOngoing{$("#dataCollectionOngoing").module(Checkbox)}

markCompleted(required: false) {$('[data-bind*="checked:markedAsFinished"]')}

Expand Down

0 comments on commit 534baa5

Please sign in to comment.