Skip to content

fix(textarea): corrige a contagem de caracteres quando o componente é inicializado#88

Open
VictorMFurtado wants to merge 1 commit into
developfrom
victor/textarea-count-fix
Open

fix(textarea): corrige a contagem de caracteres quando o componente é inicializado#88
VictorMFurtado wants to merge 1 commit into
developfrom
victor/textarea-count-fix

Conversation

@VictorMFurtado

Copy link
Copy Markdown

No description provided.

@github-actions

github-actions Bot commented Dec 9, 2020

Copy link
Copy Markdown

Code coverage

Filename Statements Branches Functions Lines
projects/common/src/lib/input/input.component.ts 77.78% 56.67% 77.27% 74.81%
projects/common/src/lib/icon/icon.component.ts 100% 100% 100% 100%
projects/common/src/lib/select/select.component.ts 79.7% 58.93% 73.33% 77.87%
projects/common/src/lib/table/table.component.ts 89.42% 87.5% 78.13% 89.25%
projects/common/src/lib/button/button.component.ts 100% 100% 100% 100%
projects/common/src/lib/card/card.component.ts 100% 100% 100% 100%
projects/common/src/lib/autocomplete/autocomplete.component.ts 54.39% 15.79% 54.55% 49.51%
projects/common/src/lib/textarea/textarea.component.ts 97.67% 83.33% 100% 96.97%
projects/common/src/lib/tag/tag.component.ts 92.31% 100% 50% 90%
projects/common/src/lib/breadcrumb/breadcrumb-item.component.ts 100% 100% 100% 100%
projects/common/src/lib/breadcrumb/breadcrumb.component.ts 100% 100% 100% 100%
projects/common/src/lib/dropmenu/dropmenu-item.component.ts 100% 100% 100% 100%
projects/common/src/lib/dropmenu/dropmenu.component.ts 100% 100% 100% 100%
projects/common/src/lib/label/label.component.ts 100% 100% 100% 100%
projects/common/src/lib/checkbox/checkbox.component.ts 100% 100% 87.5% 100%
projects/common/src/lib/radio/radio-group.component.ts 100% 88.89% 100% 100%
projects/common/src/lib/radio/radio.component.ts 100% 100% 100% 100%
projects/common/src/lib/toast/toast.component.ts 100% 100% 100% 100%
projects/common/src/lib/form/form-section.component.ts 77.78% 50% 75% 75%
projects/common/src/lib/form/fieldset.component.ts 100% 100% 100% 100%
projects/common/src/lib/form/form.component.ts 100% 100% 100% 100%
projects/common/src/lib/modal/modal.component.ts 100% 100% 100% 100%
projects/common/src/lib/file-uploader/file-uploader.component.ts 46.67% 35.9% 20% 40%
projects/common/src/lib/accordion/accordion-item.component.ts 85.71% 100% 66.67% 80%
projects/common/src/lib/accordion/accordion.component.ts 100% 100% 100% 100%

beforeEach(() => {
fixture = TestBed.createComponent(TextareaComponent);
component = fixture.componentInstance;
fixture.detectChanges();

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removi esta linha do beforeEach e adicionei no início de cada teste. Fiz isso para criar um teste no qual eu pudesse iniciar um componente com o campo value preenchido sem afetar os testes que já existiam.


ngOnInit(): void {}
ngOnInit(): void {
this.qntChar = this.value.length;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Esta foi solução mais simples que eu encontrei, mas aceito sugestões =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant