3 use BookStack\JointPermission;
5 use BookStack\Repos\EntityRepo;
7 class HomepageTest extends TestCase
10 public function test_default_homepage_visible()
13 $homeVisit = $this->get('/');
14 $homeVisit->assertSee('My Recently Viewed');
15 $homeVisit->assertSee('Recently Updated Pages');
16 $homeVisit->assertSee('Recent Activity');
19 public function test_custom_homepage() {
21 $name = 'My custom homepage';
22 $content = 'This is the body content of my custom homepage.';
23 $customPage = $this->newPage(['name' => $name, 'html' => $content]);
24 $this->setSettings(['app-homepage' => $customPage->id]);
26 $homeVisit = $this->get('/');
27 $homeVisit->assertSee($name);
28 $homeVisit->assertSee($content);
29 $homeVisit->assertSee('My Recently Viewed');
30 $homeVisit->assertSee('Recently Updated Pages');
31 $homeVisit->assertSee('Recent Activity');