diff --git a/tests/behat/features/ckan.feature b/tests/behat/features/ckan.feature index c162672..e33f62b 100644 --- a/tests/behat/features/ckan.feature +++ b/tests/behat/features/ckan.feature @@ -24,8 +24,8 @@ Feature: Use CKAN When I click the "Data" CMS tab When I fill in "DataResource-uri" with "https://catalogue.data.govt.nz/dataset/directory-of-educational-institutions" And I wait for 5 seconds - And I should see "Early Childhood Services (ECE) Directory" - When I select "New Zealand Schools" from the ".ckan-resource-locator__resource-select select" field + And I should see "Early Childhood Services (ECEs) Directory" + When I select "Schools Directory" from the ".ckan-resource-locator__resource-select select" field And I wait for 5 seconds And I press the "Save" button Then I should see a "Saved" success toast @@ -36,10 +36,10 @@ Feature: Use CKAN And I check "Form_DataColumns_GridFieldEditableColumns_4_ShowInResultsView" And I press the "Save" button And I go to "/my-ckan-registry-page?stage=Stage" - Then I should see "School id" + Then I should see "Ece id" And I should see "Org name" And I should see "Telephone" And I should see "Search" When I click on the ".griddle-table-heading-cell:nth-of-type(2)" element And I wait for 2 seconds - Then I should see "Albury School" + Then I should see "ABC Educare" diff --git a/tests/php/Forms/GridField/GridFieldDetailForm/ResourceFieldItemRequestTest.php b/tests/php/Forms/GridField/GridFieldDetailForm/ResourceFieldItemRequestTest.php index 151c366..18d3501 100644 --- a/tests/php/Forms/GridField/GridFieldDetailForm/ResourceFieldItemRequestTest.php +++ b/tests/php/Forms/GridField/GridFieldDetailForm/ResourceFieldItemRequestTest.php @@ -11,6 +11,7 @@ use SilverStripe\CKANRegistry\Service\ResourcePopulatorInterface; use SilverStripe\Control\Controller; use SilverStripe\Control\HTTPRequest; +use SilverStripe\Control\HTTPResponse; use SilverStripe\Core\Injector\Injector; use SilverStripe\Dev\SapphireTest; use SilverStripe\Forms\Form; @@ -123,6 +124,7 @@ protected function moveFieldFixture($fixture, $newPosition) $controllerMock = $this->createMock(Controller::class); $controllerMock->method('Link')->willReturn('test'); $controllerMock->method('getRequest')->willReturn($request); + $controllerMock->method('getResponse')->willReturn(new HTTPResponse('test')); // Create an item request $itemRequest = new ResourceFieldItemRequest(