< Summary

Information
Class: RaidLoop.Client.Components.StashPanel
Assembly: RaidLoop.Client
File(s): /home/runner/work/RaidLoop/RaidLoop/src/RaidLoop.Client/Components/StashPanel.razor
Line coverage
0%
Covered lines: 0
Uncovered lines: 13
Coverable lines: 13
Total lines: 27
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
BuildRenderTree(...)0%620%
get_Items()100%210%
get_GetPrimaryActionLabel()100%210%
get_CanMoveToLoadoutItem()100%210%
get_CanSellItem()100%210%
get_GetSellPrice()100%210%
get_OnMoveToLoadout()100%210%
get_OnSell()100%210%

File(s)

/home/runner/work/RaidLoop/RaidLoop/src/RaidLoop.Client/Components/StashPanel.razor

#LineLine coverage
 1<div>
 2    <h3>Storage</h3>
 3    <p>Your secured items. They cannot be lost when you raid.</p>
 04    @for (var i = 0; i < Items.Count; i++)
 5    {
 06            var stashIndex = i;
 07            var item = Items[stashIndex];
 8            <div class="row-item">
 9                <ItemTypeIcon Type="item.Type" />
 010                <span class="item-name rarity-@item.DisplayRarity.ToString().ToLower()">@ItemPresentationCatalog.GetLabe
 11                <div class="row-actions">
 012                    <button class="action" disabled="@(!CanMoveToLoadoutItem(item))" @onclick="() => OnMoveToLoadout.Inv
 013                    <button class="action" disabled="@(!CanSellItem(item))" @onclick="() => OnSell.InvokeAsync(stashInde
 14                </div>
 15            </div>
 16        }
 17</div>
 18
 19@code {
 020    [Parameter, EditorRequired] public IReadOnlyList<Item> Items { get; set; } = [];
 021    [Parameter, EditorRequired] public Func<Item, string> GetPrimaryActionLabel { get; set; } = _ => string.Empty;
 022    [Parameter, EditorRequired] public Func<Item, bool> CanMoveToLoadoutItem { get; set; } = _ => false;
 023    [Parameter, EditorRequired] public Func<Item, bool> CanSellItem { get; set; } = _ => false;
 024    [Parameter, EditorRequired] public Func<Item, int> GetSellPrice { get; set; } = _ => 0;
 025    [Parameter, EditorRequired] public EventCallback<int> OnMoveToLoadout { get; set; }
 026    [Parameter, EditorRequired] public EventCallback<int> OnSell { get; set; }
 27}