Skip to content

Commit

Permalink
IVYPORTAL-16522 Portal Express - Make integration via non specific cu…
Browse files Browse the repository at this point in the history
…stomizations

- Implement GUI test
  • Loading branch information
mnhnam-axonivy committed Jan 7, 2025
1 parent e3d29d3 commit 1f4c08b
Show file tree
Hide file tree
Showing 38 changed files with 1,746 additions and 0 deletions.
35 changes: 35 additions & 0 deletions axonivy-express-test/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src">
<attributes>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src_wsproc">
<attributes>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src_dataClasses">
<attributes>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry exported="true" kind="con" path="IVY_CONTAINER"/>
<classpathentry kind="con" path="WEBAPP_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="src" output="target/test-classes" path="src_test">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
19 changes: 19 additions & 0 deletions axonivy-express-test/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# general
Thumbs.db
.DS_Store
*~
*.log

# java
*.class
hs_err_pid*

# maven
target/
lib/mvn-deps/

# ivy
classes/
src_dataClasses/
src_wsproc/
logs/
53 changes: 53 additions & 0 deletions axonivy-express-test/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>axonivy-express-test</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>ch.ivyteam.ivy.designer.dataClasses.ui.ivyDataClassBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>ch.ivyteam.ivy.designer.process.ui.ivyWebServiceProcessClassBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>ch.ivyteam.ivy.dialog.form.build.ivyDialogFormBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>ch.ivyteam.ivy.designer.ide.ivyModelValidationBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>ch.ivyteam.ivy.project.IvyProjectNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jem.beaninfo.BeanInfoNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
</natures>
</projectDescription>
4 changes: 4 additions & 0 deletions axonivy-express-test/.settings/ch.ivyteam.ivy.designer.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ch.ivyteam.ivy.designer.preferences.DataClassPreferencePage\:DEFAULT_NAMESPACE=com.axonivy.utils.axonivyexpress.test
ch.ivyteam.ivy.project.preferences\:PRIMEFACES_VERSION=13
ch.ivyteam.ivy.project.preferences\:PROJECT_VERSION=120001
eclipse.preferences.version=1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
9 changes: 9 additions & 0 deletions axonivy-express-test/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
org.eclipse.jdt.core.compiler.compliance=21
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=21
11 changes: 11 additions & 0 deletions axonivy-express-test/.settings/org.eclipse.wst.common.component
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="axonivy-express-test">
<wb-resource deploy-path="/" source-path="/webContent" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src_wsproc"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src_dataClasses"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src_test"/>
<property name="context-root" value="axonivy-express-test"/>
<property name="java-output-path" value="/axonivy-express-test/target/classes"/>
</wb-module>
</project-modules>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<root>
<facet id="jst.jsf">
<node name="libprov">
<attribute name="provider-id" value="jsf-user-library-provider"/>
</node>
</facet>
</root>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<installed facet="java" version="21"/>
<installed facet="jst.web" version="3.0"/>
<installed facet="jst.jsf" version="2.1"/>
</faceted-project>
2 changes: 2 additions & 0 deletions axonivy-express-test/.settings/org.eclipse.wst.css.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
css-profile/<project>=org.eclipse.wst.css.core.cssprofile.css3
eclipse.preferences.version=1
22 changes: 22 additions & 0 deletions axonivy-express-test/config/custom-fields.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# yaml-language-server: $schema=https://json-schema.axonivy.com/app/12.0.0/custom-fields.json
#
# == Custom Fields Information ==
#
# You can define here your project custom fields.
# Have a look at our documentation for more information.
#
CustomFields:
# Tasks:
# MyTaskCustomField:
# Label: My task custom field
# Description: This new task custom field can be used to ...
# Type: STRING
# Cases:
# MyCaseCustomField:
# Label: My case custom field
# Description: This new case custom field can be used to ...
# Type: STRING
# Starts:
# MyStartCustomField:
# Label: My start custom field
# Description: This new start custom field can be used to ...
2 changes: 2 additions & 0 deletions axonivy-express-test/config/databases.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# yaml-language-server: $schema=https://json-schema.axonivy.com/app/12.0.0/databases.json
Databases:
1 change: 1 addition & 0 deletions axonivy-express-test/config/overrides.any
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
2 changes: 2 additions & 0 deletions axonivy-express-test/config/persistence.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.2" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd"/>
2 changes: 2 additions & 0 deletions axonivy-express-test/config/rest-clients.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# yaml-language-server: $schema=https://json-schema.axonivy.com/app/12.0.0/rest-clients.json
RestClients:
8 changes: 8 additions & 0 deletions axonivy-express-test/config/roles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<role>
<identifier>Everybody</identifier>
<role>
<identifier>TestRole</identifier>
<displayName>TestRole</displayName>
</role>
</role>
13 changes: 13 additions & 0 deletions axonivy-express-test/config/users.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<userConfig>
<user>
<username>express</username>
<password>express</password>
<fullName>Express User</fullName>
</user>
<user>
<username>testUser</username>
<password>testUser</password>
<fullName>Test User</fullName>
</user>
</userConfig>
2 changes: 2 additions & 0 deletions axonivy-express-test/config/variables.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# yaml-language-server: $schema=https://json-schema.axonivy.com/app/12.0.0/variables.json
Variables:
2 changes: 2 additions & 0 deletions axonivy-express-test/config/webservice-clients.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# yaml-language-server: $schema=https://json-schema.axonivy.com/app/12.0.0/webservice-clients.json
WebServiceClients:
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema" : "https://json-schema.axonivy.com/data-class/12.0.0/data-class.json",
"simpleName" : "Data",
"namespace" : "com.axonivy.utils.axonivyexpress.test",
"isBusinessCaseData" : false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema" : "https://json-schema.axonivy.com/data-class/12.0.0/data-class.json",
"simpleName" : "HelperData",
"namespace" : "com.axonivy.utils.axonivyexpress.test",
"isBusinessCaseData" : false
}
97 changes: 97 additions & 0 deletions axonivy-express-test/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.axonivy.utils.axonivyexpress</groupId>
<artifactId>axonivy-express-test</artifactId>
<version>12.0.0-SNAPSHOT</version>
<packaging>iar-integration-test</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.axonivy.utils.axonivyexpress</groupId>
<artifactId>axonivy-express</artifactId>
<version>${project.version}</version>
<type>iar</type>
</dependency>
<dependency>
<groupId>com.axonivy.ivy.webtest</groupId>
<artifactId>web-tester</artifactId>
<version>12.0.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<snapshots>
<updatePolicy>always</updatePolicy>
</snapshots>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<updatePolicy>always</updatePolicy>
</snapshots>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</pluginRepository>
</pluginRepositories>
<build>
<testSourceDirectory>src_test</testSourceDirectory>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.0.0-M1</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.axonivy.ivy.ci</groupId>
<artifactId>project-build-plugin</artifactId>
<version>12.0.0</version>
<extensions>true</extensions>
<configuration>
<encoding>UTF-8</encoding>
<compilerWarnings>false</compilerWarnings>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M4</version>
<executions>
<execution>
<id>default-test</id>
<phase>test</phase>
<configuration>
<skip>true</skip>
</configuration>
</execution>
<execution>
<id>selenium.web.tests</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
<argLine>-Dtest.engine.url=${test.engine.url}
-Dtest.engine.app=axonivyexpresstest</argLine>
<systemPropertyVariables>
<test.test.engine.url.url>${test.engine.url}</test.test.engine.url.url>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</project>
43 changes: 43 additions & 0 deletions axonivy-express-test/processes/Start Processes/Helper.p.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"$schema" : "https://json-schema.axonivy.com/process/12.0.0/process.json",
"id" : "1943EF9CC7A1B392",
"config" : {
"data" : "com.axonivy.utils.axonivyexpress.test.HelperData"
},
"elements" : [ {
"id" : "f0",
"type" : "RequestStart",
"name" : "cleanData",
"config" : {
"signature" : "cleanData"
},
"visual" : {
"at" : { "x" : 96, "y" : 64 }
},
"connect" : [
{ "id" : "f2", "to" : "f3" }
]
}, {
"id" : "f1",
"type" : "TaskEnd",
"visual" : {
"at" : { "x" : 368, "y" : 64 },
"labelOffset" : { "x" : 13, "y" : 33 }
}
}, {
"id" : "f3",
"type" : "Script",
"config" : {
"output" : {
"code" : "ivy.var.set(\"Portal.Processes.ExpressProcesses\", \"\");"
},
"sudo" : true
},
"visual" : {
"at" : { "x" : 240, "y" : 64 }
},
"connect" : [
{ "id" : "f4", "to" : "f1", "color" : "default" }
]
} ]
}
Loading

0 comments on commit 1f4c08b

Please sign in to comment.