/
ProgressCircularTests.java
70 lines (62 loc) · 3.05 KB
/
ProgressCircularTests.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 io.github.epam.vuetify.tests.common;
import io.github.com.dataproviders.ProgressCircularDataProvider;
import io.github.epam.TestsInit;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import static com.jdiai.tools.Timer.waitCondition;
import static io.github.com.StaticSite.progressCircularPage;
import static io.github.com.pages.ProgressCircularPage.colorProgressCirculars;
import static io.github.com.pages.ProgressCircularPage.indeterminateProgressCirculars;
import static io.github.com.pages.ProgressCircularPage.rotateProgressCirculars;
import static io.github.com.pages.ProgressCircularPage.sizeWidthProgressCirculars;
public class ProgressCircularTests extends TestsInit {
@BeforeClass
public void before() {
progressCircularPage.open();
waitCondition(() -> progressCircularPage.isOpened());
progressCircularPage.checkOpened();
}
@Test(dataProvider = "colorProgressCircularsTestsDataProvider", dataProviderClass = ProgressCircularDataProvider.class,
description = "Test checks parameters of progress circular")
public void colorProgressCircularsTests(int index, String color, int height, int width, int value) {
colorProgressCirculars.get(index).is()
.displayed()
.notSpinning()
.color(color)
.height(height)
.width(width)
.value(value)
.text(String.valueOf(index));
}
@Test(dataProvider = "indeterminateProgressCircularsTestsDataProvider", dataProviderClass = ProgressCircularDataProvider.class,
description = "Test checks parameters of indeterminate progress circular")
public void indeterminateProgressCircularsTests(int index, String color, int height, int width) {
indeterminateProgressCirculars.get(index).is()
.displayed()
.spinning()
.color(color)
.height(height)
.width(width);
}
@Test(dataProvider = "rotateProgressCircularsTestsDataProvider", dataProviderClass = ProgressCircularDataProvider.class,
description = "Test checks parameters of rotate progress circular")
public void rotateProgressCircularsTests(int index, String color, int height, int width, int rotate) {
rotateProgressCirculars.get(index).is()
.displayed()
.color(color)
.height(height)
.width(width)
.rotation(rotate);
}
@Test(dataProvider = "sizeWidthProgressCircularsTestsDataProvider", dataProviderClass = ProgressCircularDataProvider.class,
description = "Test checks size and width of progress circular")
public void sizeWidthProgressCircularsTests(int index, String color, int height, int width, int thickness) {
sizeWidthProgressCirculars.get(index).is()
.displayed()
.spinning()
.color(color)
.height(height)
.width(width)
.thickness(thickness);
}
}