You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2010/05/19 00:43:12 UTC

svn commit: r945942 - /tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry5/test/ErrorReporterImpl.java

Author: hlship
Date: Tue May 18 22:43:11 2010
New Revision: 945942

URL: http://svn.apache.org/viewvc?rev=945942&view=rev
Log:
TAP5-1158: Captured HTML from failed Selenium assertions do not get stored in the correct place on Windows

Modified:
    tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry5/test/ErrorReporterImpl.java

Modified: tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry5/test/ErrorReporterImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry5/test/ErrorReporterImpl.java?rev=945942&r1=945941&r2=945942&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry5/test/ErrorReporterImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry5/test/ErrorReporterImpl.java Tue May 18 22:43:11 2010
@@ -1,10 +1,10 @@
-// Copyright 2009 The Apache Software Foundation
+// Copyright 2009, 2010 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
 //
-//     http://www.apache.org/licenses/LICENSE-2.0
+// http://www.apache.org/licenses/LICENSE-2.0
 //
 // Unless required by applicable law or agreed to in writing, software
 // distributed under the License is distributed on an "AS IS" BASIS,
@@ -46,15 +46,13 @@ public class ErrorReporterImpl implement
         String htmlSource = commandProcessor.getString("getHtmlSource", new String[]
         {});
 
-        File dir = new File(TapestryTestConstants.MODULE_BASE_DIR, testContext.getOutputDirectory());
+        File dir = new File(testContext.getOutputDirectory());
 
         dir.mkdirs();
 
-        Method testMethod = (Method) testContext
-                .getAttribute(TapestryTestConstants.CURRENT_TEST_METHOD_ATTRIBUTE);
+        Method testMethod = (Method) testContext.getAttribute(TapestryTestConstants.CURRENT_TEST_METHOD_ATTRIBUTE);
 
-        String baseFileName = testMethod == null ? "Unknown-test" : testMethod.getDeclaringClass()
-                .getSimpleName()
+        String baseFileName = testMethod == null ? "Unknown-test" : testMethod.getDeclaringClass().getSimpleName()
                 + "." + testMethod.getName();
 
         if (previousNames.contains(baseFileName))