Skip to content

Commit 2338750

Browse files
committed
- fix issue with date option check being cleared when checking facets item other than date
1 parent 628cbc4 commit 2338750

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

grails-app/views/home/_projectFinder.gsp

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<g:elseif test="${results?.hits?.total?:0 > 0}">
1414
<div class="row">
1515
<div id="facetsCol" class="bg-white" style="display:none;">
16-
<g:set var="reqParams" value="query,sort,order,max,fq,fromDate,toDate"/>
16+
<g:set var="reqParams" value="query,sort,order,max,fq,fromDate,toDate,isFilterByCompletedProjects"/>
1717
<div class="visible-phone pull-right" style="margin-top: 5px;">
1818
<a href="#" id="toggleFacetDisplay" rel="facetsContent" role="button" class="btn btn-sm btn-inverse" style="color:white;">
1919
<span>show</span> options&nbsp;

src/integration-test/groovy/au/org/ala/fieldcapture/ProjectExplorerSpec.groovy

+14
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,22 @@ class ProjectExplorerSpec extends StubbedCasSpec {
109109
projects.size() == 1
110110
}
111111

112+
when: "We organisation facet is selected, date option selection should remain checked"
113+
at ProjectExplorer
114+
organisationFacet.click()
115+
waitFor {
116+
organisationFacetItems.displayed
117+
}
118+
organisationFacetItems[0].click()
119+
120+
then:
121+
dateOption.value() == "true"
122+
112123
when: "We clear dates"
113124
at ProjectExplorer
125+
waitFor {
126+
clearDatesBtn.displayed
127+
}
114128
clearDatesBtn.click()
115129

116130
then:

src/integration-test/groovy/pages/ProjectExplorer.groovy

+2
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ class ProjectExplorer extends ReloadablePage {
6363
dateOption(required: false, wait: true) { $("#isFilterByCompletedProjectsOption", dynamic: true) }
6464
dateFacet(required: false) { $("#projectDates", dynamic: true) }
6565
clearDatesBtn(required: false) { $("#facet-dates .clearDates", dynamic: true) }
66+
organisationFacet(required: false) { $("#organisationFacet", dynamic: true) }
67+
organisationFacetItems(required: false) { $("#facet-organisationFacet > div > ul > li > a", dynamic: true) }
6668
inputText{ $("#keywords")}
6769

6870
dashboardContent (required: false) {$("div#dashboard-content")}

0 commit comments

Comments
 (0)