mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Hotfix: correct issues from PRs rollout (#10993)
* fix(various): correct issues from PRs rollout 1. Send Gems modal opens from profiles again 2. Contributor titles appear on hover again 3. Tags dropdown in tasks appears again 4. Only user's own @mentions get highlighted again * fix(test): correct order of css classes in expect
This commit is contained in:
@@ -7,14 +7,14 @@ describe('highlightUserAndEmail', () => {
|
||||
|
||||
const result = highlightUsers(text, 'user', 'displayedUser');
|
||||
|
||||
expect(result).to.contain('<span class="at-highlight at-text">@displayedUser</span>');
|
||||
expect(result).to.contain('<span class="at-text at-highlight">@displayedUser</span>');
|
||||
});
|
||||
|
||||
it('highlights username', () => {
|
||||
const text = 'hello @user';
|
||||
|
||||
const result = highlightUsers(text, 'user', 'displayedUser');
|
||||
expect(result).to.contain('<span class="at-highlight at-text">@user</span>');
|
||||
expect(result).to.contain('<span class="at-text at-highlight">@user</span>');
|
||||
});
|
||||
|
||||
it('not highlights any email', () => {
|
||||
@@ -32,8 +32,8 @@ describe('highlightUserAndEmail', () => {
|
||||
|
||||
const result = highlightUsers(text, 'use', 'mentions');
|
||||
|
||||
expect(result).to.contain('<span class="at-highlight at-text">@mentions</span>');
|
||||
expect(result).to.contain('<span class="at-highlight at-text">@use</span>');
|
||||
expect(result).to.not.contain('<span class="at-highlight at-text">@mentions</span>.com');
|
||||
expect(result).to.contain('<span class="at-text at-highlight">@mentions</span>');
|
||||
expect(result).to.contain('<span class="at-text at-highlight">@use</span>');
|
||||
expect(result).to.not.contain('<span class="at-text at-highlight">@mentions</span>.com');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user