1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-07 23:03:00 +03:00

Merge branch 'feature-613' of git://github.com/Abijeet/BookStack into Abijeet-feature-613

This commit is contained in:
Dan Brown
2017-12-29 16:25:15 +00:00
7 changed files with 55 additions and 4 deletions

View File

@@ -82,6 +82,27 @@ class EntityTest extends BrowserKitTest
->see($firstChapter->name);
}
public function test_toggle_book_view()
{
$editor = $this->getEditor();
setting()->putUser($editor, 'books_view_type', 'grid');
$this->actingAs($editor)
->visit('/books')
->pageHasElement('.featured-image-container')
->submitForm('Toggle Book View')
// Check redirection.
->seePageIs('/books')
->pageNotHasElement('.featured-image-container');
$this->actingAs($editor)
->visit('/books')
->submitForm('Toggle Book View')
->seePageIs('/books')
->pageHasElement('.featured-image-container');
}
public function pageCreation($chapter)
{
$page = factory(Page::class)->make([
@@ -155,7 +176,7 @@ class EntityTest extends BrowserKitTest
->type($book->name, '#name')
->type($book->description, '#description')
->press('Save Book');
$expectedPattern = '/\/books\/my-first-book-[0-9a-zA-Z]{3}/';
$this->assertRegExp($expectedPattern, $this->currentUri, "Did not land on expected page [$expectedPattern].\n");

View File

@@ -103,7 +103,7 @@ class UserProfileTest extends BrowserKitTest
$this->actingAs($editor)
->visit('/books')
->pageNotHasElement('.featured-image-container')
->pageHasElement('.entity-list-item');
->pageHasElement('.content .entity-list-item');
}
public function test_books_view_is_grid()