blob: acbd022be4bd521c0141ca74d9163106188fddba (
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.application;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
import com.vaadin.testbench.By;
import com.vaadin.tests.tb3.MultiBrowserTest;
public class RefreshFragmentChangeTest extends MultiBrowserTest {
@Override
protected Class<?> getUIClass() {
return com.vaadin.tests.application.RefreshStatePreserve.class;
}
@Test
public void testFragmentChange() throws Exception {
openTestURL();
assertLogText("1. Initial fragment: null");
getDriver().get(getTestUrl() + "#asdf");
assertLogText("2. Fragment changed to asdf");
openTestURL();
assertLogText("3. Fragment changed to null");
}
private void assertLogText(String expected) {
waitForElementPresent(By.className("v-label"));
assertEquals("Incorrect log text,", expected, getLogRow(0));
}
}
|