1 37 package net.sourceforge.cruisecontrol.webtest; 38 39 import net.sourceforge.jwebunit.WebTestCase; 40 41 public class PluginsWebTest extends WebTestCase { 42 private static final String BASE = "/cruisecontrol/plugins.jspa?project=connectfour"; 43 private static final String ALL_BOOTSTRAPPERS_URL = BASE + "&pluginType=bootstrapper"; 44 private static final String ALL_PUBLISHERS_URL = BASE + "&pluginType=publisher"; 45 private static final String ALL_SOURCE_CONTROLS_URL = BASE + "&pluginType=sourcecontrol"; 46 47 protected void setUp() throws Exception { 48 super.setUp(); 49 getTestContext().setBaseUrl("http://localhost:7854"); 50 } 51 52 public void testShouldBeAccessibleFromBasicConfigPage() throws Exception { 53 beginAt("/cruisecontrol/config.jspa"); 54 assertLinkPresentWithText("Bootstrappers"); 55 56 gotoPage("/cruisecontrol/config.jspa"); 57 assertLinkPresentWithText("Publishers"); 58 59 gotoPage("/cruisecontrol/config.jspa"); 60 assertLinkPresentWithText("Source Controls"); 61 } 62 63 public void testShouldListAvailableBootstrappers() { 64 beginAt(ALL_BOOTSTRAPPERS_URL); 65 assertFormPresent("load-bootstrapper"); 66 assertFormElementPresent("pluginName"); 67 } 68 69 public void testShouldListAvailablePublishers() { 70 beginAt(ALL_PUBLISHERS_URL); 71 assertFormPresent("load-publisher"); 72 assertFormElementPresent("pluginName"); 73 } 74 75 public void testShouldListAvailableSourceControls() { 76 beginAt(ALL_SOURCE_CONTROLS_URL); 77 assertFormPresent("load-sourcecontrol"); 78 assertFormElementPresent("pluginName"); 79 } 80 } 81 | Popular Tags |