Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
devajmeireles committed Sep 17, 2024
1 parent 62986d6 commit e3e8936
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Compilers/EnvBarComponentCompiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ private function links(): ?array
return ['name' => $name, 'url' => $url];
}

return $link;
return ['name' => $link, 'url' => $link];
})->toArray();
}
}
14 changes: 14 additions & 0 deletions tests/Browser/EnvBar/IndexTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,18 @@ public function closable_works_successfully(): void
->assertDontSee('testing');
});
}

#[Test]
public function dropdown_works_successfully(): void
{
$this->beforeServingApplication(fn ($app, Repository $config) => $config->set('envbar.links', 'https://google.com'));

$this->browse(function (Browser $browser): void {
$browser->visit('/')
->waitForText('Environment')
->assertSee('Environment')
->assertSee('testing')
->assertSee('- Useful Links');
});
}
}

0 comments on commit e3e8936

Please sign in to comment.