From 84650e2e8779045a55ac970dc312224e0f3e3c84 Mon Sep 17 00:00:00 2001 From: Michiel Kodde Date: Tue, 18 Jun 2024 11:57:24 +0200 Subject: [PATCH 1/3] Remove the filter column It will not be included on the MVP of the surfconext representative page. No need to include it, leaving extra space for the SP/IdP entities. --- assets/scss/pages/service-connection.scss | 11 +---------- templates/Service/my-services.html.twig | 6 ------ 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/assets/scss/pages/service-connection.scss b/assets/scss/pages/service-connection.scss index 7be7da9f4..4922a8384 100644 --- a/assets/scss/pages/service-connection.scss +++ b/assets/scss/pages/service-connection.scss @@ -1,15 +1,5 @@ .service-connections { - display: flex; - aside.filters { - margin-right: 32px; - width: 230px; - flex-basis: 230px; - flex-shrink: 0; - } div.sps { - flex: 1 1; - flex-basis: 400px; - td { padding: 15px 10px; @@ -29,6 +19,7 @@ padding: 11px 10px; font-size: .875rem; font-weight: 600; + vertical-align: bottom; } td.name { diff --git a/templates/Service/my-services.html.twig b/templates/Service/my-services.html.twig index 727d0d029..3e49b7b45 100644 --- a/templates/Service/my-services.html.twig +++ b/templates/Service/my-services.html.twig @@ -10,12 +10,6 @@ {{ 'service.connections.title.main'|trans }}
-

{{ 'service.connections.title.content'|trans }}

From 3b762cd4d5059d2e7bc577d19aed4df9830c3d5f Mon Sep 17 00:00:00 2001 From: Michiel Kodde Date: Tue, 18 Jun 2024 12:27:50 +0200 Subject: [PATCH 2/3] Add a translatable description to SC responsible page --- .../DashboardBundle/Resources/translations/messages.en.yml | 2 +- templates/Service/my-services.html.twig | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Surfnet/ServiceProviderDashboard/Infrastructure/DashboardBundle/Resources/translations/messages.en.yml b/src/Surfnet/ServiceProviderDashboard/Infrastructure/DashboardBundle/Resources/translations/messages.en.yml index e96d8814d..56d807f55 100644 --- a/src/Surfnet/ServiceProviderDashboard/Infrastructure/DashboardBundle/Resources/translations/messages.en.yml +++ b/src/Surfnet/ServiceProviderDashboard/Infrastructure/DashboardBundle/Resources/translations/messages.en.yml @@ -563,8 +563,8 @@ service.overview.progress.tooltip.production-connection.in-progress.html: "The d service.overview.progress.tooltip.production-connection.success.html: "Thank you\nA production connection is active" service.connections.title.main: "Connections" -service.connections.title.filters: Filters service.connections.title.content: Connection status +service.connections.content.description: "The list below shows the entities you are responsible for. If a service is connected to a test IdP, it is marked with a green checkmark. If the service is connected to any other IdP, then a green checkmark wil be displayed in the final column." service.connections.connected: Not connected service.connections.not-connected: Connected service.connections.table.no-results: No entities found diff --git a/templates/Service/my-services.html.twig b/templates/Service/my-services.html.twig index 3e49b7b45..3b9eb1639 100644 --- a/templates/Service/my-services.html.twig +++ b/templates/Service/my-services.html.twig @@ -9,9 +9,14 @@

{{ 'service.connections.title.main'|trans }}

+
-

{{ 'service.connections.title.content'|trans }}

+

{{ 'service.connections.title.content'|trans }}

+

{{ 'service.connections.content.description'|trans }}

+
+
+
From 928e35b72f5f9efae535100b8c134fb128a76046 Mon Sep 17 00:00:00 2001 From: Michiel Kodde Date: Tue, 18 Jun 2024 14:44:27 +0200 Subject: [PATCH 3/3] Allow toggling of Jira failure simulation And adjust other webtests to the new Fixtures created for the surfconext representative page --- .../Jira/Repository/DevelopmentIssueRepository.php | 6 ++++++ tests/webtests/EntityDetailTest.php | 1 + tests/webtests/ServiceCreateTest.php | 2 +- tests/webtests/ServiceSwitcherTest.php | 8 +++++--- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/Surfnet/ServiceProviderDashboard/Infrastructure/Jira/Repository/DevelopmentIssueRepository.php b/src/Surfnet/ServiceProviderDashboard/Infrastructure/Jira/Repository/DevelopmentIssueRepository.php index e797deacc..c952f50d4 100644 --- a/src/Surfnet/ServiceProviderDashboard/Infrastructure/Jira/Repository/DevelopmentIssueRepository.php +++ b/src/Surfnet/ServiceProviderDashboard/Infrastructure/Jira/Repository/DevelopmentIssueRepository.php @@ -49,6 +49,12 @@ public function shouldFailCreateIssue(): void $this->failIssueCreation = true; $this->storeData(); } + public function shouldNotFailCreateIssue(): void + { + $this->loadData(); + $this->failIssueCreation = false; + $this->storeData(); + } public function findByManageIds(array $manageIds): IssueCollection { diff --git a/tests/webtests/EntityDetailTest.php b/tests/webtests/EntityDetailTest.php index 279ab75c0..ef60df944 100644 --- a/tests/webtests/EntityDetailTest.php +++ b/tests/webtests/EntityDetailTest.php @@ -37,6 +37,7 @@ public function test_render_details_of_removal_requested_manage_entity() ); $issueType = 'spd-delete-production-entity'; + $this->jiraIssueRepository->shouldNotFailCreateIssue(); $this->createjiraTicket($entityId, $issueType); $this->switchToService('SURFnet'); diff --git a/tests/webtests/ServiceCreateTest.php b/tests/webtests/ServiceCreateTest.php index 309c82d83..05e44f783 100644 --- a/tests/webtests/ServiceCreateTest.php +++ b/tests/webtests/ServiceCreateTest.php @@ -57,6 +57,6 @@ public function test_empty_institution_id_field_is_allowed() self::fillFormField($form, 'input[name="dashboard_bundle_service_type[teams][teamManagerEmail]"]', 'loeki@example.org'); self::findBy('#dashboard_bundle_service_type_save')->click(); $services = $this->getServiceRepository()->findAll(); - $this->assertCount(3, $services); + $this->assertCount(4, $services); } } diff --git a/tests/webtests/ServiceSwitcherTest.php b/tests/webtests/ServiceSwitcherTest.php index 51bec8c39..e674ba4af 100644 --- a/tests/webtests/ServiceSwitcherTest.php +++ b/tests/webtests/ServiceSwitcherTest.php @@ -74,12 +74,14 @@ public function test_switcher_lists_all_services_for_administrators() $crawler = self::$pantherClient->request('GET', '/service/create'); $options = $crawler->filter('select#service-switcher option'); - $this->assertCount(3, $options, 'Expecting 2 services in service switcher (excluding empty option)'); + $this->assertCount(4, $options, 'Expecting 3 services in service switcher (excluding empty option)'); $crawler->filter('.service-switcher form')->click(); - $ibuildings = "//li[contains(@id,'select2-service-switcher-result-')][1]"; - $surf = "//li[contains(@id,'select2-service-switcher-result-')][2]"; + $acme = "//li[contains(@id,'select2-service-switcher-result-')][1]"; + $ibuildings = "//li[contains(@id,'select2-service-switcher-result-')][2]"; + $surf = "//li[contains(@id,'select2-service-switcher-result-')][3]"; + $this->assertEquals('Acme Corporation [acme.com]', $crawler->findElement(WebDriverBy::xpath($acme))->getText()); $this->assertEquals('Ibuildings B.V. [ibuildings.nl]', $crawler->findElement(WebDriverBy::xpath($ibuildings))->getText()); $this->assertEquals('SURFnet [surf.nl]', $crawler->findElement(WebDriverBy::xpath($surf))->getText()); }