merge: show specific role in moderation posting warning

This commit is contained in:
Tommaso Casaburi
2026-06-01 12:48:47 +07:00
6 changed files with 47 additions and 6 deletions
@@ -1052,6 +1052,24 @@ describe('PostForm', () => {
expect(container.textContent).not.toContain('warning: posting as moderator');
});
it('uses the 5chan dev label for known developer moderator posts', async () => {
testState.account = {
author: { address: 'plebeius.bso', displayName: 'Tom' },
subscriptions: ['music-posting.eth'],
};
testState.resolvedCommunityAddress = 'music-posting.eth';
testState.rolesByCommunity = {
'music-posting.eth': {
'plebeius.bso': { role: 'owner' },
},
};
await renderPostForm('/mu');
await clickByText(container, 'start_new_thread');
expect(container.textContent).toContain('warning: posting as 5chan dev');
});
it('shows the pasted file-link filename next to the upload button', async () => {
testState.uploadedFileName = null;