-
-
Notifications
You must be signed in to change notification settings - Fork 508
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
Increased test coverage for create_event_page.dart
#2737
base: develop-postgres
Are you sure you want to change the base?
Increased test coverage for create_event_page.dart
#2737
Conversation
WalkthroughThis pull request refactors the event creation view by updating state management in the CreateEventPage. The state class has been renamed to be publicly accessible and new updater methods for start/end date and time validations have been introduced. Additionally, the tests have been expanded with new widget cases and improved assertions for date/time interactions and placeholder image display. Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant CP as CreateEventPage
participant DU as DateUpdater
participant TU as TimeUpdater
participant EM as EventModel
U->>CP: Tap on start date tile
CP->>DU: Invoke dateUpdater1 (validate future date)
DU->>EM: Update start date in model
U->>CP: Tap on start time tile
CP->>TU: Invoke timeUpdater1 (ensure start < end)
TU->>EM: Update start time in model
U->>CP: Tap on end date tile
CP->>DU: Invoke dateUpdater2 (validate date sequence)
DU->>EM: Update end date in model
U->>CP: Tap on end time tile
CP->>TU: Invoke timeUpdater2 (ensure end > start)
TU->>EM: Update end time in model
Assessment against linked issues
Possibly related issues
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (3)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🔇 Additional comments (15)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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
Documentation and Community
|
Our Pull Request Approval ProcessThanks for contributing! Testing Your CodeRemember, your PRs won't be reviewed until these criteria are met:
Our policies make our code better. ReviewersDo not assign reviewers. Our Queue Monitors will review your PR and assign them.
Reviewing Your CodeYour reviewer(s) will have the following roles:
Other🎯 Please be considerate of our volunteers' time. Contacting the person who assigned the reviewers is not advised unless they ask for your input. Do not @ the person who did the assignment otherwise. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop-postgres #2737 +/- ##
====================================================
+ Coverage 96.37% 96.54% +0.16%
====================================================
Files 189 189
Lines 10020 10049 +29
====================================================
+ Hits 9657 9702 +45
+ Misses 363 347 -16 ☔ View full report in Codecov by Sentry. |
This PR addresses the same issue as mentioned in Issue #2620. Both issues are identical and this PR aims to resolve them. |
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.
); | ||
if (validationError != null) { | ||
// coverage:ignore-start | ||
navigationService.showTalawaErrorSnackBar( |
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.
Why is this logic removed?
model.recurrenceLabel = 'Does not repeat'; | ||
model.recurrenceEndDate = null; | ||
model.isRecurring = false; | ||
model.frequency = Frequency.weekly; |
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.
Why is this logic removed?
if (validationError != null) { | ||
// coverage:ignore-start | ||
showSnackBar( | ||
'Start time must be before end time', |
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.
Why is this logic removed?
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.
What kind of change does this PR introduce?
Unit tests to improve test coverage for
create_event_page
.Issue Number:
Fixes #1242
Did you add tests for your changes?
Yes
create_event_page
now reaches 100%.Snapshots/Videos:
Summary
create_event_page
file.Does this PR introduce a breaking change?
No
Have you read the contributing guide?
Yes
Summary by CodeRabbit