Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

citrus simulator UI #177

Merged
merged 5 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 23 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

# Change these settings to your own preference
indent_style = space
indent_size = 4

[*.{ts,tsx,js,jsx,json,css,scss,yml,html,vue}]
indent_size = 2

[*.md]
trim_trailing_whitespace = false
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
with:
version: "17"
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Cache Maven packages
uses: actions/cache@v2
with:
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# ---------------------------------------------------------------------------
# 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.
# ---------------------------------------------------------------------------

name: main
on:
pull_request:
branches:
- main
paths-ignore:
- '**.adoc'
- '**.md'
- 'KEYS'
- 'LICENSE'
- 'NOTICE'
push:
branches:
- main
paths-ignore:
- '**.adoc'
- '**.md'
- 'KEYS'
- 'LICENSE'
- 'NOTICE'
jobs:
simulator-ui:
strategy:
fail-fast: true
matrix:
node-version: [ 18.x, 20.x ]
os: [ ubuntu-20.04 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Checkout code
uses: actions/checkout@v4
- name: Info
run: |
node --version
npm --version
- name: Install dependencies
run: npm ci --cache .npm
working-directory: simulator-ui
- name: Lint
run: npm run lint
working-directory: simulator-ui
- name: Prettier
run: npm run prettier:check
working-directory: simulator-ui
- name: Frontend Tests
run: npm run ci:frontend:test
working-directory: simulator-ui
2 changes: 1 addition & 1 deletion .github/workflows/lts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
distribution: 'temurin'
java-version: ${{ matrix.version }}
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Cache Maven packages
uses: actions/cache@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
with:
version: "17"
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Cache Maven modules
uses: actions/cache@v1
with:
Expand Down
2 changes: 2 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ After forking/cloning the source code repository from [https://github.com/citrus
mvn clean install
```

Add the `-DskipFrontend=false` parameter to include the `simulator-ui` into the build.

## Lombok

This will compile all classes and generate constructors as well as getters and setters using [Project Lombok](https://projectlombok.org/).
Expand Down
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2017 ConSol Software GmbH.
Copyright 2023 to the original author or authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -199,4 +199,4 @@
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.
limitations under the License.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,6 @@ Information
Read the simulator [user manual](https://citrusframework.org/citrus-simulator/) for detailed instructions and features.
For more information on Citrus see [citrusframework.org][2], including a complete [reference manual][3].

[1]: https://citrusframework.org/img/brand-logo.png "Citrus"
[1]: simulator-ui/src/main/webapp/content/images/favicon-32x32.png "Citrus-Simulator"
[2]: https://citrusframework.org
[3]: https://citrusframework.org/reference/html/
40 changes: 20 additions & 20 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@

<javadoc.doclint>none</javadoc.doclint>

<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>

<lombok.version>1.18.20</lombok.version>
<citrus.version>4.0.0-M2</citrus.version>
<spring.boot.version>3.1.2</spring.boot.version>
<spring-boot.version>3.1.2</spring-boot.version>
<spring.version>6.0.9</spring.version>
<spring.ws.version>3.1.3</spring.ws.version>
<testng.version>7.5.1</testng.version>
Expand All @@ -34,8 +36,8 @@
<!-- see https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-logging/3.1.2 -->
<logback.classic.version>1.4.8</logback.classic.version>

<node.version>v16.13.1</node.version>
<npm.version>8.1.2</npm.version>
<node.version>v18.18.0</node.version>
<npm.version>9.8.1</npm.version>

<skip.gpg>false</skip.gpg>
<reuseForks>true</reuseForks>
Expand Down Expand Up @@ -164,7 +166,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -252,12 +254,6 @@
<version>${testng.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.15.0</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down Expand Up @@ -292,13 +288,6 @@
<encoding>${project.build.sourceEncoding}</encoding>
<source>${java.version}</source>
<target>${java.version}</target>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -377,21 +366,32 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<version>3.1.2</version>
<configuration>
<excludes>
<exclude>**/*IT.java</exclude>
</excludes>
<failIfNoTests>false</failIfNoTests>
<forkCount>1</forkCount>
<reuseForks>${reuseForks}</reuseForks>
<failIfNoTests>false</failIfNoTests>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.2</version>
<version>3.1.2</version>
<configuration>
<failIfNoTests>false</failIfNoTests>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
Expand Down
Binary file modified simulator-docs/src/main/asciidoc/images/dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions simulator-samples/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?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 http://maven.apache.org/maven-v4_0_0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
Expand Down Expand Up @@ -41,7 +41,7 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<version>${spring-boot.version}</version>
</plugin>
</plugins>
</pluginManagement>
Expand Down
2 changes: 1 addition & 1 deletion simulator-samples/sample-bank-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion simulator-samples/sample-combined/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion simulator-samples/sample-jms-fax/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion simulator-samples/sample-jms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion simulator-samples/sample-mail/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion simulator-samples/sample-rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion simulator-samples/sample-swagger/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,34 +74,11 @@ public void testUiInfo() {
"{" +
"\"name\":\"REST Petstore Simulator\"," +
"\"version\":\"@ignore@\"" +
"}" +
"}," +
"\"activeProfiles\": []" +
"}"));
}

@CitrusTest
public void testUiSummaryResults() {
$(http().client(simulatorUiClient)
.send()
.get("/api/summary/results")
.message()
.accept(MediaType.APPLICATION_JSON_VALUE)
.contentType(MediaType.APPLICATION_JSON_VALUE));

$(http().client(simulatorUiClient)
.receive()
.response(HttpStatus.OK)
.message()
.contentType(MediaType.APPLICATION_JSON_VALUE)
.body("{" +
"\"size\":\"@isNumber()@\"," +
"\"failed\":\"@isNumber()@\"," +
"\"success\":\"@isNumber()@\"," +
"\"skipped\":0," +
"\"skippedPercentage\":\"0.0\"," +
"\"failedPercentage\":\"@ignore@\"," +
"\"successPercentage\":\"@ignore@\"}"));
}

@CitrusTest
public void testAddPet() {
variable("name", "hasso");
Expand Down
2 changes: 1 addition & 1 deletion simulator-samples/sample-ws-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion simulator-samples/sample-ws/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion simulator-samples/sample-wsdl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
Loading
Loading