From 92021b51e31addca8848d8425174aafaf7f68afe Mon Sep 17 00:00:00 2001 From: Michiel Kodde Date: Mon, 8 Jul 2024 13:05:38 +0200 Subject: [PATCH] Address Webtest breakage --- tests/webtests/EntityDeleteTest.php | 2 ++ tests/webtests/EntityEditTest.php | 5 ++++- tests/webtests/Manage/Client/template/oidc10.json | 2 ++ tests/webtests/Manage/Client/template/saml20_sp.json | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/webtests/EntityDeleteTest.php b/tests/webtests/EntityDeleteTest.php index 313d45aae..7f62b9430 100644 --- a/tests/webtests/EntityDeleteTest.php +++ b/tests/webtests/EntityDeleteTest.php @@ -117,6 +117,8 @@ public function test_request_delete_a_published_production_entity_jira_not_avail ->form(); self::$pantherClient->submit($form); + $this->screenshot('foobar.png'); + $this->assertOnPage( 'Oops, creating the delete request failed. Our ticket service might have been offline. Please try again at a later time.' ); diff --git a/tests/webtests/EntityEditTest.php b/tests/webtests/EntityEditTest.php index 739b1cb12..78d5c46c7 100644 --- a/tests/webtests/EntityEditTest.php +++ b/tests/webtests/EntityEditTest.php @@ -154,6 +154,8 @@ public function test_it_loads_xml_from_textarea() self::fillFormField($formElement, '#dashboard_bundle_entity_type_attributes_commonNameAttribute_motivation', 'foo'); self::fillFormField($formElement, '#dashboard_bundle_entity_type_attributes_organizationAttribute_motivation', 'foo'); self::fillFormField($formElement, '#dashboard_bundle_entity_type_attributes_personalCodeAttribute_motivation', 'foo'); + // Also check a type of service (as they are mandatory) + self::checkFormField($formElement, '#dashboard_bundle_entity_type_metadata_typeOfService_2'); self::findBy('#dashboard_bundle_entity_type_publishButton')->click(); $pageTitle = self::$pantherClient->refreshCrawler()->filter('h1')->first()->text(); @@ -287,6 +289,7 @@ private function buildValidFormData() 'dashboard_bundle_entity_type[metadata][descriptionEn]' => 'SURF SP2 Description English', 'dashboard_bundle_entity_type[metadata][applicationUrl]' => '', 'dashboard_bundle_entity_type[metadata][eulaUrl]' => '', + 'dashboard_bundle_entity_type[metadata][typeOfService][]' => 'Research', 'dashboard_bundle_entity_type[contactInformation][administrativeContact][firstName]' => 'Jane', 'dashboard_bundle_entity_type[contactInformation][administrativeContact][lastName]' => 'Doe', 'dashboard_bundle_entity_type[contactInformation][administrativeContact][email]' => 'janedoe@example.com', @@ -299,7 +302,7 @@ private function buildValidFormData() 'dashboard_bundle_entity_type[contactInformation][supportContact][lastName]' => 'surname', 'dashboard_bundle_entity_type[contactInformation][supportContact][email]' => 'foobar@example.com', 'dashboard_bundle_entity_type[contactInformation][supportContact][phone]' => 'telephonenumber', - 'dashboard_bundle_entity_type[comments][comments]' => 'I need a new name NL' + 'dashboard_bundle_entity_type[comments][comments]' => 'I need a new name NL', ]; foreach ($attributes as $attribute) { diff --git a/tests/webtests/Manage/Client/template/oidc10.json b/tests/webtests/Manage/Client/template/oidc10.json index 61dda5267..f1eff7b41 100644 --- a/tests/webtests/Manage/Client/template/oidc10.json +++ b/tests/webtests/Manage/Client/template/oidc10.json @@ -65,6 +65,8 @@ "OrganizationURL:nl": "%5$s Organisation Url Dutch", "coin:service_team_id": "%7$s", "coin:institution_id": "%8$s", + "coin:ss:type_of_service:en": "Research", + "coin:ss:type_of_service:nl": "Research", "isPublicClient": true }, "allowedEntities": [], diff --git a/tests/webtests/Manage/Client/template/saml20_sp.json b/tests/webtests/Manage/Client/template/saml20_sp.json index 0929bf7c9..87fa109f8 100644 --- a/tests/webtests/Manage/Client/template/saml20_sp.json +++ b/tests/webtests/Manage/Client/template/saml20_sp.json @@ -65,6 +65,8 @@ "OrganizationURL:nl": "%5$s Organisation Url Dutch", "coin:service_team_id": "%7$s", "coin:institution_id": "%8$s", + "coin:ss:type_of_service:en": "Research", + "coin:ss:type_of_service:nl": "Research", "logo:0:url": "%3$s\/images\/logo.png", "logo:0:width": 100, "logo:0:height": 100,