Add only post node test
This commit is contained in:
parent
7714b20d3c
commit
3eb71026c1
1 changed files with 17 additions and 0 deletions
|
@ -58,4 +58,21 @@ class BlogPageTest extends BrowserTestBase {
|
||||||
$assert->pageTextContains('Post three');
|
$assert->pageTextContains('Post three');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testOnlyPostNodesAreShown(): void {
|
||||||
|
PostBuilder::create()->setTitle('Post one')->getPost();
|
||||||
|
PostBuilder::create()->setTitle('Post two')->getPost();
|
||||||
|
|
||||||
|
$this->createNode([
|
||||||
|
'title' => 'This is not a post',
|
||||||
|
'type' => 'page',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$this->drupalGet('/blog');
|
||||||
|
|
||||||
|
$assert = $this->assertSession();
|
||||||
|
$assert->pageTextContains('Post one');
|
||||||
|
$assert->pageTextContains('Post two');
|
||||||
|
$assert->pageTextNotContains('This is not a post');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue