blob: 5d7e05ac8554c485359002d39dcf9e48a98dc2fb (
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
31
|
package com.vaadin.tests.components.ui;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
import com.vaadin.tests.tb3.MultiBrowserTest;
public class InitiallyEmptyFragmentTest extends MultiBrowserTest {
@Override
protected Class<?> getUIClass() {
return InitialFragmentEvent.class;
}
@Test
public void testNoFragmentChangeEventWhenInitiallyEmpty() throws Exception {
openTestURL();
/*
* There is no fragment change event when the fragment is initially
* empty
*/
assertLogText(" ");
executeScript("window.location.hash='bar'");
assertLogText("1. Fragment changed from \"no event received\" to bar");
}
private void assertLogText(String expected) {
assertEquals("Unexpected log contents,", expected, getLogRow(0));
}
}
|