Skip to content

Commit

Permalink
Merge pull request #783 from aneoconsulting/sonar/syntax
Browse files Browse the repository at this point in the history
fix: sonar code syntax
  • Loading branch information
JulesMaisonneuveAneo authored Dec 8, 2023
2 parents e1370c8 + eb251b7 commit 31f37c7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/app/components/columns-modify-dialog.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,8 @@ export class ColumnsModifyDialogComponent<T extends object,O extends object> imp
if (!this.columns.includes(column) && this.data.availableColumns.includes(column)) {
this.columns.push(column);
}
} else {
if(this.columns.includes(column)) {
this.columns = this.columns.filter(currentColumn => currentColumn !== column);
}
} else if(this.columns.includes(column)) {
this.columns = this.columns.filter(currentColumn => currentColumn !== column);
}
}

Expand Down
14 changes: 12 additions & 2 deletions src/app/services/storage.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,19 @@ describe('StorageService', () => {
it('Should export properly', () => {
mockStorage.getItem.mockImplementationOnce((key: Key, parse) => {
const result = mockItemData[key];
if (!parse) return result ? {'12': 'sessions'} : undefined;
else return result ? JSON.stringify({'12': 'sessions'}) : undefined;
if(result) {
if(!parse) {
return {'12': 'sessions'};
}
else {
return JSON.stringify({'12': 'sessions'});
}
}
else {
return undefined;
}
});

expect(service.exportData()['navigation-sidebar'])
.toEqual({
'0': 'profile',
Expand Down

1 comment on commit 31f37c7

@github-actions
Copy link

Choose a reason for hiding this comment

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

Lines Statements Branches Functions
Coverage: 92%
92.77% (1709/1842) 82.29% (316/384) 88.77% (435/490)

JUnit

Tests Skipped Failures Errors Time
606 0 💤 34 ❌ 0 🔥 45.739s ⏱️
Files coverage (92%)
File% Stmts% Branch% Funcs% LinesUncovered Line #s
All files92.7782.2988.7792.65 
applications51.4409.3751.82 
   index.component.ts51.4409.3751.82251–307, 315–456
applications/services97.180.9591.6696.96 
   applications-filters.service.ts100100100100 
   applications-grpc.service.ts10066.6610010068–69
   applications-index.service.ts93.18086.6692.8571–75
components98.7595.2395.9599.01 
   actions-toolbar-group.component.ts100100100100 
   actions-toolbar.component.ts100100100100 
   auto-refresh-button.component.ts1006010010041, 64
   auto-refresh-dialog.component.ts100100100100 
   columns-button.component.ts100100100100 
   columns-modify-dialog.component.ts96.8710093.33100 
   count-tasks-by-status.component.ts1005010010048
   page-header.component.ts8010008039
   page-section-header.component.ts8010008031
   page-section.component.ts100100100100 
   refresh-button.component.ts100100100100 
   share-url.component.ts92.851007592.337
   show-card-content.component.ts100100100100 
   spinner.component.ts100100100100 
   table-actions-toolbar.component.ts100100100100 
   table-container.component.ts100100100100 
   view-tasks-by-status-dialog.component.ts100100100100 
   view-tasks-by-status.component.ts100100100100 
components/filters88.5568.4287.2388.83 
   filters-chips.component.ts100100100100 
   filters-dialog-and.component.ts100100100100 
   filters-dialog-filter-field.component.ts86.275.7592.385.9699–100, 132, 174, 198–202
   filters-dialog-input.component.ts48.279.0937.55084–113, 124–132
   filters-dialog-or.component.ts100100100100 
   filters-dialog.component.ts100100100100 
   filters-toolbar.component.ts100100100100 
components/navigation99.4410097.3699.42 
   add-external-service-dialog.component.ts100100100100 
   edit-external-service-dialog.component.ts100100100100 
   form-external-service.component.ts100100100100 
   manage-external-services-dialog.component.ts100100100100 
   navigation.component.ts98.1410088.8898.11215
   theme-selector.component.ts100100100100 
components/table100100100100 
   table-empty-data.component.ts100100100100 
dashboard100100100100 
   index.component.ts100100100100 
dashboard/components100100100100 
   add-line-dialog.component.ts100100100100 
   add-statuses-group-dialog.component.ts100100100100 
   edit-name-line-dialog.component.ts100100100100 
   edit-status-group-dialog.component.ts100100100100 
   form-name-line.component.ts100100100100 
   form-statuses-group.component.ts100100100100 
   line.component.ts100100100100 
   manage-groups-dialog.component.ts100100100100 
   reorganize-lines-dialog.component.ts100100100100 
   split-lines-dialog.component.ts100100100100 
   statuses-group-card.component.ts100100100100 
dashboard/services100100100100 
   dashboard-index.service.ts100100100100 
   dashboard-storage.service.ts100100100100 
directives50100050 
   no-wrap.directive.ts501000505–6
pipes500040 
   empty-cell.pipe.ts5000406–10
services98.3695.4195.6998.24 
   auto-refresh.service.ts100100100100 
   date-handler.service.ts100100100100 
   default-config.service.ts100100100100 
   environment.service.ts80100507519
   filters.service.ts100100100100 
   icons.service.ts100100100100 
   navigation.service.ts10080100100109
   notification.service.ts100100100100 
   query-params.service.ts100100100100 
   share-url.service.ts100100100100 
   storage.service.ts98.0310010097.9595
   table-storage.service.ts500042.8511–31
   table-url.service.ts100100100100 
   table.service.ts100100100100 
   tasks-by-status.service.ts100100100100 
   user-grpc.service.ts100100100100 
   user.service.ts100100100100 
   utils.service.ts100100100100 
   versions-grpc.service.ts100100100100 
   versions.service.ts1007010010014, 25, 32
sessions/services93.336087.592.85 
   sessions-filters.service.ts95.836010095.65145
   sessions-statuses.service.ts83.33100508013
tasks/services77.455083.7876.53 
   tasks-filters.service.ts100100100100 
   tasks-grpc.service.ts23.330020.6813–151
   tasks-index.service.ts100100100100 
   tasks-statuses.service.ts100100100100 
tokens100100100100 
   filters.token.ts100100100100 
types100100100100 
   filter-definition.ts100100100100 

Please sign in to comment.