- Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathTask1.java
More file actions
Latest commit
61 lines (49 loc) · 1.92 KB
/
Copy pathTask1.java
File metadata and controls
61 lines (49 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
packageselenium.tasks;
importorg.junit.After;
importorg.junit.Before;
importorg.junit.Test;
importorg.openqa.selenium.WebDriver;
importorg.openqa.selenium.chrome.ChromeDriver;
importjava.io.File;
publicclassTask1 {
WebDriverdriver;
@Before
publicvoidopenPage() {
StringlibWithDriversLocation = System.getProperty("user.dir") + File.separator + "lib" + File.separator;
System.setProperty("webdriver.chrome.driver", libWithDriversLocation + "chromedriver" + newselenium.ChangeToFileExtension().extension());
driver = newChromeDriver();
driver.get("https://kristinek.github.io/site/tasks/enter_a_number");
}
@After
publicvoidcloseBrowser() {
driver.close();
}
@Test
publicvoiderrorOnText() {
// TODO
// enter a text instead of a number, check that correct error is seen
}
@Test
publicvoiderrorOnNumberTooSmall() {
// TODO
// enter number which is too small (below 50), check that correct error is seen
}
@Test
publicvoiderrorOnNumberTooBig() {
// BUG: if I enter number 666 no errors where seen
// TODO
// enter number which is too big (above 100), check that correct error is seen
}
@Test
publicvoidcorrectSquareRootWithoutRemainder() {
// TODO
// enter a number between 50 and 100 digit in the input (square root of which doesn't have a remainder, e.g. 2 is square root of 4),
// then and press submit and check that correct no error is seen and check that square root is calculated correctly
}
@Test
publicvoidcorrectSquareRootWithRemainder() {
// TODO
// enter a number between 50 and 100 digit in the input (square root of which doesn't have a remainder, e.g. 1.732.. is square root of 3) and press submit,
// then check that correct no error is seen and check that square root is calculated correctly
}
}