Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
feat(e2e): spec REAL de criação de orçamento ponta-a-ponta + 6 data-testids #11
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
Uh oh!
There was an error while loading. Please reload this page.
feat(e2e): spec REAL de criação de orçamento ponta-a-ponta + 6 data-testids #11
Changes from all commits
c123ca3File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
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.
The test decides to
skipimmediately after opening the product dialog by checkingcount()once, but the product list is loaded asynchronously (useQueryis enabled only when the dialog opens andfilteredProductsisproducts || []initially). On slower environments this transient0causes a false skip even when products exist, so the end-to-end subtotal path silently never runs and regressions can slip through. Replace the one-shot count with a wait/poll for either a product option or a stable empty-state condition before skipping.Useful? React with 👍 / 👎.
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.
Right after selecting a product, the test checks
isVisible()forproduct-add-without-coloronly once and proceeds if it's false, but that button appears after an async variant-stock fetch. In environments where variants load slowly, this branch is missed, no variant is selected, and the subsequent item assertion times out intermittently; the flow should wait for either the no-color action or the item row to appear before continuing.Useful? React with 👍 / 👎.
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 sincronização usa um seletor que não garante item de produto adicionado.
Na Linha 116,
Sel.quote.item(0)referencia item indexado do wizard; esse elemento já pode estar visível antes da adição do produto. Isso enfraquece a validação do passo de inclusão.Diff sugerido
📝 Committable suggestion
🤖 Prompt for AI Agents
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.
The test is named as if it validates
qty × unit_price, but the assertion only checks that subtotal is greater than zero. Any regression that still produces a positive number (for example duplicated multipliers, stale discounts, or wrong unit price source) will pass unnoticed, so this does not actually protect the stated business rule.Useful? React with 👍 / 👎.
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.
After reload, the persistence check only verifies that some
R$text is visible, which can still be true when the saved item was not persisted (the page can render default totals likeR$ 0,00even with an empty quote). In that scenario the test passes while the server-side item persistence regressed, so this assertion does not validate the behavior described by the test.Useful? React with 👍 / 👎.
Uh oh!
There was an error while loading. Please reload this page.