-
-
Notifications
You must be signed in to change notification settings - Fork 64
/
Copy pathLetterSoundTest.java
70 lines (51 loc) · 2.12 KB
/
LetterSoundTest.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
package selenium.content.letter_sound;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import lombok.extern.slf4j.Slf4j;
import selenium.content.MainContentPage;
import selenium.util.DomainHelper;
@Slf4j
public class LetterSoundTest {
private WebDriver driver;
@BeforeEach
public void setUp() {
log.info("setUp");
ChromeOptions chromeOptions = new ChromeOptions();
// Read "headless" property set on the command line:
// mvn clean verify -P regression-test-ui -D headless=true
String headlessSystemProperty = System.getProperty("headless");
log.info("headlessSystemProperty: \"" + headlessSystemProperty + "\"");
if ("true".equals(headlessSystemProperty)) {
chromeOptions.addArguments("headless");
}
driver = new ChromeDriver(chromeOptions);
driver.get(DomainHelper.getBaseUrl() + "/content");
}
@AfterEach
public void tearDown() {
log.info("tearDown");
driver.quit();
}
@Test
public void testRandomLetterSoundEditPage() {
log.info("testRandomLetterSoundEditPage");
MainContentPage mainContentPage = new MainContentPage(driver);
mainContentPage.pressLetterSoundListLink();
LetterSoundListPage letterSoundListPage = new LetterSoundListPage(driver);
letterSoundListPage.pressRandomLetterSound();
LetterSoundEditPage letterSoundEditPage = new LetterSoundEditPage(driver);
}
@Test
public void testLetterSoundCreatPage() {
log.info("testLetterSoundCreatePage");
MainContentPage mainContentPage = new MainContentPage(driver);
mainContentPage.pressLetterSoundListLink();
LetterSoundListPage letterSoundListPage = new LetterSoundListPage(driver);
letterSoundListPage.pressCreateButton();
LetterSoundCreatePage letterSoundCreatePage = new LetterSoundCreatePage(driver);
}
}