Add another test case.

This commit is contained in:
Dillon Kearns 2022-03-19 14:57:22 -07:00
parent 26f9f02697
commit 3d24e970e0

View File

@ -53,6 +53,17 @@ suite =
[ text "Hello Jane!"
]
|> ProgramTest.done
, test "back to login page with session" <|
\() ->
start "/login" mockData
|> ProgramTest.ensureBrowserUrl (Expect.equal "https://localhost:1234/login")
|> ProgramTest.fillInDom "name" "Name" "Jane"
|> ProgramTest.submitForm
|> ProgramTest.ensureBrowserUrl (Expect.equal "https://localhost:1234/greet")
|> ProgramTest.routeChange "/login"
|> ProgramTest.ensureBrowserUrl (Expect.equal "https://localhost:1234/login")
|> ProgramTest.ensureViewHas [ text "Hello Jane!" ]
|> ProgramTest.done
]