Skip to content

Commit

Permalink
fix: avoid scrolling up after show/hide permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
SGrueber authored and shauke committed Dec 22, 2023
1 parent 5828513 commit 6263074
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
</ul>
<p>
<!-- Expand/Collapse user permissions -->
<a *ngIf="!isExpanded[i]" [routerLink]="[]" (click)="toggleExpanded(i)">
<a *ngIf="!isExpanded[i]" (click)="toggleExpanded(i)" (keydown.enter)="toggleExpanded(i)" tabindex="0">
{{ 'account.user.details.profile.role.show_permissions.link' | translate }}&nbsp;
<fa-icon [icon]="['fas', 'angle-down']" />
</a>
<a *ngIf="isExpanded[i]" [routerLink]="[]" (click)="toggleExpanded(i)">
<a *ngIf="isExpanded[i]" (click)="toggleExpanded(i)" (keydown.enter)="toggleExpanded(i)" tabindex="0">
{{ 'account.user.details.profile.role.hide_permissions.link' | translate }}&nbsp;
<fa-icon [icon]="['fas', 'angle-up']" />
</a>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ReactiveFormsModule } from '@angular/forms';
import { RouterTestingModule } from '@angular/router/testing';
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
import { TranslateModule } from '@ngx-translate/core';
import { MockComponent } from 'ng-mocks';
Expand Down Expand Up @@ -41,7 +40,7 @@ describe('User Roles Selection Component', () => {
when(organizationManagementFacade.role$(approverRole.id)).thenReturn(of(approverRole));

await TestBed.configureTestingModule({
imports: [ReactiveFormsModule, RouterTestingModule, TranslateModule.forRoot()],
imports: [ReactiveFormsModule, TranslateModule.forRoot()],
declarations: [MockComponent(FaIconComponent), UserRolesSelectionComponent],
providers: [{ provide: OrganizationManagementFacade, useFactory: () => instance(organizationManagementFacade) }],
}).compileComponents();
Expand Down

0 comments on commit 6263074

Please sign in to comment.