summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web/archiva-webapp-test
diff options
context:
space:
mode:
authorskygo <skygo@unknown>2013-06-24 18:21:01 +0000
committerskygo <skygo@unknown>2013-06-24 18:21:01 +0000
commit2eb8409eb6b0f44ce66649ea309796f6e095c941 (patch)
treeff76ac092bb27eaed051800279fc1145d3313a30 /archiva-modules/archiva-web/archiva-webapp-test
parent495454ba08456f5afb62dda1f9c6c99000d6d573 (diff)
downloadarchiva-2eb8409eb6b0f44ce66649ea309796f6e095c941.tar.gz
archiva-2eb8409eb6b0f44ce66649ea309796f6e095c941.zip
screenshot in target folder (my mistake)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1496149 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web/archiva-webapp-test')
-rw-r--r--archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java
index bc96ad63f..2d97c095f 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java
@@ -51,25 +51,26 @@ public class WebDriverBrowseTest
@Override
public Fluent takeScreenShot( String fileName )
{
+ File fileNameHTML = new File( "target", "errorshtmlsnap" );
try
{
// save html to have a minimum feedback if jenkins firefox not up
- File fileNameHTML = new File( fileName + ".html" );
- FileUtils.writeStringToFile( fileNameHTML, getDriver().getPageSource() );
+ fileNameHTML = new File( fileNameHTML, fileName );
+ FileUtils.writeStringToFile( new File ( new File( "target", "errorshtmlsnap" ) , fileName + ".html"), getDriver().getPageSource() );
+
}
catch ( IOException e )
{
- System.out.print( e.getMessage() );
e.printStackTrace();
}
- return super.takeScreenShot( fileName );
+ return super.takeScreenShot( fileNameHTML.getAbsolutePath() );
+
}
@Before
public void init()
{
setSnapshotMode( Mode.TAKE_SNAPSHOT_ON_FAIL );
- setSnapshotPath( new File( "target", "errorshtmlsnap" ).getAbsolutePath() );
}
@Test
@@ -118,10 +119,10 @@ public class WebDriverBrowseTest
await().atMost( 2, TimeUnit.SECONDS ).until( "#main_browse_result" ).isPresent();
// give me search page :( not browse page
- takeScreenShot( "search" );
+ takeScreenShot( "search.png" );
goTo( "http://localhost:" + tomcatPort + "/archiva/index.html#browse?request_lang=en" );
- takeScreenShot( "browse" );
+ takeScreenShot( "browse.png" );
// give me a browse page
}