mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 21:42:27 +00:00
added a convenience method
This commit is contained in:
1 parent
4fe1df8686
commit
a895bce94a
1 file changed
+10
@@ -846,6 +846,16 @@ public abstract class HudsonTestCase extends TestCase implements RootAction {
|
||||
return (C)computerConnectorTester.connector;
|
||||
}
|
||||
|
||||
protected User configRoundtrip(User u) throws Exception {
|
||||
submit(createWebClient().goTo(u.getUrl()+"/configure").getFormByName("config"));
|
||||
return u;
|
||||
}
|
||||
|
||||
protected <N extends Node> N configRoundtrip(N node) throws Exception {
|
||||
submit(createWebClient().goTo("/computer/"+node.getNodeName()+"/configure").getFormByName("config"));
|
||||
return (N)hudson.getNode(node.getNodeName());
|
||||
}
|
||||
|
||||
protected <V extends View> V configRoundtrip(V view) throws Exception {
|
||||
submit(createWebClient().getPage(view, "configure").getFormByName("viewConfig"));
|
||||
return view;
|
||||
|
||||
Reference in new issue
Block a user