Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
gdotdesign committed Apr 19, 2023
1 parent f12a536 commit 4965dcd
Showing 1 changed file with 12 additions and 32 deletions.
44 changes: 12 additions & 32 deletions tests/Header.mint
Original file line number Diff line number Diff line change
@@ -1,45 +1,25 @@
suite "Header" {
test "it has a logo" {
with
Test.Html

{
<Header/>
|> start()
|> assertElementExists("[data-selector=brand] svg")
}
<Header/>
|> Test.Html.start()
|> Test.Html.assertElementExists("[data-selector=brand] svg")
}

test "it has a brand name" {
with
Test.Html

{
<Header/>
|> start()
|> assertTextOf("span", "Conduit")
}
<Header/>
|> Test.Html.start()
|> Test.Html.assertTextOf("span", "Conduit")
}

test "it renders the sign in link" {
with
Test.Html

{
<Header/>
|> start()
|> assertTextOf("div[data-selector=links] a:first-child", "Sign in")
}
<Header/>
|> Test.Html.start()
|> Test.Html.assertTextOf("div[data-selector=links] a:first-child", "Sign in")
}

test "it renders the sign up link" {
with
Test.Html

{
<Header/>
|> start()
|> assertTextOf("div[data-selector=links] a:last-child", "Sign up")
}
<Header/>
|> Test.Html.start()
|> Test.Html.assertTextOf("div[data-selector=links] a:last-child", "Sign up")
}
}

0 comments on commit 4965dcd

Please sign in to comment.