blob: ba81dab548daa6d5c7bfbe96714b4fe3884199cf (
plain)
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
|
package com.vaadin.tests.layouts.layouttester;
import java.io.IOException;
import java.util.List;
import org.junit.Test;
import com.vaadin.testbench.elements.ButtonElement;
import com.vaadin.tests.tb3.MultiBrowserTest;
public abstract class BaseComponentSizingTest extends MultiBrowserTest {
@Test
public void ComponentSizing() throws IOException, InterruptedException {
openTestURL();
sleep(500);
compareScreen("initial");
String[] states = { "setSize350px", "setSize_-1px", "setSize75Percent",
"setSize100Percent" };
List<ButtonElement> buttons = $(ButtonElement.class).all();
int index = 0;
// go through all buttons click them and see result
for (ButtonElement btn : buttons) {
btn.click();
sleep(500);
compareScreen(states[index]);
index++;
}
}
}
|