1 package org.glom.web.client;
3 import com.google.gwt.event.dom.client.KeyCodes;
4 import com.google.gwt.user.client.Event;
6 import com.octo.gwt.test.Mock;
7 import com.octo.gwt.test.GwtTestWithEasyMock;
8 import com.octo.gwt.test.utils.events.Browser;
9 import com.octo.gwt.test.utils.events.EventBuilder;
11 import static org.junit.Assert.*;
12 import org.junit.Before;
13 import org.junit.Test;
14 import org.junit.Assert;
16 import org.easymock.EasyMock;
18 public class GwtTestOnlineGlom extends GwtTestWithEasyMock {
20 /** Tell gwt-test-utils to use this mock when trying to create this class via GWT.create() in OnlineGlom.
21 * TODO: Why does only this class need to be mocked?
24 private org.glom.web.client.mvp.AppPlaceHistoryMapper mockAppPlaceHistoryMapper;
26 private OnlineGlom app;
30 public void testSomething() {
32 /* TODO: For instance:
34 Browser.fillText(app.nameField, "123");
37 Browser.click(app.sendButton);
40 assertFalse(app.dialogBox.isShowing());
41 assertEquals("Please enter at least four characters",
42 app.errorLabel.getText());
47 public String getModuleName() {
48 return "org.glom.web.OnlineGlom";
52 public void beforeOnlineGlom() {
53 app = new OnlineGlom();
56 /* TODO: For instance,
57 // Some pre-assertions
58 assertFalse(app.dialogBox.isShowing());
59 assertEquals("", app.errorLabel.getText());