Skip to content

Commit

Permalink
Issue CollaboraOnline#52: Harcoded entity labels.
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronGilMartinez committed Nov 22, 2024
1 parent ccfa8e7 commit a3ca7a9
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ class GroupMediaViewsTest extends BrowserTestBase {
public function testViewLinks(): void {
// Add configuration needed for testing.
$group_type = $this->createGroupType(['id' => 'group_type_1']);
$media_type = $this->createMediaType('file', ['id' => 'document']);
$this->createMediaType('file', [
'id' => 'document',
'label' => 'Document',
]);
$this->createGroupRole([
'group_type' => 'group_type_1',
'scope' => PermissionScopeInterface::INSIDER_ID,
Expand All @@ -64,7 +67,7 @@ public function testViewLinks(): void {

// Create content.
$group = $this->createGroup(['type' => 'group_type_1']);
for ($i = 1; $i < 4; $i++) {
for ($i = 0; $i < 3; $i++) {
$media = $this->createMediaEntity('document', [
'id' => 'media_' . $i,
'name' => 'Media ' . $i,
Expand Down Expand Up @@ -101,8 +104,8 @@ public function testViewLinks(): void {
$i = 0;
foreach (Media::loadMultiple() as $media) {
$cols = $rows[$i]->findAll('css', 'td');
$this->assertEquals($media->getName(), $cols[0]->getText());
$this->assertEquals($media_type->label(), $cols[1]->getText());
$this->assertEquals('Media ' . $i, $cols[0]->getText());
$this->assertEquals('Document', $cols[1]->getText());
$this->assertEquals('Yes', $cols[2]->getText());
$this->assertEquals('Anonymous', $cols[3]->getText());
$operation_links = $cols[4]->findAll('css', 'a');
Expand Down

0 comments on commit a3ca7a9

Please sign in to comment.