Jev is offered a brand's icon only when its name is one of the Signal's words (#264)
Font Awesome's Mandalorian icon has "disney plus" among its search terms, the only icon with "disney" in them, so a search for Disney Parks' words offered it and Jev picked a Star Wars helmet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -190,5 +190,12 @@ test('Jev is offered the icons found for each word of a Signal', () => {
|
||||
]);
|
||||
const ids = JSON.parse(run(`JSON.stringify(iconCandidates(${all}, 'AI Development', ['programming'], 'The tools', 40).map(c => c[0]))`));
|
||||
assert.deepEqual(ids, ['solid/robot', 'solid/code'], 'each word its icons, "the" none');
|
||||
const brands = JSON.stringify([
|
||||
['brands/mandalorian', 'Mandalorian', 'disney plus helmet star wars'], ['brands/apple', 'Apple', 'fruit ios mac'],
|
||||
['solid/fort-awesome', 'Fort', 'castle'], ['solid/apple-whole', 'Apple Whole', 'fruit'],
|
||||
]);
|
||||
const offered = q => JSON.parse(run(`JSON.stringify(iconCandidates(${brands}, ${JSON.stringify(q)}, [], null, 40).map(c => c[0]))`));
|
||||
assert.deepEqual(offered('Disney castle'), ['solid/fort-awesome'], 'a brand only by its own name, never its search terms (#264)');
|
||||
assert.deepEqual(offered('Apple'), ['brands/apple', 'solid/apple-whole']);
|
||||
assert.equal(run(`signalCounts({items: 12, unread: 1})`), '12 items · 1 unread');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user