You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by ju...@apache.org on 2020/11/07 20:05:21 UTC
[jspwiki] branch master updated (1042544 -> 25cf6d0)
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git.
from 1042544 2.11.0-M8-git-02
new 216323a Portable build native executables can be built entirely through maven, on one run; just mvn clean install -Dgenerate-native-launchers=true
new b59f61c Portable build native executables can be built entirely through maven, on one run; just mvn clean install -Dgenerate-native-launchers=true
new 68b33f6 update tomcat to 9.0.39
new 6068c32 fix small typo
new 39919c4 small refactors suggested by intellij
new 68e5af2 Dependency udpates
new 4327ca5 update versions noted on LICENSE
new 0f7e559 small corrections on pom.xml files; set selenide download folder inside ./target
new 532bd35 new setup options for Selenide tests, so they're are a bit more configurable
new 7a7d1d3 added javadocs
new 38a59ff added actions for incoming search and edit tests + an open url method to simplify tests + javadocs
new f8a5d91 make tests a little bit more readable
new 3c2e889 added functional tests for searches
new 19fb411 added functional tests for page edits
new 5603db8 make search-related background threads become active faster
new d2b48ed allow anonymous edits on container managed security instances
new ba10bd9 Rename ReadWikiPage to ViewWikiPage
new 5e967ea code polish
new 5898513 code polish
new 8896a01 simplify View page actions in order to make the tests a bit more readable
new d207348 update cargo plugin to 1.8.2
new c9919b5 Jenkinsfile uses JDK 11 to perform the build, as this is now the minimum required by SonarQube (https://sonarcloud.io/documentation/appendices/end-of-support/)
new 25cf6d0 2.11.0-M8-git-03
The 23 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
ChangeLog.md | 20 +++
Jenkinsfile | 6 +-
LICENSE | 54 ++++----
.../src/main/java/org/apache/wiki/api/Release.java | 2 +-
jspwiki-it-tests/jspwiki-it-test-cma-jdbc/pom.xml | 2 +-
.../src/main/webapp/WEB-INF/web.xml | 5 +-
jspwiki-it-tests/jspwiki-it-test-cma/pom.xml | 2 +-
.../src/main/webapp/WEB-INF/web.xml | 5 +-
.../jspwiki-it-test-custom-absolute-urls/pom.xml | 2 +-
.../jspwiki-it-test-custom-jdbc/pom.xml | 2 +-
.../java/org/apache/wiki/its/AnonymousViewIT.java | 15 ++-
.../src/main/java/org/apache/wiki/its/EditIT.java | 53 ++++++++
.../src/main/java/org/apache/wiki/its/LoginIT.java | 16 +--
.../main/java/org/apache/wiki/its/SearchIT.java | 53 ++++++++
.../java/org/apache/wiki/its/environment/Env.java | 12 +-
.../java/org/apache/wiki/pages/PageBuilder.java | 2 +
.../apache/wiki/pages/haddock/EditWikiPage.java | 78 +++++++++++
.../org/apache/wiki/pages/haddock/LoginPage.java | 25 +++-
.../apache/wiki/pages/haddock/ReadWikiPage.java | 68 ----------
.../wiki/pages/haddock/SearchResultsPage.java | 81 +++++++++++
.../apache/wiki/pages/haddock/ViewWikiPage.java | 149 +++++++++++++++++++++
.../src/main/resources/jspwiki-custom.properties | 6 +-
jspwiki-it-tests/pom.xml | 1 +
.../java/org/apache/wiki/WikiBackgroundThread.java | 3 +-
.../apache/wiki/search/LuceneSearchProvider.java | 13 +-
.../wiki/workflow/DefaultWorkflowManager.java | 3 +-
.../main/resources/templates/default_es.properties | 2 +-
jspwiki-portable/build.xml | 36 +++--
jspwiki-portable/pom.xml | 103 ++++++++++++++
.../tomcat/woas.app/Contents/Java/bootstrap.jar | Bin 35912 -> 35909 bytes
.../tomcat/woas.app/Contents/Java/tomcat-juli.jar | Bin 49605 -> 49769 bytes
.../src/overlay/launchers/tomcat/woas.exe | Bin 3625247 -> 3612748 bytes
mvn_cheat-sheet.md | 1 +
pom.xml | 10 +-
34 files changed, 674 insertions(+), 156 deletions(-)
create mode 100644 jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/EditIT.java
create mode 100644 jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/SearchIT.java
create mode 100644 jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/EditWikiPage.java
delete mode 100644 jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/ReadWikiPage.java
create mode 100644 jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/SearchResultsPage.java
create mode 100644 jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/ViewWikiPage.java
[jspwiki] 10/23: added javadocs
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 7a7d1d341a34f66b4b0c63780e0bfd150ef38d6b
Author: juanpablo <ju...@apache.org>
AuthorDate: Sat Nov 7 18:36:05 2020 +0100
added javadocs
---
.../java/org/apache/wiki/pages/haddock/LoginPage.java | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/LoginPage.java b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/LoginPage.java
index c080dfd..f7d95da 100644
--- a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/LoginPage.java
+++ b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/LoginPage.java
@@ -22,12 +22,27 @@ import com.codeborne.selenide.Selenide;
import org.apache.wiki.its.environment.Env;
import org.openqa.selenium.By;
+/**
+ * Actions available on the Login page.
+ */
public class LoginPage implements HaddockPage {
-
+
+ /**
+ * Logs in using Janne username and password.
+ *
+ * @return {@link ReadWikiPage} instance, to allow chaining of actions.
+ */
public ReadWikiPage performLogin() {
return performLogin( Env.LOGIN_JANNE_USERNAME, Env.LOGIN_JANNE_PASSWORD );
}
-
+
+ /**
+ * Logs in using the supplied username and password.
+ *
+ * @param login user login.
+ * @param password user password.
+ * @return {@link ReadWikiPage} instance, to allow chaining of actions.
+ */
public ReadWikiPage performLogin( final String login, final String password ) {
Selenide.$( By.id( "j_username" ) ).val( login );
Selenide.$( By.id( "j_password" ) ).val( password );
[jspwiki] 12/23: make tests a little bit more readable
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit f8a5d91d6f7ff0f73fbebe329993738f059c549d
Author: juanpablo <ju...@apache.org>
AuthorDate: Sat Nov 7 18:38:53 2020 +0100
make tests a little bit more readable
---
.../src/main/java/org/apache/wiki/its/AnonymousViewIT.java | 13 +++++++------
.../src/main/java/org/apache/wiki/its/LoginIT.java | 8 +++-----
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/AnonymousViewIT.java b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/AnonymousViewIT.java
index 1188ed6..4e48897 100644
--- a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/AnonymousViewIT.java
+++ b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/AnonymousViewIT.java
@@ -39,30 +39,31 @@ public class AnonymousViewIT {
@Test
void anonymousView() {
- ReadWikiPage main = Page.withUrl( Page.baseUrl() + "/Wiki.jsp?page=Main" ).openAs( new ReadWikiPage() );
+ final ReadWikiPage main = ReadWikiPage.open( "Main" );
Assertions.assertEquals( "JSPWiki: Main", main.title() );
Assertions.assertEquals( "Main", main.wikiTitle() );
Assertions.assertTrue( main.wikiPageContent().contains( "You have successfully installed" ) );
- ReadWikiPage about = main.navigateTo( "JSPWiki" );
+ final ReadWikiPage about = main.navigateTo( "JSPWiki" );
Assertions.assertTrue( about.wikiPageContent().contains( "This Wiki is done using" ) );
}
@Test
void anonymousViewImage() throws Exception {
- File file = Page.download( Page.baseUrl() + "/images/jspwiki_logo_s.png" );
+ final File file = Page.download( Page.baseUrl() + "/images/jspwiki_logo_s.png" );
Assertions.assertTrue( file.exists() );
}
@Test
void anonymousReaderView() {
- ReadWikiPage main = Page.withUrl( Page.baseUrl() + "/Wiki.jsp?page=Main" ).openAs( new ReadWikiPage() );
+ final ReadWikiPage main = ReadWikiPage.open( "Main" );
Assertions.assertEquals( "JSPWiki: Main", main.title() );
Assertions.assertEquals( "Main", main.wikiTitle() );
main.sidebar().should( exist );
- main.hoverMoreArea().clickOnShowReaderView();
- main.sidebar().should( not( exist ) );
+ main.hoverMoreArea()
+ .clickOnShowReaderView()
+ .sidebar().should( not( exist ) );
}
}
diff --git a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/LoginIT.java b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/LoginIT.java
index 4ecb8ae..b3606df 100644
--- a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/LoginIT.java
+++ b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/LoginIT.java
@@ -18,15 +18,13 @@
*/
package org.apache.wiki.its;
-import org.apache.wiki.pages.Page;
+import com.codeborne.selenide.junit5.ScreenShooterExtension;
import org.apache.wiki.pages.haddock.LoginPage;
import org.apache.wiki.pages.haddock.ReadWikiPage;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
-import com.codeborne.selenide.junit5.ScreenShooterExtension;
-
/**
* Login-related tests for Apache JSPWiki
@@ -36,7 +34,7 @@ public class LoginIT {
@Test
void loginAndLogout() {
- ReadWikiPage main = Page.withUrl( Page.baseUrl() + "/Wiki.jsp?page=Main" ).openAs( new ReadWikiPage() );
+ ReadWikiPage main = ReadWikiPage.open( "Main" );
Assertions.assertEquals( "JSPWiki: Main", main.title() );
Assertions.assertEquals( "Main", main.wikiTitle() );
Assertions.assertEquals( "G’day (anonymous guest)", main.hoverLoginArea().authenticatedText() );
@@ -55,7 +53,7 @@ public class LoginIT {
@Test
void loginKO() {
- ReadWikiPage main = Page.withUrl( Page.baseUrl() + "/Wiki.jsp?page=Main" ).openAs( new ReadWikiPage() );
+ ReadWikiPage main = ReadWikiPage.open( "Main" );
Assertions.assertEquals( "JSPWiki: Main", main.title() );
Assertions.assertEquals( "Main", main.wikiTitle() );
Assertions.assertEquals( "G’day (anonymous guest)", main.hoverLoginArea().authenticatedText() );
[jspwiki] 13/23: added functional tests for searches
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 3c2e88995ccc85a3166cdaffe628cb608bf9a0d3
Author: juanpablo <ju...@apache.org>
AuthorDate: Sat Nov 7 18:39:34 2020 +0100
added functional tests for searches
---
.../main/java/org/apache/wiki/its/SearchIT.java | 53 ++++++++++++++
.../wiki/pages/haddock/SearchResultsPage.java | 81 ++++++++++++++++++++++
2 files changed, 134 insertions(+)
diff --git a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/SearchIT.java b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/SearchIT.java
new file mode 100644
index 0000000..9d0b9c3
--- /dev/null
+++ b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/SearchIT.java
@@ -0,0 +1,53 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+package org.apache.wiki.its;
+
+import com.codeborne.selenide.junit5.ScreenShooterExtension;
+import org.apache.wiki.its.environment.Env;
+import org.apache.wiki.pages.haddock.ReadWikiPage;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+
+/**
+ * Search-related tests for Apache JSPWiki
+ */
+@ExtendWith( ScreenShooterExtension.class )
+public class SearchIT {
+
+ @Test
+ void performSearches() throws Exception {
+ final String text = "Congratulations - with cuchuflus! :: " + System.currentTimeMillis();
+
+ // first, search for a term indexed on startup (wait a bit to allow the initial search indexing to complete first)
+ Thread.sleep( Env.TESTS_CONFIG_SEARCH_INDEX_WAIT );
+ final ReadWikiPage main = ReadWikiPage.open( "Main" )
+ .searchFor( "Congratulations" ).shouldContain( "Main" )
+ .navigateTo( "Main" );
+
+ // second, edit a page and search for that newly indexed page (wait a bit to allow the per change search indexing to complete first)
+ main.editPage().saveText( text );
+ Thread.sleep( Env.TESTS_CONFIG_SEARCH_INDEX_WAIT );
+ main.searchFor( "cuchuflus" ).shouldContain( "Main" )
+ .navigateTo( "Main" );
+
+ Assertions.assertEquals( text, main.wikiPageContent() );
+ }
+
+}
diff --git a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/SearchResultsPage.java b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/SearchResultsPage.java
new file mode 100644
index 0000000..6b353b2
--- /dev/null
+++ b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/SearchResultsPage.java
@@ -0,0 +1,81 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+package org.apache.wiki.pages.haddock;
+
+import com.codeborne.selenide.CollectionCondition;
+import com.codeborne.selenide.ElementsCollection;
+import com.codeborne.selenide.Selenide;
+import org.apache.wiki.pages.Page;
+import org.openqa.selenium.By;
+
+import java.util.List;
+
+/**
+ * Actions available on the Search Results page.
+ */
+public class SearchResultsPage implements HaddockPage {
+
+ private static final String SEARCH_PAGE_NAME_RESULTS = ".wikitable.table-striped tr:not(:first-child) td:first-child";
+
+ /**
+ * Open the search results page with a given query text to search for.
+ *
+ * @param pageName Wiki page name to View.
+ * @return {@link ReadWikiPage} instance, to allow chaining of actions.
+ */
+ public static SearchResultsPage open( final String pageName ) {
+ return Page.withUrl( Page.baseUrl() + "/Search.jsp?query=" + pageName ).openAs( new SearchResultsPage() );
+ }
+
+ /**
+ * Returns the search result page names.
+ *
+ * @return the list of page names returned by the search query.
+ */
+ public List< String > pagesFound() {
+ return Selenide.$$( By.cssSelector( SEARCH_PAGE_NAME_RESULTS ) ).texts();
+ }
+
+ /**
+ * Ensures that the given page names are present on the search results.
+ *
+ * @param pageNames page names to look for.
+ * @return {@link SearchResultsPage} instance, to allow chaining of actions.
+ */
+ public SearchResultsPage shouldContain( final String... pageNames ) {
+ final ElementsCollection resultsTableRows = Selenide.$$( By.cssSelector( SEARCH_PAGE_NAME_RESULTS ) );
+ for( final String pageName : pageNames ) {
+ resultsTableRows.shouldHave( CollectionCondition.itemWithText( pageName ) );
+ }
+
+ return this;
+ }
+
+ /**
+ * Navigates to a view page from the search results.
+ *
+ * @param result wikipage name to navigate to.
+ * @return {@link ReadWikiPage} instance, to allow chaining of actions.
+ */
+ public ReadWikiPage navigateTo( final String result ) {
+ Selenide.$( By.cssSelector( ".wikitable.table-striped" ) ).find( By.linkText( result ) ).click();
+ return new ReadWikiPage();
+ }
+
+}
[jspwiki] 08/23: small corrections on pom.xml files;
set selenide download folder inside ./target
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 0f7e55965ccb26d032e2b848e6ac90817cdda56a
Author: juanpablo <ju...@apache.org>
AuthorDate: Sat Nov 7 18:31:28 2020 +0100
small corrections on pom.xml files; set selenide download folder inside ./target
---
jspwiki-it-tests/jspwiki-it-test-cma-jdbc/pom.xml | 2 +-
jspwiki-it-tests/jspwiki-it-test-cma/pom.xml | 2 +-
jspwiki-it-tests/jspwiki-it-test-custom-absolute-urls/pom.xml | 2 +-
jspwiki-it-tests/jspwiki-it-test-custom-jdbc/pom.xml | 2 +-
jspwiki-it-tests/pom.xml | 1 +
5 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/jspwiki-it-tests/jspwiki-it-test-cma-jdbc/pom.xml b/jspwiki-it-tests/jspwiki-it-test-cma-jdbc/pom.xml
index 315febf..ad59665 100644
--- a/jspwiki-it-tests/jspwiki-it-test-cma-jdbc/pom.xml
+++ b/jspwiki-it-tests/jspwiki-it-test-cma-jdbc/pom.xml
@@ -28,7 +28,7 @@
<!-- Container Managed Authentication using JDBC instead of XML files for user and group info -->
<artifactId>jspwiki-it-test-cma-jdbc</artifactId>
<modelVersion>4.0.0</modelVersion>
- <description>selenium tests execution for jspwiki-it-test-container-jdbc (container auth, relative URLs, JDBC database)</description>
+ <description>functional tests execution for jspwiki-it-test-container-jdbc (container auth, relative URLs, JDBC database)</description>
<packaging>war</packaging> <!-- tests reuse [2/3]: builds a war on top of jspwiki-war -->
<properties> <!-- tests reuse [3/3]: values injected at ../jspwiki-selenide-tests/.../jspwiki-custom.properties end up on generated war -->
diff --git a/jspwiki-it-tests/jspwiki-it-test-cma/pom.xml b/jspwiki-it-tests/jspwiki-it-test-cma/pom.xml
index 74332e6..b2680ba 100644
--- a/jspwiki-it-tests/jspwiki-it-test-cma/pom.xml
+++ b/jspwiki-it-tests/jspwiki-it-test-cma/pom.xml
@@ -28,7 +28,7 @@
<!-- Container Managed Authentication -->
<artifactId>jspwiki-it-test-cma</artifactId>
<modelVersion>4.0.0</modelVersion>
- <description>selenium tests execution for jspwiki-it-test-container (container auth, relative URLs)</description>
+ <description>functional tests execution for jspwiki-it-test-container (container auth, relative URLs)</description>
<packaging>war</packaging> <!-- tests reuse [2/3]: builds a war on top of jspwiki-war -->
<properties> <!-- tests reuse [3/3]: values injected at ../jspwiki-selenide-tests/.../jspwiki-custom.properties end up on generated war -->
diff --git a/jspwiki-it-tests/jspwiki-it-test-custom-absolute-urls/pom.xml b/jspwiki-it-tests/jspwiki-it-test-custom-absolute-urls/pom.xml
index c27767a..13f82c24 100644
--- a/jspwiki-it-tests/jspwiki-it-test-custom-absolute-urls/pom.xml
+++ b/jspwiki-it-tests/jspwiki-it-test-custom-absolute-urls/pom.xml
@@ -27,7 +27,7 @@
<artifactId>jspwiki-it-test-custom-absolute-urls</artifactId>
<modelVersion>4.0.0</modelVersion>
- <description>selenium tests execution for jspwiki-it-test-custom-absolute-urls (custom auth, absolute URLs)</description>
+ <description>functional tests execution for jspwiki-it-test-custom-absolute-urls (custom auth, absolute URLs)</description>
<packaging>war</packaging> <!-- tests reuse [2/3]: builds a war on top of jspwiki-war -->
<properties> <!-- tests reuse [3/3]: values injected at ../jspwiki-selenide-tests/.../jspwiki-custom.properties end up on generated war -->
diff --git a/jspwiki-it-tests/jspwiki-it-test-custom-jdbc/pom.xml b/jspwiki-it-tests/jspwiki-it-test-custom-jdbc/pom.xml
index 04ff68d..ebb7e43 100644
--- a/jspwiki-it-tests/jspwiki-it-test-custom-jdbc/pom.xml
+++ b/jspwiki-it-tests/jspwiki-it-test-custom-jdbc/pom.xml
@@ -27,7 +27,7 @@
<artifactId>jspwiki-it-test-custom-jdbc</artifactId>
<modelVersion>4.0.0</modelVersion>
- <description>selenium tests execution for jspwiki-it-test-custom (custom auth, JDBC database)</description>
+ <description>functional tests execution for jspwiki-it-test-custom (custom auth, JDBC database)</description>
<packaging>war</packaging> <!-- tests reuse [2/3]: builds a war on top of jspwiki-war -->
<properties> <!-- tests reuse [3/3]: values injected at ../jspwiki-selenide-tests/.../jspwiki-custom.properties end up on generated war -->
diff --git a/jspwiki-it-tests/pom.xml b/jspwiki-it-tests/pom.xml
index 4cc92a1..1f1fb5c 100644
--- a/jspwiki-it-tests/pom.xml
+++ b/jspwiki-it-tests/pom.xml
@@ -106,6 +106,7 @@
</dependenciesToScan>
<systemPropertyVariables>
<it-jspwiki.base.url>http://localhost:8080/${it-jspwiki.context}</it-jspwiki.base.url>
+ <it-jspwiki.config.download-folder>./target/downloads</it-jspwiki.config.download-folder>
<it-jspwiki.config.headless>false</it-jspwiki.config.headless>
<it-jspwiki.config.reports-folder>${project.basedir}/target/selenide</it-jspwiki.config.reports-folder>
<it-jspwiki.config.start-maximized>true</it-jspwiki.config.start-maximized>
[jspwiki] 15/23: make search-related background threads become
active faster
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 5603db89c9dbccd2cca79c4673c83f83605e60ee
Author: juanpablo <ju...@apache.org>
AuthorDate: Sat Nov 7 18:41:11 2020 +0100
make search-related background threads become active faster
---
.../src/main/resources/jspwiki-custom.properties | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/resources/jspwiki-custom.properties b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/resources/jspwiki-custom.properties
index a817306..20cc9cd 100644
--- a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/resources/jspwiki-custom.properties
+++ b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/resources/jspwiki-custom.properties
@@ -27,7 +27,7 @@ jspwiki.workDir = ${project.basedir}/target/test-clas
log4j.appender.FileLog.File = ${project.basedir}/target/test-classes/jspwiki-${it-jspwiki.context}.log
log4j.appender.SecurityAppender.File = ${project.basedir}/target/test-classes/security-${it-jspwiki.context}.log
-#
+#
# Other overrides of standard jspwiki.properties file
#
jspwiki.xmlGroupDatabaseFile = ${project.basedir}/target/test-classes/groupdatabase.xml
@@ -35,6 +35,10 @@ jspwiki.xmlUserDatabaseFile = ${project.basedir}/target/test-classes/userdatabas
jspwiki.login.throttling = false
+# integration tests should start page indexing as soon as possible
+jspwiki.lucene.initialdelay = 0
+jspwiki.lucene.indexdelay = 1
+
log4j.logger.SecurityLog=INFO, SecurityAppender
log4j.appender.SecurityAppender = org.apache.log4j.RollingFileAppender
log4j.appender.SecurityAppender.layout = org.apache.log4j.PatternLayout
[jspwiki] 04/23: fix small typo
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 6068c326642147d29e16cd65f8bd576bdb01dce4
Author: juanpablo <ju...@apache.org>
AuthorDate: Sat Nov 7 18:15:44 2020 +0100
fix small typo
---
jspwiki-main/src/main/resources/templates/default_es.properties | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/jspwiki-main/src/main/resources/templates/default_es.properties b/jspwiki-main/src/main/resources/templates/default_es.properties
index 01243fe..fac94e3 100644
--- a/jspwiki-main/src/main/resources/templates/default_es.properties
+++ b/jspwiki-main/src/main/resources/templates/default_es.properties
@@ -509,7 +509,7 @@ preview.info=&\#161;Esto es una <strong>previsualizaci\u00F3n</strong>\! Presio
userbox.button=Men� del Usuario
# SearchBox.jsp
-sbox.search.button=Men� de b�squeda r�pida
+sbox.search.button=Men� de b�squeda r�pida
sbox.search.submit=B�squeda r�pida
sbox.search.fullsearch=Para b�squeda completa, pulsa Intro...
sbox.view=ver
[jspwiki] 22/23: Jenkinsfile uses JDK 11 to perform the build,
as this is now the minimum required by SonarQube
(https://sonarcloud.io/documentation/appendices/end-of-support/)
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit c9919b5f24372b94494e4b750f4b5e64baa9b54f
Author: juanpablo <ju...@apache.org>
AuthorDate: Sat Nov 7 21:03:13 2020 +0100
Jenkinsfile uses JDK 11 to perform the build, as this is now the minimum required by SonarQube (https://sonarcloud.io/documentation/appendices/end-of-support/)
---
Jenkinsfile | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 80fabbb..7a411ee 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -24,6 +24,8 @@ try {
def asfsite = 'asf-site'
def build = 'build'
+ def buildJdk = 'jdk_11_latest'
+ def buildMvn = 'Maven 3 (latest)'
def jbake = 'jbake'
def pom
@@ -35,7 +37,7 @@ try {
stage( 'build source' ) {
dir( build ) {
git url: buildRepo, poll: true
- withMaven(jdk: 'JDK 1.8 (latest)', maven: 'Maven 3 (latest)' ) {
+ withMaven( jdk: buildJdk, maven: buildMvn ) {
withCredentials( [ string( credentialsId: 'sonarcloud-jspwiki', variable: 'SONAR_TOKEN' ) ] ) {
def sonarOptions = "-Dsonar.projectKey=jspwiki-builder -Dsonar.organization=apache -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN"
echo 'Will use SonarQube instance at https://sonarcloud.io'
@@ -51,7 +53,7 @@ try {
}
stage( 'build website' ) {
- withMaven(jdk: 'JDK 1.8 (latest)', maven: 'Maven 3 (latest)' ) {
+ withMaven( jdk: buildJdk, maven: buildMvn ) {
dir( jbake ) {
git branch: jbake, url: siteRepo, credentialsId: creds, poll: false
sh "cp ../$build/ChangeLog.md ./src/main/config/changelog.md"
[jspwiki] 06/23: Dependency udpates
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 68e5af2f38c96c1240e4bf1b16bd27e1a58af8fe
Author: juanpablo <ju...@apache.org>
AuthorDate: Sat Nov 7 18:29:11 2020 +0100
Dependency udpates
* lucene to 8.7.0
* mockito to 3.6.0
* selenide to 5.15.1
---
pom.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pom.xml b/pom.xml
index ea62536..69ea90b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -67,12 +67,12 @@
<jrcs-diff.version>0.4.2</jrcs-diff.version>
<junit.version>5.7.0</junit.version>
<log4j.version>1.2.17</log4j.version>
- <lucene.version>8.6.2</lucene.version>
- <mockito.version>3.5.13</mockito.version>
+ <lucene.version>8.7.0</lucene.version>
+ <mockito.version>3.6.0</mockito.version>
<nekohtml.version>1.9.22</nekohtml.version>
<oro.version>2.0.8</oro.version>
<sandler.version>0.5</sandler.version>
- <selenide.version>5.15.0</selenide.version>
+ <selenide.version>5.15.1</selenide.version>
<slf4j.version>1.7.30</slf4j.version>
<stripes.version>1.7.0-async-beta</stripes.version>
<tika.version>1.24.1</tika.version>
[jspwiki] 16/23: allow anonymous edits on container managed
security instances
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit d2b48ed30389a892cd8f1a9af6bee5182a417e54
Author: juanpablo <ju...@apache.org>
AuthorDate: Sat Nov 7 18:43:46 2020 +0100
allow anonymous edits on container managed security instances
---
.../jspwiki-it-test-cma-jdbc/src/main/webapp/WEB-INF/web.xml | 5 +++--
jspwiki-it-tests/jspwiki-it-test-cma/src/main/webapp/WEB-INF/web.xml | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/jspwiki-it-tests/jspwiki-it-test-cma-jdbc/src/main/webapp/WEB-INF/web.xml b/jspwiki-it-tests/jspwiki-it-test-cma-jdbc/src/main/webapp/WEB-INF/web.xml
index 618a204..6be2a4d 100644
--- a/jspwiki-it-tests/jspwiki-it-test-cma-jdbc/src/main/webapp/WEB-INF/web.xml
+++ b/jspwiki-it-tests/jspwiki-it-test-cma-jdbc/src/main/webapp/WEB-INF/web.xml
@@ -277,7 +277,8 @@
In particular, the restrictions below allow all users to
read documents, but only Authenticated users can comment
- on or edit them (i.e., access the Edit.jsp page).
+ on them. Anonymous edits (i.e., access the Edit.jsp page) are
+ allowed, as there is a test which does precisely that.
Users with the role Admin are the only persons who can
delete pages.
@@ -326,7 +327,7 @@
<security-constraint>
<web-resource-collection>
<web-resource-name>Authenticated area</web-resource-name>
- <url-pattern>/Edit.jsp</url-pattern>
+ <!-- <url-pattern>/Edit.jsp</url-pattern> -->
<url-pattern>/Comment.jsp</url-pattern>
<url-pattern>/Login.jsp</url-pattern>
<url-pattern>/NewGroup.jsp</url-pattern>
diff --git a/jspwiki-it-tests/jspwiki-it-test-cma/src/main/webapp/WEB-INF/web.xml b/jspwiki-it-tests/jspwiki-it-test-cma/src/main/webapp/WEB-INF/web.xml
index b876d31..085b383 100644
--- a/jspwiki-it-tests/jspwiki-it-test-cma/src/main/webapp/WEB-INF/web.xml
+++ b/jspwiki-it-tests/jspwiki-it-test-cma/src/main/webapp/WEB-INF/web.xml
@@ -208,7 +208,8 @@
In particular, the restrictions below allow all users to
read documents, but only Authenticated users can comment
- on or edit them (i.e., access the Edit.jsp page).
+ on them. Anonymous edits (i.e., access the Edit.jsp page) are
+ allowed, as there is a test which does precisely that.
Users with the role Admin are the only persons who can
delete pages.
@@ -255,7 +256,7 @@
<security-constraint>
<web-resource-collection>
<web-resource-name>Authenticated area</web-resource-name>
- <url-pattern>/Edit.jsp</url-pattern>
+ <!-- <url-pattern>/Edit.jsp</url-pattern> -->
<url-pattern>/Comment.jsp</url-pattern>
<url-pattern>/Login.jsp</url-pattern>
<url-pattern>/NewGroup.jsp</url-pattern>
[jspwiki] 20/23: simplify View page actions in order to make the
tests a bit more readable
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 8896a01d891dec094decfd553acded553c0fdbe6
Author: juanpablo <ju...@apache.org>
AuthorDate: Sat Nov 7 21:02:12 2020 +0100
simplify View page actions in order to make the tests a bit more readable
---
.../src/main/java/org/apache/wiki/its/EditIT.java | 4 ++--
.../src/main/java/org/apache/wiki/its/LoginIT.java | 6 +++---
.../src/main/java/org/apache/wiki/pages/haddock/ViewWikiPage.java | 4 +++-
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/EditIT.java b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/EditIT.java
index a8d5f6c..0630b2d 100644
--- a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/EditIT.java
+++ b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/EditIT.java
@@ -40,12 +40,12 @@ public class EditIT {
Assertions.assertEquals( pageName, randomPage.wikiTitle() );
Assertions.assertEquals( "random page", randomPage.wikiPageContent() );
- final ViewWikiPage requiresJannesAccess = randomPage.hoverLoginArea().clickOnLogin().performLogin();
+ final ViewWikiPage requiresJannesAccess = randomPage.clickOnLogin().performLogin();
requiresJannesAccess.editPage().saveText( "random page [{ALLOW edit janne}]", "random page" );
Assertions.assertEquals( pageName, requiresJannesAccess.wikiTitle() );
Assertions.assertEquals( "random page", requiresJannesAccess.wikiPageContent() );
- requiresJannesAccess.hoverLoginArea().logout();
+ requiresJannesAccess.clickOnLogout();
Assertions.assertEquals( "Main", requiresJannesAccess.wikiTitle() ); // no access for anonymous user, so redirected to main
Assertions.assertNotEquals( "random page", randomPage.wikiPageContent() );
}
diff --git a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/LoginIT.java b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/LoginIT.java
index 72b5685..77521b9 100644
--- a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/LoginIT.java
+++ b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/LoginIT.java
@@ -39,7 +39,7 @@ public class LoginIT {
Assertions.assertEquals( "Main", main.wikiTitle() );
Assertions.assertEquals( "G’day (anonymous guest)", main.hoverLoginArea().authenticatedText() );
- final LoginPage login = main.hoverLoginArea().clickOnLogin();
+ final LoginPage login = main.clickOnLogin();
Assertions.assertEquals( "JSPWiki: Login", login.title() );
Assertions.assertEquals( "Login", login.wikiTitle() );
@@ -47,7 +47,7 @@ public class LoginIT {
Assertions.assertEquals( "JSPWiki: Main", main.title() );
Assertions.assertEquals( "G’day, Janne Jalkanen (authenticated)", main.hoverLoginArea().authenticatedText() );
- main.hoverLoginArea().logout();
+ main.clickOnLogout();
Assertions.assertEquals( "G’day (anonymous guest)", main.hoverLoginArea().authenticatedText() );
}
@@ -58,7 +58,7 @@ public class LoginIT {
Assertions.assertEquals( "Main", main.wikiTitle() );
Assertions.assertEquals( "G’day (anonymous guest)", main.hoverLoginArea().authenticatedText() );
- final LoginPage login = main.hoverLoginArea().clickOnLogin();
+ final LoginPage login = main.clickOnLogin();
Assertions.assertEquals( "JSPWiki: Login", login.title() );
Assertions.assertEquals( "Login", login.wikiTitle() );
diff --git a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/ViewWikiPage.java b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/ViewWikiPage.java
index 1de53ef..f321325 100644
--- a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/ViewWikiPage.java
+++ b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/ViewWikiPage.java
@@ -55,6 +55,7 @@ public class ViewWikiPage implements HaddockPage {
* @return {@link LoginPage} instance, to allow chaining of actions.
*/
public LoginPage clickOnLogin() {
+ hoverLoginArea();
Selenide.$( By.className( "icon-signin" ) ).click();
return new LoginPage();
}
@@ -118,7 +119,8 @@ public class ViewWikiPage implements HaddockPage {
*
* @return {@link ViewWikiPage} instance, to allow chaining of actions.
*/
- public ViewWikiPage logout() {
+ public ViewWikiPage clickOnLogout() {
+ hoverLoginArea();
Selenide.$( By.linkText( "Log out" ) ).click();
Selenide.$( By.className( "btn-success" ) ).waitUntil( Condition.visible, 1_000L ).click();
return this;
[jspwiki] 18/23: code polish
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 5e967ea03816619d91fcba32e7e24474551de1c3
Author: juanpablo <ju...@apache.org>
AuthorDate: Sat Nov 7 21:00:58 2020 +0100
code polish
---
jspwiki-main/src/main/java/org/apache/wiki/WikiBackgroundThread.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/jspwiki-main/src/main/java/org/apache/wiki/WikiBackgroundThread.java b/jspwiki-main/src/main/java/org/apache/wiki/WikiBackgroundThread.java
index b878173..5c0ba4f 100644
--- a/jspwiki-main/src/main/java/org/apache/wiki/WikiBackgroundThread.java
+++ b/jspwiki-main/src/main/java/org/apache/wiki/WikiBackgroundThread.java
@@ -60,7 +60,8 @@ public abstract class WikiBackgroundThread extends Thread implements WikiEventLi
* @param event {@inheritDoc}
* @see org.apache.wiki.event.WikiEventListener#actionPerformed(org.apache.wiki.event.WikiEvent)
*/
- @Override public final void actionPerformed( final WikiEvent event ) {
+ @Override
+ public final void actionPerformed( final WikiEvent event ) {
if ( event instanceof WikiEngineEvent ) {
if ( event.getType() == WikiEngineEvent.SHUTDOWN ) {
LOG.warn( "Detected wiki engine shutdown: killing " + getName() + "." );
[jspwiki] 19/23: code polish
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 5898513616980165d17cb67f346ac56e51aff1ee
Author: juanpablo <ju...@apache.org>
AuthorDate: Sat Nov 7 21:01:20 2020 +0100
code polish
---
.../src/main/java/org/apache/wiki/workflow/DefaultWorkflowManager.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/jspwiki-main/src/main/java/org/apache/wiki/workflow/DefaultWorkflowManager.java b/jspwiki-main/src/main/java/org/apache/wiki/workflow/DefaultWorkflowManager.java
index 81d10dc..3afb1da 100644
--- a/jspwiki-main/src/main/java/org/apache/wiki/workflow/DefaultWorkflowManager.java
+++ b/jspwiki-main/src/main/java/org/apache/wiki/workflow/DefaultWorkflowManager.java
@@ -53,7 +53,7 @@ public class DefaultWorkflowManager implements WorkflowManager {
/** We use this also a generic serialization id */
private static final long serialVersionUID = 6L;
- DecisionQueue m_queue = new DecisionQueue();
+ DecisionQueue m_queue;
Set< Workflow > m_workflows;
final Map< String, Principal > m_approvers;
Queue< Workflow > m_completed;
@@ -66,6 +66,7 @@ public class DefaultWorkflowManager implements WorkflowManager {
public DefaultWorkflowManager() {
m_workflows = ConcurrentHashMap.newKeySet();
m_approvers = new ConcurrentHashMap<>();
+ m_queue = new DecisionQueue();
WikiEventEmitter.attach( this );
}
[jspwiki] 07/23: update versions noted on LICENSE
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 4327ca5db17bf060896edcd34e425dfcff523cc2
Author: juanpablo <ju...@apache.org>
AuthorDate: Sat Nov 7 18:29:48 2020 +0100
update versions noted on LICENSE
---
LICENSE | 54 ++++++++++++++++++++++++++++--------------------------
1 file changed, 28 insertions(+), 26 deletions(-)
diff --git a/LICENSE b/LICENSE
index e6e5da0..395ef5b 100644
--- a/LICENSE
+++ b/LICENSE
@@ -210,55 +210,57 @@ LIBRARY LICENSE FILE
activation-1.1.jar ./jspwiki-war/src/main/config/doc/LICENSE.cddl
akismet-java-1.02.jar ./jspwiki-war/src/main/config/doc/LICENSE.akismet
commons-codec-1.3.jar LICENSE
+commons-collections-4.4.jar LICENSE
commons-fileupload-1.4.jar LICENSE
commons-httpclient-3.1.jar LICENSE
-commons-io-2.6.jar LICENSE
-commons-lang-3.9.jar LICENSE
-commons-text-1.8.jar LICENSE
+commons-io-2.8.0.jar LICENSE
+commons-lang-3.11.jar LICENSE
+commons-text-1.9.jar LICENSE
commons-logging-1.0.4.jar LICENSE
ehcache-2.10.6.jar LICENSE
-flexmark-0.50.44.jar ./jspwiki-war/src/main/config/doc/LICENSE.flexmark
-flexmark-ext-footnotes-0.50.44.jar ./jspwiki-war/src/main/config/doc/LICENSE.flexmark
-flexmark-ext-toc-0.50.44.jar ./jspwiki-war/src/main/config/doc/LICENSE.flexmark
-flexmark-formatter-0.50.44.jar ./jspwiki-war/src/main/config/doc/LICENSE.flexmark
-flexmark-util-0.50.44.jar ./jspwiki-war/src/main/config/doc/LICENSE.flexmark
+flexmark-0.62.2.jar ./jspwiki-war/src/main/config/doc/LICENSE.flexmark
+flexmark-ext-footnotes-0.62.2.jar ./jspwiki-war/src/main/config/doc/LICENSE.flexmark
+flexmark-ext-toc-0.62.2.jar ./jspwiki-war/src/main/config/doc/LICENSE.flexmark
+flexmark-formatter-0.62.2.jar ./jspwiki-war/src/main/config/doc/LICENSE.flexmark
+flexmark-util-0.62.2.jar ./jspwiki-war/src/main/config/doc/LICENSE.flexmark
freshcookies-security-0.60.jar LICENSE
gson-2.3.1 LICENSE
jaxen-1.2.0.jar ./jspwiki-war/src/main/config/doc/LICENSE.jaxen
jdom2-2.0.6.jar ./jspwiki-war/src/main/config/doc/LICENSE.jdom
jstl-1.2.jar LICENSE
log4j-1.2.17.jar LICENSE
-lucene-analyzers-common-8.3.1.jar LICENSE
-lucene-core-8.3.1.jar LICENSE
-lucene-highlighter-8.3.1.jar LICENSE
-lucene-memory-8.3.1.jar LICENSE
-lucene-queries-8.3.1.jar LICENSE
-lucene-queryparser-8.3.1.jar LICENSE
-lucene-sandbox-8.3.1.jar LICENSE
+lucene-analyzers-common-8.7.0.jar LICENSE
+lucene-core-8.7.0.jar LICENSE
+lucene-highlighter-8.7.0.jar LICENSE
+lucene-memory-8.7.0.jar LICENSE
+lucene-queries-8.7.0.jar LICENSE
+lucene-queryparser-8.7.0.jar LICENSE
+lucene-sandbox-8.7.0.jar LICENSE
mail-1.4.7.jar ./jspwiki-war/src/main/config/doc/LICENSE.cddl
nekohtml-1.9.22.jar LICENSE
org.suigeneris.jrcs.diff-0.4.2 LICENSE
oro-2.0.8.jar LICENSE
sandler-0.5.jar ./jspwiki-war/src/main/config/doc/LICENSE.sandler
-slf4-api-1.7.29.jar ./jspwiki-war/src/main/config/doc/LICENSE.mit
-slf4j-log4j-1.7.29.jar ./jspwiki-war/src/main/config/doc/LICENSE.mit
+slf4-api-1.7.30.jar ./jspwiki-war/src/main/config/doc/LICENSE.mit
+slf4j-log4j-1.7.30.jar ./jspwiki-war/src/main/config/doc/LICENSE.mit
xercesImpl-2.10.0.jar LICENSE
-tika-core-1.23.jar LICENSE
-tika-parsers-1.23.jar LICENSE
+tika-core-1.24.1.jar LICENSE
+tika-parsers-1.24.1.jar LICENSE
xml-apis-1.4.01 LICENSE
xmlrpc-2.0.1.jar LICENSE
xpp3-1.1.3.4-RC3 ./jspwiki-war/src/main/config/doc/LICENSE.cc-cod
TEST LIBRARY LICENSE FILE
=============================================================================================================
-awaitility-4.0.1.jar LICENSE
+awaitility-4.0.3.jar LICENSE
commons-el-1.0.jar LICENSE
custom_rhino-0.4.3.jar ./jspwiki-war/src/main/config/doc/LICENSE.mpl
-hsqldb-2.5.0.jar ./jspwiki-war/src/main/config/doc/LICENSE.hsqldb
-sqltool-2.5.0.jar ./jspwiki-war/src/main/config/doc/LICENSE.hsqldb
+hsqldb-2.5.1.jar ./jspwiki-war/src/main/config/doc/LICENSE.hsqldb
+sqltool-2.5.1.jar ./jspwiki-war/src/main/config/doc/LICENSE.hsqldb
jetty-all-8.1.15.v20140411.jar LICENSE
-junit-5.5.2 ./jspwiki-war/src/main/config/doc/LICENSE.cpl
-selenide-5.5.1.jar ./jspwiki-war/src/main/config/doc/LICENSE.mit
+junit-5.7.0 ./jspwiki-war/src/main/config/doc/LICENSE.cpl
+mockito-core-3.6.0 ./jspwiki-war/src/main/config/doc/LICENSE.mit
+selenide-5.15.1.jar ./jspwiki-war/src/main/config/doc/LICENSE.mit
stripes-1.7.0-async.jar LICENSE
yuicompressor-2.4.7.jar ./jspwiki-war/src/main/config/doc/LICENSE.yui
@@ -274,7 +276,7 @@ SlimBox ./jspwiki-war/src/main/config/doc/LI
RESOURCES LICENSE FILE
=============================================================================================================
-Apache Tomcat 8.5.49 LICENSE
+Apache Tomcat 9.0.39 LICENSE
Font Awesome (CSS & LESS files) ./jspwiki-war/src/main/config/doc/LICENSE.mit
Font Awesome (Fonts) ./jspwiki-war/src/main/config/doc/LICENSE.ofl
SilkIconSet ./jspwiki-war/src/main/config/doc/LICENSE.SilkIconSet
@@ -282,4 +284,4 @@ SilkIconSet ./jspwiki-war/src/main/config/doc/LI
OTHER
=============================================================================================================
While not bundled by default, Apache Tika extracts content from a lot of different file formats using several
-OSS libraries, which can be consulted at https://tika.apache.org/1.23/formats.html
\ No newline at end of file
+OSS libraries, which can be consulted at https://tika.apache.org/1.24.1/formats.html
\ No newline at end of file
[jspwiki] 03/23: update tomcat to 9.0.39
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 68b33f69474d9d7db63731773bdf96444bb01571
Author: juanpablo <ju...@apache.org>
AuthorDate: Sat Nov 7 18:15:23 2020 +0100
update tomcat to 9.0.39
---
.../tomcat/woas.app/Contents/Java/bootstrap.jar | Bin 35912 -> 35909 bytes
.../tomcat/woas.app/Contents/Java/tomcat-juli.jar | Bin 49605 -> 49769 bytes
.../src/overlay/launchers/tomcat/woas.exe | Bin 3625247 -> 3612748 bytes
pom.xml | 2 +-
4 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/jspwiki-portable/src/overlay/launchers/tomcat/woas.app/Contents/Java/bootstrap.jar b/jspwiki-portable/src/overlay/launchers/tomcat/woas.app/Contents/Java/bootstrap.jar
index 4d3ac19..7611a33 100644
Binary files a/jspwiki-portable/src/overlay/launchers/tomcat/woas.app/Contents/Java/bootstrap.jar and b/jspwiki-portable/src/overlay/launchers/tomcat/woas.app/Contents/Java/bootstrap.jar differ
diff --git a/jspwiki-portable/src/overlay/launchers/tomcat/woas.app/Contents/Java/tomcat-juli.jar b/jspwiki-portable/src/overlay/launchers/tomcat/woas.app/Contents/Java/tomcat-juli.jar
index 84dc67c..b81c023 100644
Binary files a/jspwiki-portable/src/overlay/launchers/tomcat/woas.app/Contents/Java/tomcat-juli.jar and b/jspwiki-portable/src/overlay/launchers/tomcat/woas.app/Contents/Java/tomcat-juli.jar differ
diff --git a/jspwiki-portable/src/overlay/launchers/tomcat/woas.exe b/jspwiki-portable/src/overlay/launchers/tomcat/woas.exe
index c94150a..0b39a24 100644
Binary files a/jspwiki-portable/src/overlay/launchers/tomcat/woas.exe and b/jspwiki-portable/src/overlay/launchers/tomcat/woas.exe differ
diff --git a/pom.xml b/pom.xml
index 685a980..ea62536 100644
--- a/pom.xml
+++ b/pom.xml
@@ -76,7 +76,7 @@
<slf4j.version>1.7.30</slf4j.version>
<stripes.version>1.7.0-async-beta</stripes.version>
<tika.version>1.24.1</tika.version>
- <tomcat.version>9.0.38</tomcat.version>
+ <tomcat.version>9.0.39</tomcat.version>
<wro4j.version>1.8.0</wro4j.version>
<xmlrpc.version>2.0.1</xmlrpc.version>
[jspwiki] 23/23: 2.11.0-M8-git-03
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 25cf6d0f12a569649f3aedf0e34a295489801ebd
Author: juanpablo <ju...@apache.org>
AuthorDate: Sat Nov 7 21:04:07 2020 +0100
2.11.0-M8-git-03
---
ChangeLog.md | 20 ++++++++++++++++++++
.../src/main/java/org/apache/wiki/api/Release.java | 2 +-
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/ChangeLog.md b/ChangeLog.md
index aebc593..f120de6 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -17,6 +17,26 @@ specific language governing permissions and limitations
under the License.
-->
+**2020-11-07 Juan Pablo Santos (juanpablo AT apache DOT org)**
+
+* _2.11.0-M8-git-03_
+
+* Added functional tests for page edits and page searches.
+
+* Simplified generation of portable build native binaries, a simple `mvn clean install -Dgenerate-native-launchers=true`
+ is all that is needed to generate the binaries. As this takes some more time, is only needed when upgrading tomcat and
+ needs to download artifacts not present on Maven's central repo, it is not enabled by default.
+
+* Jenkinsfile uses JDK 11 to perform the build, as this is now the minimum [required by SonarQube](https://sonarcloud.io/documentation/appendices/end-of-support/).
+ The build itself still requires at least JDK 1.8.
+
+* Dependency updates
+ * Cargo plugin to 1.8.2
+ * Lucene to 8.7.0
+ * Mockito 3.6.0
+ * Selenide 5.15.1
+ * Tomcat to 9.0.39
+
**2020-10-14 Juan Pablo Santos (juanpablo AT apache DOT org)**
* _2.11.0-M8-git-02_
diff --git a/jspwiki-api/src/main/java/org/apache/wiki/api/Release.java b/jspwiki-api/src/main/java/org/apache/wiki/api/Release.java
index 7bf8e73..9f58709 100644
--- a/jspwiki-api/src/main/java/org/apache/wiki/api/Release.java
+++ b/jspwiki-api/src/main/java/org/apache/wiki/api/Release.java
@@ -69,7 +69,7 @@ public final class Release {
* <p>
* If the build identifier is empty, it is not added.
*/
- public static final String BUILD = "git-02";
+ public static final String BUILD = "git-03";
/**
* This is the generic version string you should use when printing out the version. It is of
[jspwiki] 14/23: added functional tests for page edits
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 19fb4113a62bd82437754d7487576a33738e52e9
Author: juanpablo <ju...@apache.org>
AuthorDate: Sat Nov 7 18:39:59 2020 +0100
added functional tests for page edits
---
.../src/main/java/org/apache/wiki/its/EditIT.java | 53 +++++++++++++++
.../apache/wiki/pages/haddock/EditWikiPage.java | 78 ++++++++++++++++++++++
2 files changed, 131 insertions(+)
diff --git a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/EditIT.java b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/EditIT.java
new file mode 100644
index 0000000..7f5c302
--- /dev/null
+++ b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/EditIT.java
@@ -0,0 +1,53 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+package org.apache.wiki.its;
+
+import com.codeborne.selenide.junit5.ScreenShooterExtension;
+import org.apache.wiki.pages.haddock.EditWikiPage;
+import org.apache.wiki.pages.haddock.ReadWikiPage;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+
+/**
+ * Edit-related tests for Apache JSPWiki
+ */
+@ExtendWith( ScreenShooterExtension.class )
+public class EditIT {
+
+ @Test
+ void createPageAndTestEditPermissions() {
+ final String pageName = "RandomPage" + System.currentTimeMillis();
+
+ final ReadWikiPage randomPage = EditWikiPage.open( pageName )
+ .saveText( "random page [{ALLOW edit janne}] [{ALLOW view All}]", "random page" );
+ Assertions.assertEquals( pageName, randomPage.wikiTitle() );
+ Assertions.assertEquals( "random page", randomPage.wikiPageContent() );
+
+ final ReadWikiPage requiresJannesAccess = randomPage.hoverLoginArea().clickOnLogin().performLogin();
+ requiresJannesAccess.editPage().saveText( "random page [{ALLOW edit janne}]", "random page" );
+ Assertions.assertEquals( pageName, requiresJannesAccess.wikiTitle() );
+ Assertions.assertEquals( "random page", requiresJannesAccess.wikiPageContent() );
+
+ requiresJannesAccess.hoverLoginArea().logout();
+ Assertions.assertEquals( "Main", requiresJannesAccess.wikiTitle() ); // no access for anonymous user, so redirected to main
+ Assertions.assertNotEquals( "random page", randomPage.wikiPageContent() );
+ }
+
+}
diff --git a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/EditWikiPage.java b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/EditWikiPage.java
new file mode 100644
index 0000000..89d6c29
--- /dev/null
+++ b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/EditWikiPage.java
@@ -0,0 +1,78 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+package org.apache.wiki.pages.haddock;
+
+import com.codeborne.selenide.Condition;
+import com.codeborne.selenide.Selenide;
+import org.apache.wiki.pages.Page;
+import org.openqa.selenium.By;
+
+/**
+ * Actions available on the Edit page.
+ */
+public class EditWikiPage implements HaddockPage {
+
+ private static final String EDIT_TEXTAREA = "textarea.editor.form-control.snipeable";
+
+ /**
+ * Open a given page for edition.
+ *
+ * @param pageName Wiki page name to Edit.
+ * @return {@link EditWikiPage} instance, to allow chaining of actions.
+ */
+ public static EditWikiPage open( final String pageName ) {
+ return Page.withUrl( Page.baseUrl() + "/Edit.jsp?page=" + pageName ).openAs( new EditWikiPage() );
+ }
+
+ /**
+ * Press the cancel button and disacrd page Edit.
+ *
+ * @return {@link ReadWikiPage} instance, to allow chaining of actions.
+ */
+ public ReadWikiPage cancel() {
+ Selenide.$( By.name( "cancel" ) ).click();
+ return new ReadWikiPage();
+ }
+
+ /**
+ * Edits the page with the given text. Ensures edition is complete by ensuring the preview pane shows the edited text.
+ *
+ * @param text text to edit.
+ * @return {@link ReadWikiPage} instance, to allow chaining of actions.
+ */
+ public ReadWikiPage saveText(final String text ) {
+ return saveText( text, text );
+ }
+
+ /**
+ * Edits the page with the given text. Ensures edition is complete by ensuring the preview pane shows the preview text.
+ *
+ * @param text text text to edit.
+ * @param preview expected text to hsow up on the preview pane (i.e., page directives on edit pane shouldn't show up here).
+ * @return {@link ReadWikiPage} instance, to allow chaining of actions.
+ */
+ public ReadWikiPage saveText(final String text, final String preview ) {
+ Selenide.$( By.cssSelector( EDIT_TEXTAREA ) ).clear();
+ Selenide.$( By.cssSelector( EDIT_TEXTAREA ) ).val( text );
+ Selenide.$( By.className( "ajaxpreview" ) ).waitUntil( Condition.text( preview ), 1_000L );
+ Selenide.$( By.name( "ok" ) ).click();
+ return new ReadWikiPage();
+ }
+
+}
[jspwiki] 02/23: Portable build native executables can be built
entirely through maven, on one run;
just mvn clean install -Dgenerate-native-launchers=true
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit b59f61c03a355b4354b092dca18513b2ffb9ae74
Author: juanpablo <ju...@apache.org>
AuthorDate: Sat Nov 7 18:14:38 2020 +0100
Portable build native executables can be built entirely through maven, on one run; just mvn clean install -Dgenerate-native-launchers=true
---
jspwiki-portable/build.xml | 36 +++++++++++++++++++++++++-----------
1 file changed, 25 insertions(+), 11 deletions(-)
diff --git a/jspwiki-portable/build.xml b/jspwiki-portable/build.xml
index 0d67832..54817b0 100644
--- a/jspwiki-portable/build.xml
+++ b/jspwiki-portable/build.xml
@@ -50,15 +50,15 @@
<!-- General Targets -->
<!-- ############################################################## -->
- <target name="woas:info" description="Build the project">
- <echo>jspwiki.woas.version = ${jspwiki.woas.version}</echo>
- <echo>jspwiki.woas.assembly.dir = ${jspwiki.woas.assembly.dir}</echo>
- <echo>jspwiki.woas.unpack.dir = ${jspwiki.woas.unpack.dir}</echo>
- <echo>jspwiki.tomcat.distribution = ${jspwiki.tomcat.distribution}</echo>
- </target>
+ <target name="woas:info" description="Build the project">
+ <echo>jspwiki.woas.version = ${jspwiki.woas.version}</echo>
+ <echo>jspwiki.woas.assembly.dir = ${jspwiki.woas.assembly.dir}</echo>
+ <echo>jspwiki.woas.unpack.dir = ${jspwiki.woas.unpack.dir}</echo>
+ <echo>jspwiki.tomcat.distribution = ${jspwiki.tomcat.distribution}</echo>
+ </target>
- <target name="woas:clean" description="Clean the project">
- <delete dir="${jspwiki.woas.target.dir}"/>
+ <target name="woas:clean" description="Clean the project">
+ <delete dir="${jspwiki.woas.target.dir}"/>
</target>
<!-- ############################################################## -->
@@ -83,7 +83,7 @@
</target>
<!-- ############################################################## -->
- <!-- Tomcat 7 Distribution -->
+ <!-- Tomcat 9 Distribution -->
<!-- ############################################################## -->
<target name="woas:copy-tomcat" description="Prepares an unpacked Tomcat deployment">
@@ -117,7 +117,7 @@
<target name="woas:copy-tomcat-launchers" description="Copies the existing native launchers">
<copy todir="${jspwiki.woas.assembly.dir}" overwrite="true">
<fileset dir="${basedir}/src/overlay/launchers/tomcat"/>
- </copy>
+ </copy>
<!-- make the shell scripts executable -->
<chmod dir="${jspwiki.woas.assembly.dir}/bin" includes="*.sh" perm="ugo+x"/>
<chmod dir="${jspwiki.woas.assembly.dir}" includes="*.sh" perm="ugo+x"/>
@@ -125,6 +125,15 @@
<chmod file="${jspwiki.woas.assembly.dir}/woas.app/Contents/MacOS/*" perm="ugo+x"/>
</target>
+ <target name="woas:update-tomcat-launchers" description="Copies the generated native launchers over the existing ones">
+ <copy todir="${basedir}/src/overlay/launchers/tomcat" overwrite="true">
+ <fileset dir="${jspwiki.woas.assembly.dir}" includes="woas.exe" />
+ </copy>
+ <copy todir="${basedir}/src/overlay/launchers/tomcat/woas.app" overwrite="true">
+ <fileset dir="${jspwiki.woas.assembly.dir}/woas.app" includes="**" />
+ </copy>
+ </target>
+
<!-- ############################################################## -->
<!-- Windows Native Launcher -->
<!-- ############################################################## -->
@@ -155,7 +164,7 @@
fileVersion="${jspwiki.woas.version}.0"
txtFileVersion="JSPWiki ${jspwiki.woas.version}"
fileDescription="WikiOnAStick"
- copyright="Apache Software Licence 2.0"
+ copyright="Apache Software License 2.0"
productVersion="${jspwiki.woas.version}.0"
txtProductVersion="JSPWiki ${jspwiki.woas.version}"
productName="WikiOnAStick"
@@ -236,4 +245,9 @@
<get src="https://repo1.maven.org/fromsearch?filepath=com/panayotis/appbundler/1.1.0/appbundler-1.1.0.jar" dest="${jspwiki.appbundler.install.dir}/appbundler-1.1.0.jar"/>
</target>
+ <target name="woas:download-appbundler-for-mac-on-windows" description="Download the Mac OS X appbundler library when building under Windows OS">
+ <antcall target="woas:download-appbundler-for-mac"/>
+ <antcall target="woas:download-launch4j-for-mac"/>
+ </target>
+
</project>
[jspwiki] 09/23: new setup options for Selenide tests,
so they're are a bit more configurable
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 532bd35ecfb8a79a23ce4193efc9b9e8f05fd3c9
Author: juanpablo <ju...@apache.org>
AuthorDate: Sat Nov 7 18:35:23 2020 +0100
new setup options for Selenide tests, so they're are a bit more configurable
---
.../src/main/java/org/apache/wiki/its/environment/Env.java | 12 +++++++++---
.../src/main/java/org/apache/wiki/pages/PageBuilder.java | 2 ++
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/environment/Env.java b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/environment/Env.java
index 7304200..4225539 100644
--- a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/environment/Env.java
+++ b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/environment/Env.java
@@ -26,15 +26,21 @@ public class Env {
/** Base url on which the functional tests are run. Default value is {@code https://jspwiki-wiki.apache.org}. */
public static String TESTS_BASE_URL = System.getProperty( "it-jspwiki.base.url", "https://jspwiki-wiki.apache.org" );
+
+ /** Selenide tests download's folder. Default value is {@code ./target/downloads}. */
+ public static String TESTS_CONFIG_DOWNLOADS_FOLDER = System.getProperty( "it-jspwiki.config.download-folder", "./target/downloads" );
/** Should the browser start on headless mode? Only for Firefox / Chrome. Default value is {@code false}. */
- public static boolean TESTS_CONFIG_HEADLESS = Boolean.valueOf( System.getProperty( "it-jspwiki.config.headless", "false" ) );
+ public static boolean TESTS_CONFIG_HEADLESS = Boolean.parseBoolean( System.getProperty( "it-jspwiki.config.headless", "false" ) );
/** Selenide tests reports' folder. Default value is {@code ./target/selenide}. */
- public static String TESTS_CONFIG_REPORTS_FOLDER = System.getProperty( "it-jspwiki.config.headless", "./target/selenide" );
+ public static String TESTS_CONFIG_REPORTS_FOLDER = System.getProperty( "it-jspwiki.config.reports", "./target/selenide" );
+
+ /** Amount of time, in milliseconds, to wait for the search index tasks to complete. Default value is {@code 1200}. */
+ public static long TESTS_CONFIG_SEARCH_INDEX_WAIT = Long.parseLong( System.getProperty( "it-jspwiki.config.search-index-wait", "1200" ) );
/** Should the browser start maximized?. Default value is {@code true}. */
- public static boolean TESTS_CONFIG_START_MAXIMIZED = Boolean.valueOf( System.getProperty( "it-jspwiki.config.start-maximized", "true" ) );
+ public static boolean TESTS_CONFIG_START_MAXIMIZED = Boolean.parseBoolean( System.getProperty( "it-jspwiki.config.start-maximized", "true" ) );
/** Folder where the WebDriver will be downloaded. Default value is {@code ./target/wdm}. */
public static String TESTS_CONFIG_WDM_TARGET_PATH = System.getProperty( "it-jspwiki.config.wdm.target-path", "./target/wdm" );
diff --git a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/PageBuilder.java b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/PageBuilder.java
index 27f6ee5..2ac52ba 100644
--- a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/PageBuilder.java
+++ b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/PageBuilder.java
@@ -44,8 +44,10 @@ public class PageBuilder {
*/
public < T extends Page > T openAs( final T page ) {
Configuration.headless = Env.TESTS_CONFIG_HEADLESS;
+ Configuration.fastSetValue = true; // default value seems to not send `[` or `{` characters to input controls. weird.
Configuration.reportsFolder = Env.TESTS_CONFIG_REPORTS_FOLDER;
Configuration.startMaximized = Env.TESTS_CONFIG_START_MAXIMIZED;
+ Configuration.downloadsFolder = Env.TESTS_CONFIG_DOWNLOADS_FOLDER;
System.setProperty( "wdm.targetPath", Env.TESTS_CONFIG_WDM_TARGET_PATH );
Selenide.open( url );
[jspwiki] 21/23: update cargo plugin to 1.8.2
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit d207348195ef47019dcfe08a569bdb10d4253999
Author: juanpablo <ju...@apache.org>
AuthorDate: Sat Nov 7 21:02:38 2020 +0100
update cargo plugin to 1.8.2
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 69ea90b..67bb01a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -102,7 +102,7 @@
<plugin.jspc.version>3.1.0</plugin.jspc.version>
<plugin.checksum.version>1.8</plugin.checksum.version>
<plugin.jslint.version>1.0.1</plugin.jslint.version>
- <plugin.cargo.version>1.8.0</plugin.cargo.version>
+ <plugin.cargo.version>1.8.2</plugin.cargo.version>
<plugin.clirr.version>2.8</plugin.clirr.version>
<plugin.cobertura.version>2.7</plugin.cobertura.version>
<plugin.sonar.version>3.7.0.1746</plugin.sonar.version>
[jspwiki] 05/23: small refactors suggested by intellij
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 39919c4963df735993159d6fd2b75206315bcd8f
Author: juanpablo <ju...@apache.org>
AuthorDate: Sat Nov 7 18:28:23 2020 +0100
small refactors suggested by intellij
---
.../java/org/apache/wiki/search/LuceneSearchProvider.java | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/jspwiki-main/src/main/java/org/apache/wiki/search/LuceneSearchProvider.java b/jspwiki-main/src/main/java/org/apache/wiki/search/LuceneSearchProvider.java
index 812186a..7451762 100644
--- a/jspwiki-main/src/main/java/org/apache/wiki/search/LuceneSearchProvider.java
+++ b/jspwiki-main/src/main/java/org/apache/wiki/search/LuceneSearchProvider.java
@@ -118,7 +118,7 @@ public class LuceneSearchProvider implements SearchProvider {
/** The maximum number of hits to return from searches. */
public static final int MAX_SEARCH_HITS = 99_999;
- private static String c_punctuationSpaces = StringUtils.repeat(" ", TextUtil.PUNCTUATION_CHARS_ALLOWED.length() );
+ private static final String PUNCTUATION_TO_SPACES = StringUtils.repeat(" ", TextUtil.PUNCTUATION_CHARS_ALLOWED.length() );
/**
* {@inheritDoc}
@@ -134,8 +134,7 @@ public class LuceneSearchProvider implements SearchProvider {
final int indexDelay = TextUtil.getIntegerProperty( props, PROP_LUCENE_INDEXDELAY, LuceneUpdater.INDEX_DELAY );
m_analyzerClass = TextUtil.getStringProperty( props, PROP_LUCENE_ANALYZER, m_analyzerClass );
- // FIXME: Just to be simple for now, we will do full reindex
- // only if no files are in lucene directory.
+ // FIXME: Just to be simple for now, we will do full reindex only if no files are in lucene directory.
final File dir = new File(m_luceneDirectory);
log.info("Lucene enabled, cache will be in: "+dir.getAbsolutePath());
@@ -359,7 +358,7 @@ public class LuceneSearchProvider implements SearchProvider {
doc.add( field );
// Allow searching by page name. Both beautified and raw
- final String unTokenizedTitle = StringUtils.replaceChars( page.getName(), TextUtil.PUNCTUATION_CHARS_ALLOWED, c_punctuationSpaces );
+ final String unTokenizedTitle = StringUtils.replaceChars( page.getName(), TextUtil.PUNCTUATION_CHARS_ALLOWED, PUNCTUATION_TO_SPACES );
field = new Field( LUCENE_PAGE_NAME, TextUtil.beautifyString( page.getName() ) + " " + unTokenizedTitle, TextField.TYPE_STORED );
doc.add( field );
@@ -372,12 +371,12 @@ public class LuceneSearchProvider implements SearchProvider {
// Now add the names of the attachments of this page
try {
final List< Attachment > attachments = m_engine.getManager( AttachmentManager.class ).listAttachments( page );
- String attachmentNames = "";
+ final StringBuilder attachmentNames = new StringBuilder();
for( final Attachment att : attachments ) {
- attachmentNames += att.getName() + ";";
+ attachmentNames.append( att.getName() ).append( ";" );
}
- field = new Field( LUCENE_ATTACHMENTS, attachmentNames, TextField.TYPE_STORED );
+ field = new Field( LUCENE_ATTACHMENTS, attachmentNames.toString(), TextField.TYPE_STORED );
doc.add( field );
} catch( final ProviderException e ) {
[jspwiki] 11/23: added actions for incoming search and edit tests +
an open url method to simplify tests + javadocs
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 38a59ff838b16c49ad064b15fd46c2f8f9c0e896
Author: juanpablo <ju...@apache.org>
AuthorDate: Sat Nov 7 18:38:09 2020 +0100
added actions for incoming search and edit tests + an open url method to simplify tests + javadocs
---
.../apache/wiki/pages/haddock/ReadWikiPage.java | 99 +++++++++++++++++++---
1 file changed, 89 insertions(+), 10 deletions(-)
diff --git a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/ReadWikiPage.java b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/ReadWikiPage.java
index d9800f2..ae43e2d 100644
--- a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/ReadWikiPage.java
+++ b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/ReadWikiPage.java
@@ -18,49 +18,128 @@
*/
package org.apache.wiki.pages.haddock;
+import org.apache.wiki.pages.Page;
import org.openqa.selenium.By;
import com.codeborne.selenide.Condition;
import com.codeborne.selenide.Selenide;
import com.codeborne.selenide.SelenideElement;
+/**
+ * Actions available on the View page.
+ */
public class ReadWikiPage implements HaddockPage {
-
+
+ /**
+ * Open a given page for view.
+ *
+ * @param pageName Wiki page name to View.
+ * @return {@link ReadWikiPage} instance, to allow chaining of actions.
+ */
+ public static ReadWikiPage open( final String pageName ) {
+ return Page.withUrl( Page.baseUrl() + "/Wiki.jsp?page=" + pageName ).openAs( new ReadWikiPage() );
+ }
+
+ /**
+ * Returns the authenticated user text.
+ *
+ * @return the authenticated user text.
+ */
public String authenticatedText() {
return Selenide.$( By.className( "wikipage" ) ).text().trim();
}
-
+
+ /**
+ * Clicks on the login button.
+ *
+ * @return {@link LoginPage} instance, to allow chaining of actions.
+ */
public LoginPage clickOnLogin() {
Selenide.$( By.className( "icon-signin" ) ).click();
return new LoginPage();
}
-
+
+ /**
+ * Clicks on the show reader view link.
+ *
+ * @return {@link ReadWikiPage} instance, to allow chaining of actions.
+ */
public ReadWikiPage clickOnShowReaderView() {
Selenide.$( By.linkText( "Show Reader View" ) ).click();
- return new ReadWikiPage();
+ return this;
}
+ /**
+ * Hover's the user's icon, so the login area gets visible.
+ *
+ * @return {@link ReadWikiPage} instance, to allow chaining of actions.
+ */
public ReadWikiPage hoverLoginArea() {
Selenide.$( By.className( "icon-user" ) ).hover();
return this;
}
-
+
+ /**
+ * Hover's the More tab, making its associated pane visible.
+ *
+ * @return {@link ReadWikiPage} instance, to allow chaining of actions.
+ */
public ReadWikiPage hoverMoreArea() {
Selenide.$( By.id( "more" ) ).hover();
return this;
}
-
+
+ /**
+ * Clicks the edit link.
+ *
+ * @return {@link EditWikiPage} instance, to allow chaining of actions.
+ */
+ public EditWikiPage editPage() {
+ Selenide.$( By.cssSelector( "li#edit a" ) ).waitUntil( Condition.visible, 1_000L ).click();
+ return new EditWikiPage();
+ }
+
+ /**
+ * Searches for a given text.
+ *
+ * @param text text to search for.
+ * @return {@link SearchResultsPage} instance, to allow chaining of actions.
+ */
+ public SearchResultsPage searchFor( final String text ) {
+ Selenide.$( By.id( "searchForm" ) ).hover();
+ Selenide.$( By.id( "query" ) ).click();
+ Selenide.$( By.id( "query" ) ).val( text );
+ Selenide.$( By.id( "searchSubmit" ) ).click();
+ return new SearchResultsPage();
+ }
+
+ /**
+ * Logs the user out.
+ *
+ * @return {@link ReadWikiPage} instance, to allow chaining of actions.
+ */
public ReadWikiPage logout() {
Selenide.$( By.linkText( "Log out" ) ).click();
Selenide.$( By.className( "btn-success" ) ).waitUntil( Condition.visible, 1_000L ).click();
return this;
}
-
- public ReadWikiPage navigateTo( String wikiPageName ) {
+
+ /**
+ * Navigates to a given view page.
+ *
+ * @param wikiPageName wikipage name to navigate to.
+ * @return {@link ReadWikiPage} instance, to allow chaining of actions.
+ */
+ public ReadWikiPage navigateTo( final String wikiPageName ) {
Selenide.$( By.linkText( wikiPageName ) ).click();
- return new ReadWikiPage();
+ return this;
}
-
+
+ /**
+ * Returns the sidebar element.
+ *
+ * @return the sidebar element.
+ */
public SelenideElement sidebar() {
return Selenide.$( By.className( "sidebar" ) );
}
[jspwiki] 01/23: Portable build native executables can be built
entirely through maven, on one run;
just mvn clean install -Dgenerate-native-launchers=true
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 216323a08d04906a6ea5a930a88f767e8e06bcc2
Author: juanpablo <ju...@apache.org>
AuthorDate: Sat Nov 7 18:14:01 2020 +0100
Portable build native executables can be built entirely through maven, on one run; just mvn clean install -Dgenerate-native-launchers=true
---
jspwiki-portable/pom.xml | 103 +++++++++++++++++++++++++++++++++++++++++++++++
mvn_cheat-sheet.md | 1 +
2 files changed, 104 insertions(+)
diff --git a/jspwiki-portable/pom.xml b/jspwiki-portable/pom.xml
index 03d5e5c..46a09cd 100644
--- a/jspwiki-portable/pom.xml
+++ b/jspwiki-portable/pom.xml
@@ -31,6 +31,10 @@
<properties>
<jspwiki.woas.language>en</jspwiki.woas.language>
+ <jspwiki.native-launchers.macos.download>woas:download-appbundler-for-mac</jspwiki.native-launchers.macos.download>
+ <jspwiki.native-launchers.macos.generate>woas:mac-app-oracle-jdk</jspwiki.native-launchers.macos.generate>
+ <jspwiki.native-launchers.windows.download>woas:download-launch4j-for-mac</jspwiki.native-launchers.windows.download>
+ <jspwiki.native-launchers.windows.generate>woas:create-windows-app</jspwiki.native-launchers.windows.generate>
</properties>
<build>
@@ -239,4 +243,103 @@
<version>${tomcat.version}</version>
</dependency>
</dependencies>
+
+ <profiles>
+ <profile>
+ <id>generate-launchers</id>
+ <!-- Native launchers generation need a previous build to be run, so the ant script is able to locate all -->
+ <!-- needed files. In order to do that, we launch another module build, as early as possible, and generate the -->
+ <!-- launchers over it. That way, the main build will be able to pick up the launchers in one run, without -->
+ <!-- needing to manually issue another build again. As generating the native launchers takes some time, this -->
+ <!-- feature must be explicitly activated. -->
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ <property>
+ <name>generate-native-launchers</name>
+ <value>true</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-invoker-plugin</artifactId>
+ <configuration>
+ <logDirectory>${project.build.directory}</logDirectory>
+ <pom>./pom.xml</pom>
+ <properties><build-native-launchers>true</build-native-launchers></properties>
+ <streamLogs>true</streamLogs>
+ </configuration>
+ <executions>
+ <execution>
+ <id>woas:generate-native-launchers</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>build-native-launchers</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ <property>
+ <name>build-native-launchers</name>
+ <value>true</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>woas:build-native-launchers</id>
+ <phase>package</phase>
+ <configuration>
+ <target>
+ <!-- <property name="jspwiki.woas.version" value="${project.version}" /> -->
+ <property name="jspwiki.tomcat.version" value="${tomcat.version}" />
+ <ant antfile="${basedir}/build.xml" target="woas:info" />
+ <ant antfile="${basedir}/build.xml" target="${jspwiki.native-launchers.macos.download}" />
+ <ant antfile="${basedir}/build.xml" target="${jspwiki.native-launchers.macos.generate}" />
+ <ant antfile="${basedir}/build.xml" target="${jspwiki.native-launchers.windows.download}" />
+ <ant antfile="${basedir}/build.xml" target="${jspwiki.native-launchers.windows.generate}" />
+ <ant antfile="${basedir}/build.xml" target="woas:update-tomcat-launchers" />
+ </target>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency><!-- enable support with JDK >= 9, see https://sourceforge.net/p/launch4j/bugs/172/ and https://sourceforge.net/p/launch4j/bugs/206/ -->
+ <groupId>com.thoughtworks.xstream</groupId>
+ <artifactId>xstream</artifactId>
+ <version>1.4.13</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>native-launchers-on-windows-build</id>
+ <activation>
+ <os><family>windows</family></os>
+ </activation>
+ <properties>
+ <jspwiki.native-launchers.macos.download>woas:download-appbundler-for-mac-on-windows</jspwiki.native-launchers.macos.download>
+ <jspwiki.native-launchers.macos.generate>woas:create-mac-app</jspwiki.native-launchers.macos.generate>
+ <jspwiki.native-launchers.windows.download>woas:download-launch4j-for-win</jspwiki.native-launchers.windows.download>
+ <jspwiki.native-launchers.windows.generate>woas:create-windows-app</jspwiki.native-launchers.windows.generate>
+ </properties>
+ </profile>
+ </profiles>
</project>
diff --git a/mvn_cheat-sheet.md b/mvn_cheat-sheet.md
index e31931c..19404e6 100644
--- a/mvn_cheat-sheet.md
+++ b/mvn_cheat-sheet.md
@@ -42,6 +42,7 @@ under the License.
| mvn wro4j:run -Dminimize=true | merge & compress js & css files |
| mvn wro4j:run -Dminimize=false | only merge the js & css files (no compression) |
| mvn clean install -Dmaven.test.skip -Dminimize=false | performs a build, skipping the tests and skip compression |
+| mvn clean install -Dgenerate-native-launchers=true | performs a build, regenerating the native executables on the portable build |
# 3. Reports Specific
[jspwiki] 17/23: Rename ReadWikiPage to ViewWikiPage
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit ba10bd91b4691a500e899007faf700cf776ae355
Author: juanpablo <ju...@apache.org>
AuthorDate: Sat Nov 7 18:45:03 2020 +0100
Rename ReadWikiPage to ViewWikiPage
---
.../java/org/apache/wiki/its/AnonymousViewIT.java | 8 +++----
.../src/main/java/org/apache/wiki/its/EditIT.java | 6 ++---
.../src/main/java/org/apache/wiki/its/LoginIT.java | 6 ++---
.../main/java/org/apache/wiki/its/SearchIT.java | 4 ++--
.../apache/wiki/pages/haddock/EditWikiPage.java | 16 ++++++-------
.../org/apache/wiki/pages/haddock/LoginPage.java | 10 ++++----
.../wiki/pages/haddock/SearchResultsPage.java | 8 +++----
.../{ReadWikiPage.java => ViewWikiPage.java} | 28 +++++++++++-----------
8 files changed, 43 insertions(+), 43 deletions(-)
diff --git a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/AnonymousViewIT.java b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/AnonymousViewIT.java
index 4e48897..44061b6 100644
--- a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/AnonymousViewIT.java
+++ b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/AnonymousViewIT.java
@@ -20,7 +20,7 @@ package org.apache.wiki.its;
import com.codeborne.selenide.junit5.ScreenShooterExtension;
import org.apache.wiki.pages.Page;
-import org.apache.wiki.pages.haddock.ReadWikiPage;
+import org.apache.wiki.pages.haddock.ViewWikiPage;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
@@ -39,12 +39,12 @@ public class AnonymousViewIT {
@Test
void anonymousView() {
- final ReadWikiPage main = ReadWikiPage.open( "Main" );
+ final ViewWikiPage main = ViewWikiPage.open( "Main" );
Assertions.assertEquals( "JSPWiki: Main", main.title() );
Assertions.assertEquals( "Main", main.wikiTitle() );
Assertions.assertTrue( main.wikiPageContent().contains( "You have successfully installed" ) );
- final ReadWikiPage about = main.navigateTo( "JSPWiki" );
+ final ViewWikiPage about = main.navigateTo( "JSPWiki" );
Assertions.assertTrue( about.wikiPageContent().contains( "This Wiki is done using" ) );
}
@@ -56,7 +56,7 @@ public class AnonymousViewIT {
@Test
void anonymousReaderView() {
- final ReadWikiPage main = ReadWikiPage.open( "Main" );
+ final ViewWikiPage main = ViewWikiPage.open( "Main" );
Assertions.assertEquals( "JSPWiki: Main", main.title() );
Assertions.assertEquals( "Main", main.wikiTitle() );
main.sidebar().should( exist );
diff --git a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/EditIT.java b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/EditIT.java
index 7f5c302..a8d5f6c 100644
--- a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/EditIT.java
+++ b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/EditIT.java
@@ -20,7 +20,7 @@ package org.apache.wiki.its;
import com.codeborne.selenide.junit5.ScreenShooterExtension;
import org.apache.wiki.pages.haddock.EditWikiPage;
-import org.apache.wiki.pages.haddock.ReadWikiPage;
+import org.apache.wiki.pages.haddock.ViewWikiPage;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
@@ -35,12 +35,12 @@ public class EditIT {
void createPageAndTestEditPermissions() {
final String pageName = "RandomPage" + System.currentTimeMillis();
- final ReadWikiPage randomPage = EditWikiPage.open( pageName )
+ final ViewWikiPage randomPage = EditWikiPage.open( pageName )
.saveText( "random page [{ALLOW edit janne}] [{ALLOW view All}]", "random page" );
Assertions.assertEquals( pageName, randomPage.wikiTitle() );
Assertions.assertEquals( "random page", randomPage.wikiPageContent() );
- final ReadWikiPage requiresJannesAccess = randomPage.hoverLoginArea().clickOnLogin().performLogin();
+ final ViewWikiPage requiresJannesAccess = randomPage.hoverLoginArea().clickOnLogin().performLogin();
requiresJannesAccess.editPage().saveText( "random page [{ALLOW edit janne}]", "random page" );
Assertions.assertEquals( pageName, requiresJannesAccess.wikiTitle() );
Assertions.assertEquals( "random page", requiresJannesAccess.wikiPageContent() );
diff --git a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/LoginIT.java b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/LoginIT.java
index b3606df..72b5685 100644
--- a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/LoginIT.java
+++ b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/LoginIT.java
@@ -20,7 +20,7 @@ package org.apache.wiki.its;
import com.codeborne.selenide.junit5.ScreenShooterExtension;
import org.apache.wiki.pages.haddock.LoginPage;
-import org.apache.wiki.pages.haddock.ReadWikiPage;
+import org.apache.wiki.pages.haddock.ViewWikiPage;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
@@ -34,7 +34,7 @@ public class LoginIT {
@Test
void loginAndLogout() {
- ReadWikiPage main = ReadWikiPage.open( "Main" );
+ ViewWikiPage main = ViewWikiPage.open( "Main" );
Assertions.assertEquals( "JSPWiki: Main", main.title() );
Assertions.assertEquals( "Main", main.wikiTitle() );
Assertions.assertEquals( "G’day (anonymous guest)", main.hoverLoginArea().authenticatedText() );
@@ -53,7 +53,7 @@ public class LoginIT {
@Test
void loginKO() {
- ReadWikiPage main = ReadWikiPage.open( "Main" );
+ ViewWikiPage main = ViewWikiPage.open( "Main" );
Assertions.assertEquals( "JSPWiki: Main", main.title() );
Assertions.assertEquals( "Main", main.wikiTitle() );
Assertions.assertEquals( "G’day (anonymous guest)", main.hoverLoginArea().authenticatedText() );
diff --git a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/SearchIT.java b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/SearchIT.java
index 9d0b9c3..3d4d3d6 100644
--- a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/SearchIT.java
+++ b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/its/SearchIT.java
@@ -20,7 +20,7 @@ package org.apache.wiki.its;
import com.codeborne.selenide.junit5.ScreenShooterExtension;
import org.apache.wiki.its.environment.Env;
-import org.apache.wiki.pages.haddock.ReadWikiPage;
+import org.apache.wiki.pages.haddock.ViewWikiPage;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
@@ -37,7 +37,7 @@ public class SearchIT {
// first, search for a term indexed on startup (wait a bit to allow the initial search indexing to complete first)
Thread.sleep( Env.TESTS_CONFIG_SEARCH_INDEX_WAIT );
- final ReadWikiPage main = ReadWikiPage.open( "Main" )
+ final ViewWikiPage main = ViewWikiPage.open( "Main" )
.searchFor( "Congratulations" ).shouldContain( "Main" )
.navigateTo( "Main" );
diff --git a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/EditWikiPage.java b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/EditWikiPage.java
index 89d6c29..e17a16d 100644
--- a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/EditWikiPage.java
+++ b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/EditWikiPage.java
@@ -43,20 +43,20 @@ public class EditWikiPage implements HaddockPage {
/**
* Press the cancel button and disacrd page Edit.
*
- * @return {@link ReadWikiPage} instance, to allow chaining of actions.
+ * @return {@link ViewWikiPage} instance, to allow chaining of actions.
*/
- public ReadWikiPage cancel() {
+ public ViewWikiPage cancel() {
Selenide.$( By.name( "cancel" ) ).click();
- return new ReadWikiPage();
+ return new ViewWikiPage();
}
/**
* Edits the page with the given text. Ensures edition is complete by ensuring the preview pane shows the edited text.
*
* @param text text to edit.
- * @return {@link ReadWikiPage} instance, to allow chaining of actions.
+ * @return {@link ViewWikiPage} instance, to allow chaining of actions.
*/
- public ReadWikiPage saveText(final String text ) {
+ public ViewWikiPage saveText(final String text ) {
return saveText( text, text );
}
@@ -65,14 +65,14 @@ public class EditWikiPage implements HaddockPage {
*
* @param text text text to edit.
* @param preview expected text to hsow up on the preview pane (i.e., page directives on edit pane shouldn't show up here).
- * @return {@link ReadWikiPage} instance, to allow chaining of actions.
+ * @return {@link ViewWikiPage} instance, to allow chaining of actions.
*/
- public ReadWikiPage saveText(final String text, final String preview ) {
+ public ViewWikiPage saveText(final String text, final String preview ) {
Selenide.$( By.cssSelector( EDIT_TEXTAREA ) ).clear();
Selenide.$( By.cssSelector( EDIT_TEXTAREA ) ).val( text );
Selenide.$( By.className( "ajaxpreview" ) ).waitUntil( Condition.text( preview ), 1_000L );
Selenide.$( By.name( "ok" ) ).click();
- return new ReadWikiPage();
+ return new ViewWikiPage();
}
}
diff --git a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/LoginPage.java b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/LoginPage.java
index f7d95da..b66a055 100644
--- a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/LoginPage.java
+++ b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/LoginPage.java
@@ -30,9 +30,9 @@ public class LoginPage implements HaddockPage {
/**
* Logs in using Janne username and password.
*
- * @return {@link ReadWikiPage} instance, to allow chaining of actions.
+ * @return {@link ViewWikiPage} instance, to allow chaining of actions.
*/
- public ReadWikiPage performLogin() {
+ public ViewWikiPage performLogin() {
return performLogin( Env.LOGIN_JANNE_USERNAME, Env.LOGIN_JANNE_PASSWORD );
}
@@ -41,14 +41,14 @@ public class LoginPage implements HaddockPage {
*
* @param login user login.
* @param password user password.
- * @return {@link ReadWikiPage} instance, to allow chaining of actions.
+ * @return {@link ViewWikiPage} instance, to allow chaining of actions.
*/
- public ReadWikiPage performLogin( final String login, final String password ) {
+ public ViewWikiPage performLogin(final String login, final String password ) {
Selenide.$( By.id( "j_username" ) ).val( login );
Selenide.$( By.id( "j_password" ) ).val( password );
Selenide.$( By.name( "submitlogin" ) ).click();
- return new ReadWikiPage();
+ return new ViewWikiPage();
}
}
diff --git a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/SearchResultsPage.java b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/SearchResultsPage.java
index 6b353b2..8458c67 100644
--- a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/SearchResultsPage.java
+++ b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/SearchResultsPage.java
@@ -37,7 +37,7 @@ public class SearchResultsPage implements HaddockPage {
* Open the search results page with a given query text to search for.
*
* @param pageName Wiki page name to View.
- * @return {@link ReadWikiPage} instance, to allow chaining of actions.
+ * @return {@link ViewWikiPage} instance, to allow chaining of actions.
*/
public static SearchResultsPage open( final String pageName ) {
return Page.withUrl( Page.baseUrl() + "/Search.jsp?query=" + pageName ).openAs( new SearchResultsPage() );
@@ -71,11 +71,11 @@ public class SearchResultsPage implements HaddockPage {
* Navigates to a view page from the search results.
*
* @param result wikipage name to navigate to.
- * @return {@link ReadWikiPage} instance, to allow chaining of actions.
+ * @return {@link ViewWikiPage} instance, to allow chaining of actions.
*/
- public ReadWikiPage navigateTo( final String result ) {
+ public ViewWikiPage navigateTo(final String result ) {
Selenide.$( By.cssSelector( ".wikitable.table-striped" ) ).find( By.linkText( result ) ).click();
- return new ReadWikiPage();
+ return new ViewWikiPage();
}
}
diff --git a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/ReadWikiPage.java b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/ViewWikiPage.java
similarity index 82%
rename from jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/ReadWikiPage.java
rename to jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/ViewWikiPage.java
index ae43e2d..1de53ef 100644
--- a/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/ReadWikiPage.java
+++ b/jspwiki-it-tests/jspwiki-selenide-tests/src/main/java/org/apache/wiki/pages/haddock/ViewWikiPage.java
@@ -28,16 +28,16 @@ import com.codeborne.selenide.SelenideElement;
/**
* Actions available on the View page.
*/
-public class ReadWikiPage implements HaddockPage {
+public class ViewWikiPage implements HaddockPage {
/**
* Open a given page for view.
*
* @param pageName Wiki page name to View.
- * @return {@link ReadWikiPage} instance, to allow chaining of actions.
+ * @return {@link ViewWikiPage} instance, to allow chaining of actions.
*/
- public static ReadWikiPage open( final String pageName ) {
- return Page.withUrl( Page.baseUrl() + "/Wiki.jsp?page=" + pageName ).openAs( new ReadWikiPage() );
+ public static ViewWikiPage open(final String pageName ) {
+ return Page.withUrl( Page.baseUrl() + "/Wiki.jsp?page=" + pageName ).openAs( new ViewWikiPage() );
}
/**
@@ -62,9 +62,9 @@ public class ReadWikiPage implements HaddockPage {
/**
* Clicks on the show reader view link.
*
- * @return {@link ReadWikiPage} instance, to allow chaining of actions.
+ * @return {@link ViewWikiPage} instance, to allow chaining of actions.
*/
- public ReadWikiPage clickOnShowReaderView() {
+ public ViewWikiPage clickOnShowReaderView() {
Selenide.$( By.linkText( "Show Reader View" ) ).click();
return this;
}
@@ -72,9 +72,9 @@ public class ReadWikiPage implements HaddockPage {
/**
* Hover's the user's icon, so the login area gets visible.
*
- * @return {@link ReadWikiPage} instance, to allow chaining of actions.
+ * @return {@link ViewWikiPage} instance, to allow chaining of actions.
*/
- public ReadWikiPage hoverLoginArea() {
+ public ViewWikiPage hoverLoginArea() {
Selenide.$( By.className( "icon-user" ) ).hover();
return this;
}
@@ -82,9 +82,9 @@ public class ReadWikiPage implements HaddockPage {
/**
* Hover's the More tab, making its associated pane visible.
*
- * @return {@link ReadWikiPage} instance, to allow chaining of actions.
+ * @return {@link ViewWikiPage} instance, to allow chaining of actions.
*/
- public ReadWikiPage hoverMoreArea() {
+ public ViewWikiPage hoverMoreArea() {
Selenide.$( By.id( "more" ) ).hover();
return this;
}
@@ -116,9 +116,9 @@ public class ReadWikiPage implements HaddockPage {
/**
* Logs the user out.
*
- * @return {@link ReadWikiPage} instance, to allow chaining of actions.
+ * @return {@link ViewWikiPage} instance, to allow chaining of actions.
*/
- public ReadWikiPage logout() {
+ public ViewWikiPage logout() {
Selenide.$( By.linkText( "Log out" ) ).click();
Selenide.$( By.className( "btn-success" ) ).waitUntil( Condition.visible, 1_000L ).click();
return this;
@@ -128,9 +128,9 @@ public class ReadWikiPage implements HaddockPage {
* Navigates to a given view page.
*
* @param wikiPageName wikipage name to navigate to.
- * @return {@link ReadWikiPage} instance, to allow chaining of actions.
+ * @return {@link ViewWikiPage} instance, to allow chaining of actions.
*/
- public ReadWikiPage navigateTo( final String wikiPageName ) {
+ public ViewWikiPage navigateTo(final String wikiPageName ) {
Selenide.$( By.linkText( wikiPageName ) ).click();
return this;
}