test: cenários de login e registro com Cypress#1702
test: cenários de login e registro com Cypress#1702LuizWalendowsky wants to merge 5 commits intocypress-io:developfrom
Conversation
|
|
|
data/database.json
Outdated
| "avatar": "https://avatars.dicebear.com/api/human/uBmeaz5pX.svg", | ||
| "defaultPrivacyLevel": "public", | ||
| "balance": 150953, | ||
| "balance": 0, |
There was a problem hiding this comment.
Test artifacts accidentally committed to database file
High Severity
The data/database.json runtime database was committed with test run side effects. Heath93's balance changed from 150953 to 0, WHjJ4qR2R2's balance changed from 49474 to 12000079474, and multiple test transactions, notifications, and bank transfers were added. This file is populated from database-seed.json via db:seed:dev, and committing a dirty state corrupts the starting data for all other developers and CI runs.
Additional Locations (2)
|
|
||
|
|
||
|
|
||
| }); |
There was a problem hiding this comment.
Tests lack database seeding, breaking test independence
High Severity
All three new test files are missing cy.task("db:seed") in a beforeEach hook. Every existing test file in cypress/tests/ui/ calls cy.task("db:seed") before each test to reset the database to a known state. Without this, the tests depend on whatever state previous tests left behind — the registration test creates users that persist, and the transaction test modifies balances permanently. This makes tests non-deterministic and not independent, contradicting the stated goal.
Additional Locations (2)
| loginPage.checkAccessInvalid() | ||
| }); | ||
|
|
||
| }); |
There was a problem hiding this comment.
Invalid credentials test nested under success describe block
Low Severity
The describe('Tentar fazer login com credenciais inválidas') block is incorrectly nested inside describe('Login com sucesso'). This groups the invalid-credentials test under the "successful login" suite, creating a misleading test hierarchy. These two describe blocks represent distinct scenarios and belong at the same nesting level.
| expect(balanceAfter).to.eq(balanceBefore) | ||
| }) | ||
| }) | ||
| }) |
There was a problem hiding this comment.
Insufficient funds test asserts non-existent application behavior
High Severity
The test on line 32 asserts cy.contains('Insufficient Funds').should('be.visible'), but the application has no insufficient-funds validation — neither createTransaction in the backend nor any frontend code checks the sender's balance. The comments on lines 25–26 explicitly acknowledge this: the system allows the transaction to proceed. This test will always fail and break CI. It needs to be skipped or removed until the application implements the validation.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 5 total unresolved issues (including 4 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f04f3bb. Configure here.
| it('Deve exibir mensagens de erro ao tentar registrar um novo usuário sem preencher todas as informações obrigatórias', () => { | ||
| registerPage.fillPartialRegisterForm('Teste', `user${Date.now()}`, 's3cret') | ||
| registerPage.checkSignupButtonDisabled() | ||
| registerPage.checkFirstNameRequiredMessage() |
There was a problem hiding this comment.
Validation message won't appear for untouched firstName field
Medium Severity
fillPartialRegisterForm never interacts with the firstName field, then checkFirstNameRequiredMessage asserts #firstName-helper-text is visible with "First Name is required". The app's SignUpForm.tsx only renders the helper text when touched || value !== initialValue. Since firstName is never focused, blurred, or changed, both conditions are false and no error message is rendered. This test will always fail.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit f04f3bb. Configure here.


🧪 Automação de Testes - Cypress Real World App
📌 Objetivo
Implementar automação de testes E2E utilizando Cypress para validar os principais fluxos do Real World App.
✅ Escopo
Foram automatizados os seguintes cenários:
🧠 Abordagem
describe)🐞 Bugs identificados
⚙️ Observações
Done)📸 Evidências
Login com sucesso
https://prnt.sc/xfekM9231oC0
Login com credenciais inválidas
https://prnt.sc/mnaeNW69wEDT
Registro com informações incompletas
https://prnt.sc/ODUoSk1eCzv4
Registro de novo usuário com sucesso
https://prnt.sc/Dllz2NPkllXK
Bug envio com saldo insuficiente
https://prnt.sc/_ZuoCGBWxxaV
Validação de estado sem transações para novos usuários
https://prnt.sc/0f2V-YmK-VL6