Skip to content

Commit

Permalink
fix: truncated quantities
Browse files Browse the repository at this point in the history
  • Loading branch information
achannarasappa committed Mar 8, 2021
1 parent 254cb01 commit f08af8a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/ui/component/watchlist/watchlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func buildCells(quote Quote, position Position, config c.Config, styles c.Styles
cells = append(
[]grid.Cell{
{Text: textPositionExtendedLabels(position, styles), Width: 15, Align: grid.Right, VisibleMinWidth: widthMinTerm + 15},
{Text: textPositionExtended(quote, position, styles), Width: 7, Align: grid.Right, VisibleMinWidth: widthMinTerm},
{Text: textPositionExtended(quote, position, styles), Width: 10, Align: grid.Right, VisibleMinWidth: widthMinTerm},
},
cells...,
)
Expand Down
6 changes: 3 additions & 3 deletions internal/ui/component/watchlist/watchlist_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -567,8 +567,8 @@ Google Inc. ↓ -32.02 (-1.35
},
}
expected := strings.Join([]string{
"PTON ● Quantity: 100.00 105.00 (0.00%) 100.00",
"Peloton Avg. Cost: 0.00 ↑ 55.00 (110.00%) ↑ 10.00 (10.00%)",
"PTON ● Quantity: 100.00 105.00 (0.00%) 100.00",
"Peloton Avg. Cost: 0.00 ↑ 55.00 (110.00%) ↑ 10.00 (10.00%)",
}, "\n")
Expect("\n" + removeFormatting(m.View())).To(Equal("\n" + expected))
})
Expand Down Expand Up @@ -597,7 +597,7 @@ Google Inc. ↓ -32.02 (-1.35
},
}
expected := strings.Join([]string{
"PTON 100.00",
"PTON 100.00",
"Peloton ↑ 10.00 (10.00%)",
}, "\n")
Expect("\n" + removeFormatting(m.View())).To(Equal("\n" + expected))
Expand Down

0 comments on commit f08af8a

Please sign in to comment.