Feat: Highlight cards with important labels
Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
This commit is contained in:
@@ -45,11 +45,13 @@ class LabelTest extends TestCase {
|
||||
'lastModified' => null,
|
||||
'color' => '000000',
|
||||
'ETag' => $label->getETag(),
|
||||
'customSettings' => new \stdClass(),
|
||||
], $label->jsonSerialize());
|
||||
}
|
||||
public function testJsonSerializeCard() {
|
||||
$label = $this->createLabel();
|
||||
$label->setCardId(123);
|
||||
$label->setCustomSettingsArray(['isImportant' => true]);
|
||||
$this->assertEquals([
|
||||
'id' => 1,
|
||||
'title' => 'My Label',
|
||||
@@ -58,6 +60,7 @@ class LabelTest extends TestCase {
|
||||
'lastModified' => null,
|
||||
'color' => '000000',
|
||||
'ETag' => $label->getETag(),
|
||||
'customSettings' => ['isImportant' => true]
|
||||
], $label->jsonSerialize());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,14 +75,16 @@ class LabelServiceTest extends TestCase {
|
||||
$label->setTitle('Label title');
|
||||
$label->setBoardId(123);
|
||||
$label->setColor('00ff00');
|
||||
$label->setCustomSettingsArray(['isImportant' => true]);
|
||||
$this->labelMapper->expects($this->once())
|
||||
->method('insert')
|
||||
->willReturn($label);
|
||||
$b = $this->labelService->create('Label title', '00ff00', 123);
|
||||
$b = $this->labelService->create('Label title', '00ff00', 123, ['isImportant' => true]);
|
||||
|
||||
$this->assertEquals($b->getTitle(), 'Label title');
|
||||
$this->assertEquals($b->getBoardId(), 123);
|
||||
$this->assertEquals($b->getColor(), '00ff00');
|
||||
$this->assertEquals($b->getCustomSettingsArray(), ['isImportant' => true]);
|
||||
}
|
||||
|
||||
|
||||
@@ -111,6 +113,7 @@ class LabelServiceTest extends TestCase {
|
||||
$label->setId(1);
|
||||
$label->setTitle('title');
|
||||
$label->setColor('00ff00');
|
||||
$label->setCustomSettingsArray(['isImportant' => true]);
|
||||
$this->labelMapper->expects($this->once())
|
||||
->method('find')
|
||||
->willReturn($label);
|
||||
@@ -119,6 +122,7 @@ class LabelServiceTest extends TestCase {
|
||||
$expectedLabel->setTitle('title');
|
||||
$expectedLabel->setColor('00ff00');
|
||||
$expectedLabel->setBoardId(1);
|
||||
$expectedLabel->setCustomSettingsArray(['isImportant' => true]);
|
||||
$this->labelMapper->expects($this->once())
|
||||
->method('insert')
|
||||
->with($expectedLabel)
|
||||
|
||||
Reference in New Issue
Block a user