提交 2d3fa398 编写于 作者: J Jesse Glick

testWipeWorkspace was failing after changes to link confirmation.

Tricky to emulate the actual web interaction including JavaScript window.confirm;
suffices to just call the web method directly.
上级 7d31e7c5
......@@ -88,13 +88,7 @@ public class AbstractProjectTest extends HudsonTestCase {
assertTrue("Workspace should exist by now",
b.getWorkspace().exists());
// emulate the user behavior
WebClient webClient = new WebClient();
HtmlPage page = webClient.getPage(project);
page = (HtmlPage)page.getFirstAnchorByText("Workspace").click();
page = (HtmlPage)page.getFirstAnchorByText("Wipe Out Workspace").click();
page = (HtmlPage)((HtmlForm)page.getElementById("confirmation")).submit(null);
project.doDoWipeOutWorkspace();
assertFalse("Workspace should be gone by now",
b.getWorkspace().exists());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册