0.2.54
This commit is contained in:
@@ -158,6 +158,19 @@ func TestPersonalizeHomeRowsPreservesColdStartDefaults(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestPersonalizeHomeRowsKeepsAbandonedShowRecoveryNearTheTop(t *testing.T) {
|
||||
rows := []recommend.Row{
|
||||
{ID: "continue"}, {ID: "for-you:pick-up"}, {ID: "highly-engaged"}, {ID: "latest"},
|
||||
}
|
||||
stats := []store.RowStat{{
|
||||
RowID: "highly-engaged", Impressions: 20, Focuses: 20, Selects: 20, DwellMs: 300_000,
|
||||
}}
|
||||
got := personalizeHomeRows(rows, stats)
|
||||
if got[0].ID != "continue" || got[1].ID != "for-you:pick-up" {
|
||||
t.Fatalf("recovery shelf was buried: %+v", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestPreparedHomeRowsPromotesAbandonedShowsAndTimeAwarePicks(t *testing.T) {
|
||||
prepared := []recommend.Row{
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user