From 424ca5f579e44748ce543ceac8058336d88cdd44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Mon, 9 Apr 2018 11:20:18 +0200 Subject: [PATCH] Fix group by specs --- .../wp-table/configuration-modal/tab-portal-outlet.ts | 1 + .../configuration-modal/wp-table-configuration.modal.html | 2 +- .../work_packages/table/group_by/group_headers_spec.rb | 5 ++--- spec/support/components/work_packages/group_by.rb | 4 ++-- .../components/work_packages/table_configuration_modal.rb | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/frontend/app/components/wp-table/configuration-modal/tab-portal-outlet.ts b/frontend/app/components/wp-table/configuration-modal/tab-portal-outlet.ts index 8ab5709f35..a7780007c7 100644 --- a/frontend/app/components/wp-table/configuration-modal/tab-portal-outlet.ts +++ b/frontend/app/components/wp-table/configuration-modal/tab-portal-outlet.ts @@ -50,6 +50,7 @@ export class TabPortalOutlet { public switchTo(name:string) { const tab = _.find(this.availableTabs, tab => tab.name === name); + if (!tab) { throw(`Trying to swtich to unknown tab ${name}.`); } diff --git a/frontend/app/components/wp-table/configuration-modal/wp-table-configuration.modal.html b/frontend/app/components/wp-table/configuration-modal/wp-table-configuration.modal.html index 164c7066e0..c7a83c98e9 100644 --- a/frontend/app/components/wp-table/configuration-modal/wp-table-configuration.modal.html +++ b/frontend/app/components/wp-table/configuration-modal/wp-table-configuration.modal.html @@ -20,7 +20,7 @@ href="#" [ngClass]="{ 'selected': currentTab && tab.name === currentTab.name }" [textContent]="tab.title" - (click)="switchTo(tab)"> + (click)="switchTo(tab.name)">