Skip to content

Commit

Permalink
[ACS-8918] Fixed failed job, fixed sonar, addressing PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksanderSklorz committed Dec 4, 2024
1 parent 18e968a commit a200926
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,13 @@ import { NoopTranslateModule } from '@alfresco/adf-core';
class SearchFilterTabbedTestComponent {}

describe('SearchFilterTabbedComponent', () => {
let searchFilterTabbedTestComponent: SearchFilterTabbedTestComponent;
let searchFilterTabbedTestFixture: ComponentFixture<SearchFilterTabbedTestComponent>;

beforeEach(() => {
TestBed.configureTestingModule({
imports: [SearchFilterTabbedTestComponent, NoopTranslateModule, ContentTestingModule]
});
searchFilterTabbedTestFixture = TestBed.createComponent(SearchFilterTabbedTestComponent);
searchFilterTabbedTestComponent = searchFilterTabbedTestFixture.componentInstance;
});

describe('ngOnInit', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ export class SearchFilterTabbedComponent implements OnInit, OnDestroy {
selectedIndex: number = 0;

@ViewChild(MatTabGroup)
private tabGroup: MatTabGroup;
private readonly tabGroup: MatTabGroup;

private intersectionObserver = new IntersectionObserver(
private readonly intersectionObserver = new IntersectionObserver(
(entries) => {
if (!entries[0].isIntersecting) {
this.tabGroup.selectedIndex = (this.selectedIndex + 1) % this.tabsContents.length;
Expand All @@ -52,7 +52,7 @@ export class SearchFilterTabbedComponent implements OnInit, OnDestroy {
}
);

constructor(private element: ElementRef, private changeDetector: ChangeDetectorRef) {}
constructor(private readonly element: ElementRef, private readonly changeDetector: ChangeDetectorRef) {}

ngOnInit(): void {
this.intersectionObserver.observe(this.element.nativeElement);
Expand Down

0 comments on commit a200926

Please sign in to comment.