From 2d3fa398c352ddd44a43980766e14e5f8352e0d1 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Thu, 11 Apr 2013 18:52:05 -0400 Subject: [PATCH] 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. --- test/src/test/java/hudson/model/AbstractProjectTest.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/test/src/test/java/hudson/model/AbstractProjectTest.java b/test/src/test/java/hudson/model/AbstractProjectTest.java index 5cb7a04beb..4e6a304a37 100644 --- a/test/src/test/java/hudson/model/AbstractProjectTest.java +++ b/test/src/test/java/hudson/model/AbstractProjectTest.java @@ -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()); -- GitLab