Revize f0567ed4
Přidáno uživatelem Jakub Schenk před asi 2 roky(ů)
Backend/FrontendTesting/LoginTesting.cs | ||
---|---|---|
15 | 15 |
{ |
16 | 16 |
public class LoginTesting |
17 | 17 |
{ |
18 |
public IWebDriver [] drivers = { new FirefoxDriver(), new ChromeDriver()};
|
|
19 |
public string url = ""; |
|
18 |
public IWebDriver[] drivers = Drivers.GetDrivers();
|
|
19 |
public string url = "localhost:3000";
|
|
20 | 20 |
public By usernameField = By.Id(""); |
21 | 21 |
public By passwordField = By.Id(""); |
22 | 22 |
public By loginButton = By.Id(""); |
23 | 23 |
|
24 | 24 |
|
25 | 25 |
[TestMethod] |
26 |
[DataRow ("aaa", "aaa")]
|
|
27 |
[DataRow("bbb", "bbb")]
|
|
28 |
[DataRow("ccc", "ccc")]
|
|
26 |
[DataRow ("admin", "admin")]
|
|
27 |
[DataRow("annotator1", "password")]
|
|
28 |
[DataRow("annotator2", "password")]
|
|
29 | 29 |
public void Login_Correct(string username, string password) |
30 | 30 |
{ |
31 | 31 |
foreach (IWebDriver driver in drivers) |
... | ... | |
48 | 48 |
|
49 | 49 |
|
50 | 50 |
[TestMethod] |
51 |
[DataRow("aaa", "abc")] |
|
52 |
[DataRow("bbb", "")] |
|
53 |
[DataRow("", "abc")] |
|
51 |
[DataRow("admin", "admin")] |
|
52 |
[DataRow("annotator1", "annotator1")] |
|
53 |
[DataRow("annotator1", "")] |
|
54 |
[DataRow("", "password")] |
|
54 | 55 |
public void Login_Incorrect(string username, string password) |
55 | 56 |
{ |
56 | 57 |
foreach (IWebDriver driver in drivers) |
Také k dispozici: Unified diff
utils
utils added for frontend testing - drivers