Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancescoMolinaro committed Feb 8, 2024
1 parent 52a4212 commit 850554f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ describe('MetricAltmetricComponent', () => {
component = fixture.componentInstance;
component.metric = metricMock;
component.success = true;
component.canLoadScript = true;
component.maxRetry = 0;
fixture.detectChanges();
});
Expand All @@ -50,7 +51,7 @@ describe('MetricAltmetricComponent', () => {
expect(component).toBeTruthy();
});
it('should render badge div', () => {
const div = fixture.debugElement.queryAll(By.css('div'))[2];
const div = fixture.debugElement.queryAll(By.css('div'))[3];
expect(div.nativeElement.className).toEqual('altmetric-embed');
expect(div.nativeElement.dataset.badgePopover).toEqual('bottom');
expect(div.nativeElement.dataset.doi).toEqual('10.1056/Test');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ describe('MetricDimensionsComponent', () => {
component = fixture.componentInstance;
component.metric = metricMock;
component.success = true;
component.canLoadScript = true;
component.maxRetry = 0;
fixture.detectChanges();
});
Expand All @@ -49,7 +50,7 @@ describe('MetricDimensionsComponent', () => {
expect(component).toBeTruthy();
});
it('should render badge div', () => {
const div = fixture.debugElement.queryAll(By.css('div'))[1];
const div = fixture.debugElement.queryAll(By.css('div'))[2];
expect(div.nativeElement.className).toEqual('__dimensions_badge_embed__');
expect(div.nativeElement.dataset.doi).toEqual('10.1056/Test');
expect(div.nativeElement.dataset.style).toEqual('small_rectangle');
Expand Down

0 comments on commit 850554f

Please sign in to comment.