-
Notifications
You must be signed in to change notification settings - Fork 4
fix for failing test cases #199
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
Conversation
… in Whatsapp Forms tests
WalkthroughReplaced generic "More" icon interactions in Cypress WhatsApp form tests with specific icon test IDs for activate/deactivate/delete, and added a 500ms wait in the test flow helper to stabilize an autocomplete interaction; no production code changed. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
cypress/support/flow.js (1)
50-50: Consider waiting for specific UI state instead of hard-coded delay.The
.wait(500)is a timing-based fix that may be brittle across different environments. While this is pragmatic for stabilizing flaky tests, consider waiting for a specific element or network request to appear instead.For example, if the listbox appears after typing, wait for it explicitly:
- cy.get('[data-testid="autocomplete-element"]').click().type('AB').wait(500); + cy.get('[data-testid="autocomplete-element"]').click().type('AB'); + cy.get('ul[role="listbox"]').should('be.visible'); cy.get('ul[role="listbox"]').find('li').contains('AB Test Workflow').click({ force: true });cypress/e2e/wa_forms/wa_form.spec.ts (1)
309-316: LGTM! Direct selector improves test clarity.The change to use the direct
DeleteIconselector aligns with the updated UI pattern and makes the test more maintainable.Minor nitpick: Consider using
.eq(0)instead of.first()for consistency with lines 294 and 303:- cy.get('[data-testid="DeleteIcon"]').first().click(); + cy.get('[data-testid="DeleteIcon"]').eq(0).click();
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
cypress/e2e/wa_forms/wa_form.spec.ts(2 hunks)cypress/support/flow.js(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: glific (1.18.3-otp-27, 27.3.3)
🔇 Additional comments (3)
cypress/e2e/wa_forms/wa_form.spec.ts (2)
293-300: LGTM! Direct selector improves test clarity.The change from the generic
MoreIconpattern to the specificdeactivate-iconselector makes the test more explicit and resilient to UI changes.
302-307: LGTM! Direct selector improves test clarity.The change to use the specific
activate-iconselector makes the test more explicit and aligns with the UI update.cypress/support/flow.js (1)
8-9: No action required – no UI pattern inconsistency exists.The
deleteFlowcommand correctly uses theMoreIcon→DeleteIconpattern, which matches howwa_form.spec.tsdeletes forms (line 310). Thedeactivate-iconandactivate-iconselectors inwa_form.spec.tsare for status management, not deletion, and are unrelated to the deletion flow pattern.Likely an incorrect or invalid review comment.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.