mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-20 06:51:55 +00:00
Added HomePage_ShouldSucceedLogin E2E test
This commit is contained in:
@@ -29,9 +29,23 @@ public class HomePageTests : IDisposable
|
|||||||
Assert.True(loginForm.Displayed);
|
Assert.True(loginForm.Displayed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void HomePage_ShouldSucceedLogin()
|
||||||
|
{
|
||||||
|
_driver.Navigate().GoToUrl(serverUrl);
|
||||||
|
IWebElement username = _driver.FindElement(By.Id("username"));
|
||||||
|
username.SendKeys("admin");
|
||||||
|
IWebElement password = _driver.FindElement(By.Id("password"));
|
||||||
|
password.SendKeys("Test1234.");
|
||||||
|
IWebElement submit = _driver.FindElement(By.CssSelector("button[type=\"submit\"]"));
|
||||||
|
submit.Click();
|
||||||
|
Thread.Sleep(250);
|
||||||
|
Assert.Contains("/Home/Index", _driver.Url);
|
||||||
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
_driver.Quit();
|
_driver.Quit();
|
||||||
serverProcess.Close();
|
serverProcess.Kill();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user