blob: fc948ab3db29af5d1e16cdab901988fa901e598b (
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.components.ui;
import org.junit.Assert;
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) {
Assert.assertEquals("Unexpected log contents,", expected, getLogRow(0));
}
}
|