Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds a UI message and corresponding tests for when there are no upcoming deals, updates test services to support the new “no records” scenario, and bumps the package version and CI coverage thresholds.
- Switched
Booleantobooland addedNoRecordsflags in test services for gift cards and deals - Introduced an
UpcomingDealsNoRecordscomponent and updatedUpcomingDeals.razorand BUnit tests - Updated
InformationalVersionand raised CIMIN_LINE_COVERAGE/MIN_BRANCH_COVERAGE
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| StpFoodBlazorTest/Services/TestGiftCardService.cs | Switched to C# built-in bool and left array init |
| StpFoodBlazorTest/Services/TestDealService.cs | Added NoRecords logic and standardized types |
| StpFoodBlazorTest/Pages/UpcomingDealsTest.razor | Added test for “no upcoming deals” message |
| StpFoodBlazor/StpFoodBlazor.csproj | Bumped InformationalVersion to 0.6.1 |
| StpFoodBlazor/Components/Pages/UpcomingDeals.razor | Render “no records” component when no deals |
| StpFoodBlazor/Components/Layout/Deals/UpcomingDealsNoRecords.razor | New “no upcoming deals” UI |
| .github/workflows/test.yml | Raised minimum coverage thresholds |
Comments suppressed due to low confidence (3)
StpFoodBlazorTest/Services/TestDealService.cs:14
- [nitpick] The test services use
Datafor gift cards butDealsfor deal events; consider unifying property names (e.g., useDataeverywhere orItems) to improve consistency.
public DealEvent[] Deals { get; set; } = [];
.github/workflows/test.yml:22
- The coverage thresholds were raised significantly; ensure the new metrics are reliably met or consider smaller increments to avoid CI failures.
MIN_LINE_COVERAGE: 95
StpFoodBlazorTest/Services/TestGiftCardService.cs:15
- [nitpick] Consider using Array.Empty() instead of the literal [] for an empty array; this avoids allocations and is a more conventional pattern.
public GiftCard[] Data { get; set; } = [];
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.