-
Notifications
You must be signed in to change notification settings - Fork 0
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
fix#59/melhora menssagem de erro e ajusta casos de teste (fga-eps-mds/2024.2-ARANDU-DOC#59) #53
fix#59/melhora menssagem de erro e ajusta casos de teste (fga-eps-mds/2024.2-ARANDU-DOC#59) #53
Conversation
@@ -17,8 +17,14 @@ class TextName extends StatelessWidget { | |||
return Padding( | |||
padding: padding, | |||
child: TextFormField( | |||
validator: (value) => | |||
value == null || value.trim().length < 3 ? '$label inválido' : null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use $label nas suas mensagens de erro se vc quiser se referir ao nome do campo.
@@ -43,10 +43,16 @@ class RegisterAccountViewModel extends ChangeNotifier { | |||
); | |||
// Chamada do serviço de registro | |||
await RegisterService.register(request); | |||
ScaffoldMessenger.of(context).showSnackBar( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A view mode não deve ser responsável por nada visual, ela só deve ser responsvavel por comportamento e estados
a documentação explica o que deve estar em cada camada.
test/ui/Shared/TextName_test.dart
Outdated
await testName(" a", 'Nome inválido'); // Nome com menos de 3 caracteres | ||
await testName("Jo", 'Nome inválido'); // Nome com 2 caracteres | ||
await testName("", 'Campo Obrigatório'); // Campo vazio | ||
await testName(" a", 'Nome inválido (Ex: Ana)'); // Nome com menos de 3 caracteres |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A mensagem deve explicar qual é o erro para que o usuario possa corrigir
"Digite pelo menos 3 caracteres visíveis. (Ex : Ana)"
…thub.com/fga-eps-mds/2024.2-ARANDU-APP into fix#59/ajusta-menssagem-register_account
Quality Gate failedFailed conditions See analysis details on SonarQube Cloud Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parabéns, ficou ótimo!
Descrição
Este pull request adiciona/modifica register_account, shared e test , conforme previsto na issue fga-eps-mds/2024.2-ARANDU-DOC#59.
Revisão
Checklist