refactor: edit chain to extend settings base add edit class

This commit is contained in:
2026-02-17 18:48:46 -03:00
parent 0d49ee6dd8
commit 91c09a0ca3
8 changed files with 81 additions and 37 deletions

View File

@@ -0,0 +1,39 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ChainEditPage } from './chain-edit-page';
import { ActivatedRoute } from '@angular/router';
import { of } from 'rxjs';
import { Chain } from '../../../../models/Chain';
import { ChainSettings } from '../../../../services/chain-settings';
import { provideTranslateService } from '@ngx-translate/core';
describe('ChainEditPage', () => {
let component: ChainEditPage;
let fixture: ComponentFixture<ChainEditPage>;
let activatedRoute: Partial<ActivatedRoute>;
beforeEach(async () => {
activatedRoute = {
data: of({chain: new Chain('Mock', '', 1)}),
};
await TestBed.configureTestingModule({
imports: [ChainEditPage],
providers: [
{ provide: ActivatedRoute, useValue: activatedRoute },
{ provide: ChainSettings, useValue: {} },
provideTranslateService()
],
}).compileComponents();
fixture = TestBed.createComponent(ChainEditPage);
component = fixture.componentInstance;
await fixture.whenStable();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});