mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-04-13 00:18:08 +00:00
Added test cases.
Signed-off-by: Abijeet <abijeetpatro@gmail.com>
This commit is contained in:
parent
86b2ddbd28
commit
47cb99a2d6
1 changed files with 19 additions and 0 deletions
|
@ -49,4 +49,23 @@ class HomepageTest extends TestCase
|
|||
$homeVisit->assertSee($name);
|
||||
$homeVisit->assertStatus(200);
|
||||
}
|
||||
|
||||
public function test_set_book_homepage()
|
||||
{
|
||||
$editor = $this->getEditor();
|
||||
setting()->putUser($editor, 'books_view_type', 'grid');
|
||||
|
||||
$this->setSettings(['app-book-homepage' => true]);
|
||||
|
||||
$this->asEditor();
|
||||
$homeVisit = $this->get('/');
|
||||
$homeVisit->assertSee('Books');
|
||||
$homeVisit->assertSee('book-grid-item grid-card');
|
||||
$homeVisit->assertSee('grid-card-content');
|
||||
$homeVisit->assertSee('grid-card-footer');
|
||||
$homeVisit->assertSee('featured-image-container');
|
||||
|
||||
$this->setSettings(['app-book-homepage' => false]);
|
||||
$this->test_default_homepage_visible();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue