mirror of
https://github.com/flarum/core.git
synced 2025-08-11 02:44:04 +02:00
chore: improve group mentions parsing (#3723)
* chore: improve group mentions color handling * Avoid storing the `GroupMention--dark` and light classes on the database. * Avoid recreating YIQ logic on the backend. * Improve text color flexibility through CSS variables. * Apply fixes from StyleCI * chore: tweak tests * chre: unused import Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
This commit is contained in:
@@ -84,7 +84,8 @@ class GroupMentionsTest extends TestCase
|
||||
|
||||
$response = json_decode($response->getBody(), true);
|
||||
|
||||
$this->assertStringContainsString('<p>One of the <span style="background:#80349E" class="GroupMention ">@Mods<i class="icon fas fa-bolt"></i></span> will look at this</p>', $response['data']['attributes']['contentHtml']);
|
||||
$this->assertStringContainsString('GroupMention', $response['data']['attributes']['contentHtml']);
|
||||
$this->assertStringContainsString('#80349E', $response['data']['attributes']['contentHtml']);
|
||||
$this->assertNotNull(CommentPost::find($response['data']['id'])->mentionsGroups->find(4));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user