We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, i'm trying to make the library work on a angular project with test in karma framework
import { Component, Input } from '@angular/core'; import { FiltreLocalStorageService } from 'src/app/service/filter-local-storage/filter-local-storage.service'; import { FiltreDataService } from 'src/app/service/filtre-data/filtre-data.service'; import { SecurityService } from 'src/app/service/security/security.service';
@component({ selector: 'app-filtre-numero-serie', templateUrl: './filtre-numero-serie.component.html', styleUrls: ['./filtre-numero-serie.component.scss'] }) export class FiltreNumeroSerieComponent {
@input() vue: string;
numeroSerie: string = '' placeholder: string = "Numéro de série"
constructor(private filtreDataService: FiltreDataService,private storageService :FiltreLocalStorageService,private securityService : SecurityService) { }
onKeyEnter(event: any) { this.filtreDataService.updateFilter(this.vue, { numeroSerie: this.numeroSerie.trim() }); this.securityService.logUserActivityObservable('Vue Borne, utilisation du filtre: matricule valeur ' + this.numeroSerie) }
getNumeroSerie(){ this.filtreDataService.updateFilter(this.vue, { numeroSerie: this.numeroSerie.trim() }); }
ngOnInit(){ let filtresInStorage = this.storageService.getFiltres(this.vue) this.numeroSerie = filtresInStorage ? filtresInStorage.numSerie : '' this.filtreDataService.subscribeToVue(this.vue,(filtreData) => this.numeroSerie = filtreData.numeroSerie) }
}
I got this test generate
// @ts-nocheck import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { Pipe, PipeTransform, Injectable, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, Directive, Input, Output } from '@angular/core'; import { isPlatformBrowser } from '@angular/common'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { By } from '@angular/platform-browser'; import { Observable, of as observableOf, throwError } from 'rxjs';
import { Component } from '@angular/core'; import { FiltreNumeroSerieComponent } from './filtre-numero-serie.component'; import { FiltreDataService } from 'src/app/service/filtre-data/filtre-data.service'; import { FiltreLocalStorageService } from 'src/app/service/filter-local-storage/filter-local-storage.service'; import { SecurityService } from 'src/app/service/security/security.service';
@Injectable() class MockFiltreDataService {}
@Injectable() class MockFiltreLocalStorageService {}
@Injectable() class MockSecurityService {}
@directive({ selector: '[myCustom]' }) class MyCustomDirective { @input() myCustom; }
.....
Mock are not generated properly, how can i config that ?
Thanks
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, i'm trying to make the library work on a angular project with test in karma framework
import { Component, Input } from '@angular/core';
import { FiltreLocalStorageService } from 'src/app/service/filter-local-storage/filter-local-storage.service';
import { FiltreDataService } from 'src/app/service/filtre-data/filtre-data.service';
import { SecurityService } from 'src/app/service/security/security.service';
@component({
selector: 'app-filtre-numero-serie',
templateUrl: './filtre-numero-serie.component.html',
styleUrls: ['./filtre-numero-serie.component.scss']
})
export class FiltreNumeroSerieComponent {
@input() vue: string;
numeroSerie: string = ''
placeholder: string = "Numéro de série"
constructor(private filtreDataService: FiltreDataService,private storageService :FiltreLocalStorageService,private securityService : SecurityService) { }
onKeyEnter(event: any) {
this.filtreDataService.updateFilter(this.vue, { numeroSerie: this.numeroSerie.trim() });
this.securityService.logUserActivityObservable('Vue Borne, utilisation du filtre: matricule valeur ' + this.numeroSerie)
}
getNumeroSerie(){
this.filtreDataService.updateFilter(this.vue, { numeroSerie: this.numeroSerie.trim() });
}
ngOnInit(){
let filtresInStorage = this.storageService.getFiltres(this.vue)
this.numeroSerie = filtresInStorage ? filtresInStorage.numSerie : ''
this.filtreDataService.subscribeToVue(this.vue,(filtreData) => this.numeroSerie = filtreData.numeroSerie)
}
}
I got this test generate
// @ts-nocheck
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { Pipe, PipeTransform, Injectable, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, Directive, Input, Output } from '@angular/core';
import { isPlatformBrowser } from '@angular/common';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { By } from '@angular/platform-browser';
import { Observable, of as observableOf, throwError } from 'rxjs';
import { Component } from '@angular/core';
import { FiltreNumeroSerieComponent } from './filtre-numero-serie.component';
import { FiltreDataService } from 'src/app/service/filtre-data/filtre-data.service';
import { FiltreLocalStorageService } from 'src/app/service/filter-local-storage/filter-local-storage.service';
import { SecurityService } from 'src/app/service/security/security.service';
@Injectable()
class MockFiltreDataService {}
@Injectable()
class MockFiltreLocalStorageService {}
@Injectable()
class MockSecurityService {}
@directive({ selector: '[myCustom]' })
class MyCustomDirective {
@input() myCustom;
}
.....
Mock are not generated properly, how can i config that ?
Thanks
The text was updated successfully, but these errors were encountered: