mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-05-02 16:52:50 +00:00
fix for unit tests
This commit is contained in:
parent
4377835153
commit
830bc8140d
@ -75,7 +75,6 @@ describe('EthernetHubsAddTemplateComponent', () => {
|
|||||||
it('should call add template', () => {
|
it('should call add template', () => {
|
||||||
spyOn(mockedBuiltInTemplatesService, 'addTemplate').and.returnValue(of({} as EthernetHubTemplate));
|
spyOn(mockedBuiltInTemplatesService, 'addTemplate').and.returnValue(of({} as EthernetHubTemplate));
|
||||||
component.templateName = "sample name";
|
component.templateName = "sample name";
|
||||||
component.numberOfPorts = 2;
|
|
||||||
component.server = {id: 1} as Server;
|
component.server = {id: 1} as Server;
|
||||||
component.formGroup.controls['templateName'].setValue('template name');
|
component.formGroup.controls['templateName'].setValue('template name');
|
||||||
component.formGroup.controls['numberOfPorts'].setValue('1');
|
component.formGroup.controls['numberOfPorts'].setValue('1');
|
||||||
@ -89,7 +88,6 @@ describe('EthernetHubsAddTemplateComponent', () => {
|
|||||||
spyOn(mockedBuiltInTemplatesService, 'addTemplate').and.returnValue(of({} as EthernetHubTemplate));
|
spyOn(mockedBuiltInTemplatesService, 'addTemplate').and.returnValue(of({} as EthernetHubTemplate));
|
||||||
spyOn(mockedToasterService, 'error');
|
spyOn(mockedToasterService, 'error');
|
||||||
component.templateName = "";
|
component.templateName = "";
|
||||||
component.numberOfPorts = 2;
|
|
||||||
component.server = {id: 1} as Server;
|
component.server = {id: 1} as Server;
|
||||||
|
|
||||||
component.addTemplate();
|
component.addTemplate();
|
||||||
|
@ -75,7 +75,6 @@ describe('EthernetSwitchesAddTemplateComponent', () => {
|
|||||||
it('should call add template', () => {
|
it('should call add template', () => {
|
||||||
spyOn(mockedBuiltInTemplatesService, 'addTemplate').and.returnValue(of({} as EthernetSwitchTemplate));
|
spyOn(mockedBuiltInTemplatesService, 'addTemplate').and.returnValue(of({} as EthernetSwitchTemplate));
|
||||||
component.templateName = "sample name";
|
component.templateName = "sample name";
|
||||||
component.numberOfPorts = 2;
|
|
||||||
component.server = {id: 1} as Server;
|
component.server = {id: 1} as Server;
|
||||||
component.formGroup.controls['templateName'].setValue('template name');
|
component.formGroup.controls['templateName'].setValue('template name');
|
||||||
component.formGroup.controls['numberOfPorts'].setValue('1');
|
component.formGroup.controls['numberOfPorts'].setValue('1');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user