Skip to content

Comments

message when no upcoming deals#153

Merged
eebbesen merged 2 commits intomainfrom
upcoming_tests
Jun 21, 2025
Merged

message when no upcoming deals#153
eebbesen merged 2 commits intomainfrom
upcoming_tests

Conversation

@eebbesen
Copy link
Owner

No description provided.

@eebbesen eebbesen requested a review from Copilot June 21, 2025 16:39

This comment was marked as outdated.

@eebbesen eebbesen requested a review from Copilot June 21, 2025 16:46
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Boolean to bool and added NoRecords flags in test services for gift cards and deals
  • Introduced an UpcomingDealsNoRecords component and updated UpcomingDeals.razor and BUnit tests
  • Updated InformationalVersion and raised CI MIN_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 Data for gift cards but Deals for deal events; consider unifying property names (e.g., use Data everywhere or Items) 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; } = [];

@eebbesen eebbesen merged commit cb51ee0 into main Jun 21, 2025
2 checks passed
@eebbesen eebbesen deleted the upcoming_tests branch June 21, 2025 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant