-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTask2.java
79 lines (69 loc) · 2.29 KB
/
Task2.java
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
package selenium.tasks;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class Task2 {
WebDriver driver;
@Before
public void openPage() {
String libWithDriversLocation = System.getProperty("user.dir") + "\\lib\\";
System.setProperty("webdriver.chrome.driver", libWithDriversLocation + "chromedriver.exe");
driver = new ChromeDriver();
driver.get("https://kristinek.github.io/sitetasks/provide_feedback");
}
@After
public void closeBrowser() {
driver.quit();
}
@Test
public void initialFeedbackPage() throws Exception {
// TODO:
// check that all field are empty and no tick are clicked
// "Don't know" is selected in "Genre"
// "Choose your option" in "How do you like us?"
// check that the button send is blue with white letters
}
@Test
public void emptyFeedbackPage() throws Exception {
// TODO:
// click "Send" without entering any data
// check fields are empty or null
// check button colors
// (green with white letter and red with white letters)
}
@Test
public void notEmptyFeedbackPage() throws Exception {
// TODO:
// fill the whole form, click "Send"
// check fields are filled correctly
// check button colors
// (green with white letter and red with white letters)
}
@Test
public void yesOnWithNameFeedbackPage() throws Exception {
// TODO:
// enter only name
// click "Send"
// click "Yes"
// check message text: "Thank you, NAME, for your feedback!"
// color of text is white with green on the background
}
@Test
public void yesOnWithoutNameFeedbackPage() throws Exception {
// TODO:
// click "Send" (without entering anything
// click "Yes"
// check message text: "Thank you for your feedback!"
// color of text is white with green on the background
}
@Test
public void noOnFeedbackPage() throws Exception {
// TODO:
// fill the whole form
// click "Send"
// click "No"
// check fields are filled correctly
}
}