Skip to content

Commit ac55660

Browse files
committed
test(mobile): align fork identity fixtures with upstream npub labels
Upstream block#7488/block#7493 made the compact npub the canonical identity label and made shortPubkey return 'Unknown identity' for non-key strings. Three fork tests still expected raw-hex truncation or accepted invalid keys: update fixtures/expectations to the npub contract. Behavior under test (plain-text actor labels, digest author naming) is unchanged. Signed-off-by: Michael Feth <[email protected]>
1 parent 908e07b commit ac55660

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎mobile/test/features/channels/thread_detail_page/task_detail_sheet_test.dart‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,11 @@ void main() {
239239
expect(find.textContaining('To do'), findsOneWidget);
240240
// 'In progress' appears in the header status and the transition row.
241241
expect(find.textContaining('In progress'), findsWidgets);
242-
// Actor pubkeys render truncated, plain text.
242+
// Actor pubkeys render as the canonical compact npub label, plain text.
243243
final actorText = tester.widget<Text>(
244244
find.byKey(const ValueKey('task-event-actor-1')),
245245
);
246-
expect(actorText.data, '${'a' * 8}\u2026');
246+
expect(actorText.data, 'npub1424…rcaj');
247247
});
248248

249249
testWidgets('omits the summary section entirely when absent', (

‎mobile/test/features/channels/thread_summarize_action_test.dart‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,19 @@ void main() {
2929
},
3030
);
3131

32-
expect(digest.map((entry) => entry.author), ['Ada', 'def456']);
32+
expect(digest.map((entry) => entry.author), ['Ada', 'Unknown identity']);
3333
expect(digest.map((entry) => entry.text), ['first', 'second']);
3434
});
3535

3636
test('shortens a long pubkey when no profile is cached', () {
3737
final digest = threadSummaryDigest([
3838
_message(
3939
id: '1',
40-
pubkey: 'aaaaaaaabbbbbbbbccccccccdddddddd',
40+
pubkey: 'b' * 64,
4141
content: 'hello',
4242
),
4343
], profiles: const {});
44-
expect(digest.single.author, 'aaaaaaaa…');
44+
expect(digest.single.author, 'npub1hwa…04hu');
4545
});
4646

4747
test('drops system rows, which are chrome rather than conversation', () {

0 commit comments

Comments
 (0)