diff --git a/resources/views/home/books.blade.php b/resources/views/home/books.blade.php index 95c0c9df2..a2f2bf796 100644 --- a/resources/views/home/books.blade.php +++ b/resources/views/home/books.blade.php @@ -19,6 +19,10 @@ @endif @include('entities.view-toggle', ['view' => $view, 'type' => 'books']) + + @icon('tag') + {{ trans('entities.tags_view_tags') }} + @include('home.parts.expand-toggle', ['classes' => 'text-link', 'target' => '.entity-list.compact .entity-item-snippet', 'key' => 'home-details']) @include('common.dark-mode-toggle', ['classes' => 'icon-list-item text-link']) diff --git a/resources/views/home/shelves.blade.php b/resources/views/home/shelves.blade.php index 9699d6b96..1265db29e 100644 --- a/resources/views/home/shelves.blade.php +++ b/resources/views/home/shelves.blade.php @@ -19,6 +19,10 @@ @endif @include('entities.view-toggle', ['view' => $view, 'type' => 'bookshelves']) + + @icon('tag') + {{ trans('entities.tags_view_tags') }} + @include('home.parts.expand-toggle', ['classes' => 'text-link', 'target' => '.entity-list.compact .entity-item-snippet', 'key' => 'home-details']) @include('common.dark-mode-toggle', ['classes' => 'icon-list-item text-link']) diff --git a/tests/HomepageTest.php b/tests/HomepageTest.php index eb552b2e2..977ae5256 100644 --- a/tests/HomepageTest.php +++ b/tests/HomepageTest.php @@ -126,9 +126,6 @@ class HomepageTest extends TestCase $homeVisit->assertSee('grid-card-content'); $homeVisit->assertSee('grid-card-footer'); $homeVisit->assertSee('featured-image-container'); - - $this->setSettings(['app-homepage-type' => false]); - $this->test_default_homepage_visible(); } public function test_set_bookshelves_homepage() @@ -145,9 +142,19 @@ class HomepageTest extends TestCase $homeVisit->assertSee('grid-card-content'); $homeVisit->assertSee('featured-image-container'); $this->withHtml($homeVisit)->assertElementContains('.grid-card', $shelf->name); + } - $this->setSettings(['app-homepage-type' => false]); - $this->test_default_homepage_visible(); + public function test_books_and_bookshelves_homepage_has_expected_actions() + { + $this->asEditor(); + + foreach (['bookshelves', 'books'] as $homepageType) { + $this->setSettings(['app-homepage-type' => $homepageType]); + + $html = $this->withHtml($this->get('/')); + $html->assertElementContains('.actions button', 'Dark Mode'); + $html->assertElementContains('.actions a[href$="/tags"]', 'View Tags'); + } } public function test_shelves_list_homepage_adheres_to_book_visibility_permissions()