mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-30 04:23:11 +03:00
Fixed incorrect recents pages on homescreen
Fixed the bug causing the recently updated pages to be exaclty the same as the recently create pages. Also added in tests to prevent regression.
This commit is contained in:
@ -225,4 +225,22 @@ class EntityTest extends TestCase
|
||||
->seePageIs($newPageUrl);
|
||||
}
|
||||
|
||||
public function test_recently_updated_pages_on_home()
|
||||
{
|
||||
$page = \BookStack\Page::orderBy('updated_at', 'asc')->first();
|
||||
$this->asAdmin()->visit('/')
|
||||
->dontSeeInElement('#recently-updated-pages', $page->name);
|
||||
$this->visit($page->getUrl() . '/edit')
|
||||
->press('Save Page')
|
||||
->visit('/')
|
||||
->seeInElement('#recently-updated-pages', $page->name);
|
||||
}
|
||||
|
||||
public function test_recently_created_pages_on_home()
|
||||
{
|
||||
$entityChain = $this->createEntityChainBelongingToUser($this->getNewUser());
|
||||
$this->asAdmin()->visit('/')
|
||||
->seeInElement('#recently-created-pages', $entityChain['page']->name);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user