Default templates: Added permission checks to selector test

This commit is contained in:
Dan Brown 2023-12-12 15:41:56 +00:00
parent 2081a783f3
commit 2f3806244c
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9

View file

@ -262,7 +262,7 @@ class EntitySearchTest extends TestCase
// Visit both to make popular
$this->asEditor()->get($templatePage->getUrl());
$this->asEditor()->get($nonTemplatePage->getUrl());
$this->get($nonTemplatePage->getUrl());
$normalSearch = $this->get('/search/entity-selector-templates?term=test');
$normalSearch->assertSee($templatePage->name);
@ -275,6 +275,14 @@ class EntitySearchTest extends TestCase
$defaultListTest = $this->get('/search/entity-selector-templates');
$defaultListTest->assertSee($templatePage->name);
$defaultListTest->assertDontSee($nonTemplatePage->name);
$this->permissions->disableEntityInheritedPermissions($templatePage);
$normalSearch = $this->get('/search/entity-selector-templates?term=test');
$normalSearch->assertDontSee($templatePage->name);
$defaultListTest = $this->get('/search/entity-selector-templates');
$defaultListTest->assertDontSee($templatePage->name);
}
public function test_sibling_search_for_pages()