From 05f1257ce61e4d0e132f5c9fe40222569e19e11d Mon Sep 17 00:00:00 2001 From: chrisala Date: Wed, 21 Aug 2024 08:24:47 +1000 Subject: [PATCH] Test updates #2880 --- .../ala/fieldcapture/CreateOrEditOrganisationSpec.groovy | 8 ++------ .../groovy/pages/AddOrEditOrganisation.groovy | 1 + src/integration-test/resources/dataset_mu/loadDataSet.js | 5 ++++- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/integration-test/groovy/au/org/ala/fieldcapture/CreateOrEditOrganisationSpec.groovy b/src/integration-test/groovy/au/org/ala/fieldcapture/CreateOrEditOrganisationSpec.groovy index a1cb3a3c2..76c868b53 100644 --- a/src/integration-test/groovy/au/org/ala/fieldcapture/CreateOrEditOrganisationSpec.groovy +++ b/src/integration-test/groovy/au/org/ala/fieldcapture/CreateOrEditOrganisationSpec.groovy @@ -32,6 +32,7 @@ class CreateOrEditOrganisationSpec extends StubbedCasSpec { at CreateOrganisation } when: + details.abnStatus = "Active" details.abn = "51824753556" waitFor {details.prePopulateABN.displayed} details.prePopulateABN.click() @@ -66,12 +67,8 @@ class CreateOrEditOrganisationSpec extends StubbedCasSpec { then: waitFor {at EditOrganisation} - and: "The organisation name is not editable by normal users" - details.isNameReadOnly() == true when: - details.abn = "66666666666" - waitFor {details.prePopulateABN.displayed} details.description = "Test Organisation Description test" details.save() @@ -83,8 +80,6 @@ class CreateOrEditOrganisationSpec extends StubbedCasSpec { then: orgDescription.text() == "Test Organisation Description test" - waitFor {orgAbn.displayed } - orgAbn.text() == "66666666666" } @@ -102,6 +97,7 @@ class CreateOrEditOrganisationSpec extends StubbedCasSpec { waitFor 20, {at EditOrganisation} when: + details.abnStatus = "Active" details.abn = "98434926368" waitFor {details.prePopulateABN.displayed} details.prePopulateABN.click() diff --git a/src/integration-test/groovy/pages/AddOrEditOrganisation.groovy b/src/integration-test/groovy/pages/AddOrEditOrganisation.groovy index 61d351765..12f21c8ca 100644 --- a/src/integration-test/groovy/pages/AddOrEditOrganisation.groovy +++ b/src/integration-test/groovy/pages/AddOrEditOrganisation.groovy @@ -5,6 +5,7 @@ import geb.module.FormElement class AddOrEditOrganisation extends Module { static content = { + abnStatus { $('#abnStatus') } name { $('#name') } acronym{$('#acronym')} abn{$('#abnSelector')} diff --git a/src/integration-test/resources/dataset_mu/loadDataSet.js b/src/integration-test/resources/dataset_mu/loadDataSet.js index 9633bc028..03ee90f1b 100644 --- a/src/integration-test/resources/dataset_mu/loadDataSet.js +++ b/src/integration-test/resources/dataset_mu/loadDataSet.js @@ -67,10 +67,13 @@ createProgram({name:'Regional Land Partnerships', parent: null, programId:'test_ createOrganisation({ name:'Test Organisation', + abnStatus:'Active', organisationId:'test_organisation', status:'active', abn:'12345678901', url:'http://www.ala.org.au', - acronym:'TSTORG' + acronym:'TSTORG', + state: "ACT", + postcode: 2600 }) createMu({name:'test mu', managementUnitId:"test_mu",managementUnitSiteId:'test_site_1'});