Skip to content

Commit

Permalink
Merge pull request #77 from healenium/feature/EPMHLM-341
Browse files Browse the repository at this point in the history
EPMHLM-341
  • Loading branch information
Alex-Reif authored Aug 9, 2023
2 parents 29bb80b + 558ed87 commit 0fe7646
Show file tree
Hide file tree
Showing 16 changed files with 31 additions and 261 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM openjdk:8-jre-alpine
FROM eclipse-temurin:17-jdk-alpine
COPY /build/libs/healenium-backend-*.jar /healenium-backend.jar
CMD java -jar /healenium-backend.jar
35 changes: 15 additions & 20 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
plugins {
id 'org.springframework.boot' version '2.7.1'
id 'io.spring.dependency-management' version "1.0.12.RELEASE"
id 'org.springframework.boot' version '2.7.14'
id 'io.spring.dependency-management' version "1.1.0"
id 'java'
id 'maven-publish'
id 'jacoco'
}

group 'com.epam.healenium'
version '3.3.4'
version '3.4.0'

sourceCompatibility = 1.8

repositories {
mavenCentral()
Expand All @@ -24,21 +23,22 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-webflux'
implementation 'org.springframework.boot:spring-boot-starter-logging'
implementation 'org.liquibase:liquibase-core:4.15.0'
implementation 'io.appium:java-client:8.3.0'
implementation 'org.postgresql:postgresql:42.2.6'
implementation 'org.liquibase:liquibase-core:4.23.0'
implementation 'org.postgresql:postgresql:42.6.0'
implementation 'com.zaxxer:HikariCP:3.3.1'
implementation 'com.vladmihalcea:hibernate-types-52:2.7.0'
implementation 'javax.validation:validation-api:2.0.1.Final'
implementation 'org.yaml:snakeyaml:2.0'
implementation 'com.google.guava:guava:32.1.1-jre'

implementation 'org.seleniumhq.selenium:selenium-java:4.5.0'
implementation 'com.epam.healenium:tree-comparing:0.4.11'
implementation 'org.seleniumhq.selenium:selenium-java:4.10.0'
implementation 'com.epam.healenium:tree-comparing:0.4.12'
implementation 'org.projectlombok:lombok:1.18.22'
implementation 'org.mapstruct:mapstruct:1.3.1.Final'

implementation 'org.testcontainers:junit-jupiter:1.17.3'
testImplementation 'org.testcontainers:postgresql:1.17.3'
testImplementation('org.testcontainers:testcontainers:1.17.3')
implementation 'org.testcontainers:junit-jupiter:1.18.3'
testImplementation 'org.testcontainers:postgresql:1.18.3'
testImplementation('org.testcontainers:testcontainers:1.18.3')
testImplementation 'io.rest-assured:rest-assured:4.5.1'
testImplementation 'org.springframework:spring-test:5.3.22'

Expand All @@ -47,8 +47,8 @@ dependencies {
}

annotationProcessor 'org.hibernate:hibernate-jpamodelgen:5.4.14.Final'
annotationProcessor 'org.projectlombok:lombok:1.18.8'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.8'
annotationProcessor 'org.projectlombok:lombok:1.18.22'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.22'
annotationProcessor 'org.mapstruct:mapstruct-processor:1.3.1.Final'
testAnnotationProcessor 'org.mapstruct:mapstruct-processor:1.3.1.Final'
}
Expand All @@ -59,15 +59,10 @@ test {
}

jacoco {
toolVersion = '0.8.6'
toolVersion = '0.8.9'
}

jacocoTestReport {
group = "reporting"
description = "Generate Jacoco coverage reports after running tests."
reports {
xml.enabled = true
html.enabled = true
csv.enabled = true
}
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ public void save(@Valid @RequestBody List<HealingRequestDto> dto,
@PostMapping("/session")
public void session(@Valid @RequestBody SessionDto dto) {
log.debug("[Restore Session] Request: {}", dto);
selectorService.restoreSession(dto);
}

/**
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/com/epam/healenium/controller/ReportController.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.epam.healenium.controller;

import com.epam.healenium.model.dto.RecordDto;
import com.epam.healenium.service.ReportService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
Expand Down Expand Up @@ -57,4 +58,13 @@ public String build(@RequestHeader("sessionKey") String key) {
return Paths.get(reportUrl, key).toString();
}

@GetMapping("/data/{uid}")
public RecordDto getRecord(@PathVariable String uid) {
return reportService.generate(uid);
}

@GetMapping("/data")
public RecordDto getRecords() {
return reportService.generate();
}
}
28 changes: 0 additions & 28 deletions src/main/java/com/epam/healenium/restore/RestoreDriverFactory.java

This file was deleted.

11 changes: 0 additions & 11 deletions src/main/java/com/epam/healenium/restore/RestoreDriverService.java

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions src/main/java/com/epam/healenium/service/SelectorService.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
public interface SelectorService {
void saveSelector(SelectorRequestDto request);

void restoreSession(SessionDto sessionDto);

ReferenceElementsDto getReferenceElements(RequestDto dto);

List<RequestDto> getAllSelectors();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
import java.text.DecimalFormat;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -127,11 +125,8 @@ private void buildReportRecords(RecordDto result, Report report) {

private String transformPath(String sourcePath) {
try {
List<String> dirs = Arrays.asList(sourcePath.split("/"));
Collections.reverse(dirs);
String name = dirs.get(0);
String uid = dirs.get(1);
return "/screenshots/".concat(uid).concat("/").concat(name);
int i = sourcePath.lastIndexOf("screenshots");
return sourcePath.substring(i - 1);
} catch (Exception e) {
log.warn("[Build Report] Error transform sourcePath: {}", sourcePath);
return sourcePath;
Expand Down
Loading

0 comments on commit 0fe7646

Please sign in to comment.