Skip to content
New issue

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

Possible false positives in FormBuilder unit tests due to props mismatch #478

Open
nateplusplus opened this issue Jul 29, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@nateplusplus
Copy link
Contributor

I've found that a prop in two unit tests is spelled with incorrect case (uses camelCase instead of lowercase), which results in a false-positive test because the mocked prop is simply not used. If the case is fixed, the tests fail.

In the following two unit tests, the mocked prop uiSchema is passed into the FormBuilder component, however since the prop must match in case, it is not used by FormBuilder because it is expecting all lowercase uischema.

False positive tests:

  1. FormBuilder > supports column size
  2. FormBuilder > supports column size on sections

When correcting the case of this prop, the tests fail, because it seems that some fields are being flagged as "unrecognized properties". Example: "Unrecognized UI schema property: newInput1".

Note: It's not clear whether the mocks are simply incorrect on these tests, or if there truly is a missed error.

@raymond-lam raymond-lam added the bug Something isn't working label Sep 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants