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

Unexpected logs for PasswordField.test.tsx #1627

Closed
lordrip opened this issue Nov 18, 2024 · 0 comments · Fixed by #1643
Closed

Unexpected logs for PasswordField.test.tsx #1627

lordrip opened this issue Nov 18, 2024 · 0 comments · Fixed by #1643
Assignees
Labels
bug Something isn't working canvas/config-form Configuration form related issues good first issue Good for newcomers help wanted Extra attention is needed testing Unit or integration testing
Milestone

Comments

@lordrip
Copy link
Member

lordrip commented Nov 18, 2024

Please describe the task that needs to be done

When running yarn workspace @kaoto/kaoto run test, there are unexpected logs for

src/components/Form/customField/PasswordField.test.tsx

Logs

 PASS  src/components/Form/customField/PasswordField.test.tsx
  ● Console

    console.error
      Warning: A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components
          at input
          at span
          at TextInputBase (/home/rmartinez/repos/kaoto/node_modules/@patternfly/react-core/src/components/TextInput/TextInput.tsx:118:5)
          at TextInput
          at div
          at InputGroupItem (/home/rmartinez/repos/kaoto/node_modules/@patternfly/react-core/src/components/InputGroup/InputGroupItem.tsx:21:3)
          at div
          at InputGroupBase (/home/rmartinez/repos/kaoto/node_modules/@patternfly/react-core/src/components/InputGroup/InputGroup.tsx:15:3)
          at InputGroup
          at div
          at div
          at GenerateId (/home/rmartinez/repos/kaoto/node_modules/@patternfly/react-core/dist/js/helpers/GenerateId/GenerateId.js:31:9)
          at FormGroup (/home/rmartinez/repos/kaoto/node_modules/@patternfly/react-core/src/components/Form/FormGroup.tsx:37:3)
          at onChange (/home/rmartinez/repos/kaoto/packages/ui/src/components/Form/customField/PasswordField.tsx:30:35)
          at name (/home/rmartinez/repos/kaoto/node_modules/uniforms/cjs/connectField.js:39:70)
          at form
          at AutoForm (/home/rmartinez/repos/kaoto/node_modules/uniforms/cjs/AutoForm.js:14:13)

      41 |     expect(input.getAttribute('type')).toEqual('password');
      42 |     await act(async () => {
    > 43 |       fireEvent.input(input, { target: { value: 'passwd' } });
         |                 ^
      44 |     });
      45 |     const toggle = screen.getByTestId('password-show-hide-button');
      46 |     await act(async () => {
@lordrip lordrip added the bug Something isn't working label Nov 18, 2024
@lordrip lordrip added good first issue Good for newcomers help wanted Extra attention is needed testing Unit or integration testing canvas/config-form Configuration form related issues labels Nov 18, 2024
@tplevko tplevko self-assigned this Nov 19, 2024
@igarashitm igarashitm moved this from New to Backlog in Kanban Board Nov 19, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in Kanban Board Nov 21, 2024
@lordrip lordrip added this to the 2.3.0 milestone Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working canvas/config-form Configuration form related issues good first issue Good for newcomers help wanted Extra attention is needed testing Unit or integration testing
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants