test: add test for request card component#994
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Summary by CodeRabbit
WalkthroughThree new skipped test cases were added to the extension requests test suite, and a new skipped test suite with three tests was added for request cards in dev mode. The mock data for pending requests was updated to include a "reason" field in the first entry. No existing tests or logic were modified. Changes
Sequence Diagram(s)sequenceDiagram
participant Tester
participant UI
participant MockData
Tester->>UI: Navigate to filtered requests page (dev mode)
UI->>MockData: Fetch pending requests with reasons
MockData-->>UI: Return mock request data
UI-->>Tester: Display request/extension request cards
Tester->>UI: Click approve or reject button
UI->>UI: Remove card from display
UI-->>Tester: Updated UI reflects removal
Possibly related PRs
Suggested reviewers
Poem
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (3)
__tests__/extension-requests/extension-requests.test.js(1 hunks)__tests__/requests/requests.test.js(1 hunks)mock-data/requests/index.js(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (2)
__tests__/extension-requests/extension-requests.test.js (4)
mock-data/constants.js (1)
LOCAL_TEST_PAGE_URL(2-2)mock-data/extension-requests/index.js (1)
extensionRequestsListPending(97-147)extension-requests/script.js (3)
taskTitle(642-646)approveButton(905-909)approveButton(971-974)mock-data/tasks/index.js (1)
taskDone(1-25)
__tests__/requests/requests.test.js (5)
mock-data/constants.js (1)
LOCAL_TEST_PAGE_URL(2-2)requests/script.js (1)
card(253-263)extension-requests/script.js (2)
approveButton(905-909)approveButton(971-974)profile-diff-details/script.js (1)
rejectButton(202-207)mock-data/requests/index.js (1)
pendingRequest(1-20)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: test
- GitHub Check: Cloudflare Pages
🔇 Additional comments (1)
mock-data/requests/index.js (1)
11-11: Addition of necessary mock data fieldThe
reasonproperty has been added to the pendingRequest mock data object, which will be used in the new test cases to verify proper rendering of this field in the request cards.
48dff13 to
2ac618a
Compare
Deploying dashboard-rds with
|
| Latest commit: |
357ba4b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://25c70d16.dashboard-rds.pages.dev |
| Branch Preview URL: | https://test-request-card.dashboard-rds.pages.dev |
4649f05 to
d6cd0bb
Compare
pankajjs
left a comment
There was a problem hiding this comment.
All my suggestions have been addressed.
LGTM
9fa53ea
d6cd0bb to
9fa53ea
Compare
Date: 09 May 2025
Developer Name: @AnujChhikara
Issue Ticket Number
Description
🔧 Note: Tests are currently skipped as the related feature code has not yet been pushed.
Documentation Updated?
Under Feature Flag
Database Changes
Breaking Changes
Development Tested?
Screenshots
Screenshot 1
Test Coverage
Screenshot 1
Additional Notes