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

feat(QTM-786): Added "button" type to prevent form submission when opening options list #588

Merged
merged 2 commits into from
Oct 2, 2024

Conversation

MarcosViniciusPC
Copy link
Contributor

@MarcosViniciusPC MarcosViniciusPC commented Sep 30, 2024

Description

https://jirasoftware.catho.com.br/browse/QTM-786

Review guide

  • Unit tests (yarn test:components)
  • Code review

How to test

  • Clone quantum

  • Edit the stories/DropdownLight/DropdownLight.regrssion-test.story.jsx file

  • Replace the Template constant with:
    const Template = (args) => { const handleOnSubmit = (e) => { e.preventDefault(); console.log('Formulário enviado. Esse não é o comportamento esperado!'); }; return <form onSubmit={handleOnSubmit}><DropdownLight items={itemsObjectMock} {...args} /></form> };. The idea is that when selecting an item from DropdownLight, no form submission is triggered.

  • Use the node version defined in .nvmrc in the repository root

  • Run yarn && yarn test:regression:storybook

  • In the browser, access http://localhost:9006/ and look for the DropdownLight/Default tests.

  • Now select an item and see if the form is triggered. If true, the component is still having problems.

@MarcosViniciusPC MarcosViniciusPC changed the title feat(QTM-786): feat(QTM-786): Added "button" type to prevent form submission when opening options list Sep 30, 2024
Copy link

@MarcosViniciusPC MarcosViniciusPC merged commit 160f344 into master Oct 2, 2024
3 checks passed
@MarcosViniciusPC MarcosViniciusPC deleted the QTM-786 branch October 2, 2024 13:21
Copy link

github-actions bot commented Oct 2, 2024

🎉 This PR is included in version 9.33.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

github-actions bot commented Oct 4, 2024

🎉 This PR is included in version 10.0.0-beta.13 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants