Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove filter column and add the extra explanation text #642

Merged
merged 3 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions assets/scss/pages/service-connection.scss
Original file line number Diff line number Diff line change
@@ -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;

Expand All @@ -29,6 +19,7 @@
padding: 11px 10px;
font-size: .875rem;
font-weight: 600;
vertical-align: bottom;
}

td.name {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ public function shouldFailCreateIssue(): void
$this->failIssueCreation = true;
$this->storeData();
}
public function shouldNotFailCreateIssue(): void
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a weird method name. No method should ever fail, but they do... not clear to me

Copy link
Contributor Author

@MKodde MKodde Jun 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha it is weird indeed, this a method that modifies the behavior of a fixture. You can enable it to simulate Jira being down. I think it precisely describes its (test) purpose. And I'd like to keep it as it is.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not call it enableJiraDownSimulation() then?

Copy link
Contributor Author

@MKodde MKodde Jun 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this more fitting in functional tests, but my pardigm is mainly gherkin oriented. I feel this fits the bill good'nuf

{
$this->loadData();
$this->failIssueCreation = false;
$this->storeData();
}

public function findByManageIds(array $manageIds): IssueCollection
{
Expand Down
13 changes: 6 additions & 7 deletions templates/Service/my-services.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@
<h1 id="main" class="service-title">
{{ 'service.connections.title.main'|trans }}
</h1>

<article class="fieldset card service-connections">
<aside class="filters">
<div class="header"><h2>{{ 'service.connections.title.filters'|trans }}</h2></div>
<div>
<div class="totals">Todo</div>
</div>
</aside>
<div class="sps">
<div class="header"><h2>{{ 'service.connections.title.content'|trans }}</h2></div><div>
<div class="header"><h2>{{ 'service.connections.title.content'|trans }}</h2>
<p> {{ 'service.connections.content.description'|trans }}</p>
</div>
<div>

<table>
<thead>
<tr>
Expand Down
1 change: 1 addition & 0 deletions tests/webtests/EntityDetailTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion tests/webtests/ServiceCreateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ public function test_empty_institution_id_field_is_allowed()
self::fillFormField($form, 'input[name="dashboard_bundle_service_type[teams][teamManagerEmail]"]', '[email protected]');
self::findBy('#dashboard_bundle_service_type_save')->click();
$services = $this->getServiceRepository()->findAll();
$this->assertCount(3, $services);
$this->assertCount(4, $services);
}
}
8 changes: 5 additions & 3 deletions tests/webtests/ServiceSwitcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down
Loading