Skip to content
Snippets Groups Projects
Commit 074f1be4 authored by Simon Urli's avatar Simon Urli
Browse files

XWIKI-21031: Allow to define reviewed security vulnerabilities

  * Fix integration test on chrome
parent 8aac36bd
No related branches found
No related tags found
No related merge requests found
......@@ -104,14 +104,18 @@ private String createSecurityReviewsSource(TestUtils setup, TestReference testRe
private String createPageFromFile(TestUtils setup, DocumentReference testDocumentReference, String name)
throws IOException
{
setup.createPage(testDocumentReference, "");
WikiEditPage wikiEditPage = new ViewPage().editWiki();
ViewPage viewPage = setup.createPage(testDocumentReference, "");
WikiEditPage wikiEditPage = viewPage.editWiki();
// Can't create the content using setup.createPage as the content is too large.
wikiEditPage.setContent("{{velocity wiki='false'}}\n"
+ IOUtils.toString(getClass().getClassLoader().getResourceAsStream(name),
Charset.defaultCharset())
+ "{{/velocity}}");
wikiEditPage.clickSaveAndView(false);
// We don't use gotoPage here as it relies on some markers to ensure the page is properly loaded, which is not
// properly working when navigating from a JSON answer.
// Here we just want to navigate away from the JSON.
setup.getDriver().get(setup.getURL("Main", "WebHome"));
return getLocalRestURL(setup, testDocumentReference);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment