-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1180 from NASA-AMMOS/refactor/e2eTests-to-java
Convert e2eTests to Java
- Loading branch information
Showing
66 changed files
with
5,190 additions
and
5,417 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
node_modules | ||
test-results |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,46 @@ | ||
plugins { | ||
id 'com.github.node-gradle.node' version '5.0.0' | ||
id 'java-library' | ||
id 'jacoco' | ||
} | ||
|
||
node { | ||
version = '16.17.0' | ||
npmVersion = '8.15.0' | ||
download = true | ||
java { | ||
toolchain { | ||
languageVersion = JavaLanguageVersion.of(19) | ||
} | ||
} | ||
|
||
task assemble { | ||
dependsOn npmInstall | ||
jacocoTestReport { | ||
dependsOn test | ||
reports { | ||
xml.required = true | ||
} | ||
} | ||
|
||
task build { | ||
dependsOn assemble | ||
task e2eTest(type: Test) { | ||
if(file('.env').exists()) { | ||
file('.env').readLines().each() { | ||
def (key, value) = it.tokenize('=') | ||
environment key, value | ||
} | ||
} else if(file('../.env').exists()){ | ||
file('../.env').readLines().each() { | ||
def (key, value) = it.tokenize('=') | ||
environment key, value | ||
} | ||
} | ||
environment "PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD", 1 | ||
// Run the tests in parallel to improve performance | ||
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1 | ||
useJUnitPlatform() | ||
} | ||
|
||
task e2eTest(type: NpmTask) { | ||
dependsOn npmInstall | ||
args = ['run', 'test'] | ||
dependencies { | ||
testImplementation 'com.microsoft.playwright:playwright:1.37.0' | ||
|
||
testImplementation 'org.assertj:assertj-core:3.24.2' | ||
testImplementation 'org.glassfish:javax.json:1.1.4' | ||
testImplementation 'org.apache.commons:commons-lang3:3.13.0' | ||
|
||
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.10.0' | ||
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.10.0' | ||
} |
Oops, something went wrong.