feat: add site header (#2)
* tests: setup initial infra for end to end tests * tests: rework end to end host * tests: remove need for bang operator * tests: correct header component tests * docs: add README.md to blog directory with instructions on setting up local dev environment with and without docker * docs: update non-developer run command * feat: finish layout of header * feat: add favicon * tests: setup test coverage * chore: update workflow with missing playwright step * chore: add install command
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
@inherits Bunit.TestContext
|
||||
|
||||
@code
|
||||
{
|
||||
[Test]
|
||||
public void Header_WhenRendered_ItShouldContainSiteTitle()
|
||||
{
|
||||
var cut = Render(@<Header />);
|
||||
|
||||
var heading = cut.Find("h1");
|
||||
|
||||
heading.MarkupMatches(@<h1>journal</h1>);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Header_WhenRendered_ItShouldContainAuthorInfo()
|
||||
{
|
||||
var cut = Render(@<Header />);
|
||||
|
||||
var author = cut.Find(".author-container > span");
|
||||
|
||||
author.MarkupMatches(@<span>by</span>);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Header_WhenRendered_ItShouldContainAuthorImage()
|
||||
{
|
||||
var cut = Render(@<Header />);
|
||||
var image = cut.Find("img[alt='Stevan Freeborn']");
|
||||
image.Should().NotBeNull();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user