Skip to content

Commit

Permalink
fix: fixed tests 1
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslan-minukov committed Nov 21, 2024
1 parent ed3b582 commit 86f00e8
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 35 deletions.
2 changes: 1 addition & 1 deletion src/ipa-bcfier-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"start": "ng serve",
"build": "npm run install-fonts && ng build --configuration production",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"test": "ng test --no-watch",
"install-fonts": "node ./copyFonts.js"
},
"private": true,
Expand Down
12 changes: 0 additions & 12 deletions src/ipa-bcfier-ui/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,4 @@ describe('AppComponent', () => {
expect(app).toBeTruthy();
});

it(`should have the 'ipa-bcfier-ui' title`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('ipa-bcfier-ui');
});

it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement as HTMLElement;
expect(compiled.querySelector('h1')?.textContent).toContain('Hello, ipa-bcfier-ui');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,15 @@
</td>
</tr>
</table>

<mat-paginator
[pageSizeOptions]="[5, 10, 25, 100]"
[length]="paginationResult?.totalCount"
[pageSize]="paginationResult?.pageSize"
[pageIndex]="paginationResult.page - 1"
(page)="onPage($event)"
[showFirstLastButtons]="true"
class="dark-theme"
></mat-paginator>
@if(paginationResult) {
<mat-paginator
[pageSizeOptions]="[5, 10, 25, 100]"
[length]="paginationResult.totalCount"
[pageSize]="paginationResult.pageSize"
[pageIndex]="paginationResult.page - 1"
(page)="onPage($event)"
[showFirstLastButtons]="true"
class="dark-theme"
></mat-paginator>
}
</div>
21 changes: 11 additions & 10 deletions src/ipa-bcfier-ui/src/app/components/users/users.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,15 @@
</td>
</tr>
</table>

<mat-paginator
[pageSizeOptions]="[5, 10, 25, 100]"
[length]="paginationResult?.totalCount"
[pageSize]="paginationResult?.pageSize"
[pageIndex]="paginationResult.page - 1"
(page)="onPage($event)"
[showFirstLastButtons]="true"
class="dark-theme"
></mat-paginator>
@if(paginationResult) {
<mat-paginator
[pageSizeOptions]="[5, 10, 25, 100]"
[length]="paginationResult.totalCount"
[pageSize]="paginationResult.pageSize"
[pageIndex]="paginationResult.page - 1"
(page)="onPage($event)"
[showFirstLastButtons]="true"
class="dark-theme"
></mat-paginator>
}
</div>
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { ElementRef } from '@angular/core';
import { TopicPreviewImageDirective } from './topic-preview-image.directive';

describe('TopicPreviewImageDirective', () => {
it('should create an instance', () => {
const directive = new TopicPreviewImageDirective();
const el = new ElementRef<HTMLDivElement>(document.createElement('div'));
const directive = new TopicPreviewImageDirective(el);
expect(directive).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { ElementRef } from '@angular/core';
import { ViewpointImageDirective } from './viewpoint-image.directive';

describe('ViewpointImageDirective', () => {
it('should create an instance', () => {
const directive = new ViewpointImageDirective();
const el = new ElementRef<HTMLDivElement>(document.createElement('div'));
const directive = new ViewpointImageDirective(el);
expect(directive).toBeTruthy();
});
});

0 comments on commit 86f00e8

Please sign in to comment.