fix: render shortened names as initial and surname
This commit is contained in:
1 parent
bbb0a8aaa2
commit
09415c4722
2 files changed
+10
-8
No files matched your search
@@ -56,20 +56,21 @@ class FloorPlanTest extends WebTestCase
|
||||
$this->book($desk, $this->user('[email protected]', 'Bea Kranz'), 540, 780);
|
||||
|
||||
self::assertSame(
|
||||
['Schreibtisch 01', 'Bea K. 09:00–13:00', 'frei ab 13:00'],
|
||||
['Schreibtisch 01', 'B. Kranz 09:00–13:00', 'frei ab 13:00'],
|
||||
$this->linesOf($this->board()),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Full names are shortened so a card stays one line per booking at phone width.
|
||||
* Full names are shortened so a card stays one line per booking at phone width. The surname
|
||||
* survives, not the first name, so two colleagues sharing a first name stay distinguishable.
|
||||
*/
|
||||
public function testALongNameIsShortenedToAFirstNameAndInitial(): void
|
||||
public function testALongNameIsShortenedToAnInitialAndTheSurname(): void
|
||||
{
|
||||
$desk = $this->desk();
|
||||
$this->book($desk, $this->user('[email protected]', 'Maximilian Wolkenstein'), 0, 1440);
|
||||
|
||||
self::assertContains('Maximilian W.', $this->linesOf($this->board()));
|
||||
self::assertContains('M. Wolkenstein', $this->linesOf($this->board()));
|
||||
}
|
||||
|
||||
public function testASingleWordNameIsLeftAlone(): void
|
||||
@@ -94,7 +95,7 @@ class FloorPlanTest extends WebTestCase
|
||||
$desk = $this->desk();
|
||||
$this->book($desk, $this->user('[email protected]', 'Bea Kranz'), 0, 1440);
|
||||
|
||||
self::assertSame(['Schreibtisch 01', 'Bea K.'], $this->linesOf($this->board()));
|
||||
self::assertSame(['Schreibtisch 01', 'B. Kranz'], $this->linesOf($this->board()));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -112,7 +113,7 @@ class FloorPlanTest extends WebTestCase
|
||||
$lines = $this->linesOf($this->board());
|
||||
|
||||
self::assertSame(
|
||||
['Schreibtisch 01', 'Ann A. bis 06:00', 'Bea B. 06:00–12:00', '+2 weitere'],
|
||||
['Schreibtisch 01', 'A. Alpha bis 06:00', 'B. Beta 06:00–12:00', '+2 weitere'],
|
||||
$lines,
|
||||
);
|
||||
// Label plus MAX_LINES, never more.
|
||||
|
||||
Reference in new issue
Block a user