Skip to content

Added tests for TextAreaFormField#59

Merged
wintondeshong merged 3 commits into
rsm-hcd:mainfrom
SaidShah:add-tests-for-molecules-text-area-form-field
Oct 28, 2020
Merged

Added tests for TextAreaFormField#59
wintondeshong merged 3 commits into
rsm-hcd:mainfrom
SaidShah:add-tests-for-molecules-text-area-form-field

Conversation

@SaidShah
Copy link
Copy Markdown
Contributor

  • Related GitHub issue(s) linked in PR description
  • Destination branch merged, built and tested with your changes
  • Code formatted and follows best practices and patterns
  • Code builds cleanly (no additional warnings or errors)
  • Manually tested
  • Automated tests are passing
  • No decreases in automated test coverage
  • Documentation updated (readme, docs, comments, etc.)
  • Localization: No hard-coded error messages in code files (minimally in string constants)
  • New component and/ or properties? Make sure to update storybook

Closes #27

@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 26, 2020

Codecov Report

Merging #59 into main will increase coverage by 0.53%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #59      +/-   ##
==========================================
+ Coverage   20.62%   21.15%   +0.53%     
==========================================
  Files          51       51              
  Lines         897      898       +1     
  Branches      209      209              
==========================================
+ Hits          185      190       +5     
+ Misses        702      701       -1     
+ Partials       10        7       -3     
Impacted Files Coverage Δ
src/molecules/form-fields/text-area-form-field.tsx 100.00% <100.00%> (+33.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2368707...f49fc2a. Read the comment docs.

@SaidShah SaidShah requested a review from jstevenson October 27, 2020 14:18
import { render } from "@testing-library/react";
import { TextAreaFormField } from "./text-area-form-field";
import {
TextAreaFormField,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Minor: alphabetize

expect(getByText(testErrorMessage)).not.toBeNil();
});

test("when has errorsMessage prop, renders text area form field with error message", () => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Minor: prop is named errorMessage, not errorsMessage.

expect(result).not.toBeNil();
});

test(`when isValid prop is true, renders with out ${InvalidInputClassName} class name`, () => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Minor: change with out to without

@SaidShah SaidShah requested a review from jstevenson October 27, 2020 17:07
Copy link
Copy Markdown
Contributor

@wintondeshong wintondeshong left a comment

Choose a reason for hiding this comment

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

@SaidShah please expound upon the errorMessages prop test below and then we are good to approve

Comment thread src/molecules/form-fields/text-area-form-field.test.tsx Outdated
Comment thread src/molecules/form-fields/text-area-form-field.test.tsx Outdated
Comment thread src/molecules/form-fields/text-area-form-field.test.tsx Outdated
@wintondeshong wintondeshong self-assigned this Oct 28, 2020
Copy link
Copy Markdown
Contributor

@wintondeshong wintondeshong left a comment

Choose a reason for hiding this comment

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

@SaidShah thanks for the quick turn around on these changes! Approved 👍

@wintondeshong wintondeshong merged commit fc7eda2 into rsm-hcd:main Oct 28, 2020
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.

Backfill tests for Molecules/TextAreaFormField

3 participants