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

Feature/scala e2e tests #105

Merged
merged 7 commits into from
Apr 8, 2024
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/test-integration-cypress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Cypress - Integration Test

on: [pull_request]

jobs:
cypress-run:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [20.x]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
with:
node-version: ${{ matrix.node-version }}
- name: Test with Headless
uses: cypress-io/github-action@v6
with:
browser: chrome
headless: true
build: yarn build
start: yarn start
command: yarn test:integration
41 changes: 25 additions & 16 deletions .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
name: TypeScript - Integration Test
name: Playwright - Integration Test

on: [pull_request]

jobs:
cypress-run:
build:

runs-on: ubuntu-latest

strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [20.x]
fail-fast: false

steps:
- name: Checkout
uses: actions/checkout@v4
with:
node-version: ${{ matrix.node-version }}
- name: Test with Headless
uses: cypress-io/github-action@v6
with:
browser: chrome
headless: true
build: yarn build
start: yarn start
command: yarn test:integration
- uses: actions/checkout@v4
- name: Install Gradle
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Install & build with Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: yarn install
- name: Build app
run: yarn build
- name: Start app
run: yarn start &
- name: Wait for app to Start
run: sleep 5
- run: cd tests/integration/oldswedishdictionarye2e && ./gradlew test -i
env:
CI: true
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,5 @@ public/workbox-*.js
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
!.yarn/versions
/tests/integration/oldswedishdictionarye2e/.idea
42 changes: 42 additions & 0 deletions tests/integration/oldswedishdictionarye2e/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store
39 changes: 39 additions & 0 deletions tests/integration/oldswedishdictionarye2e/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
plugins {
scala
application
}

sourceSets {
main {
scala {
setSrcDirs(listOf("src/main/scala"))
}
}
test {
scala {
setSrcDirs(listOf("src/test/scala"))
}
}
}

group = "org.example"
version = "1.0-SNAPSHOT"

repositories {
mavenCentral()
}

dependencies {
implementation("org.scala-lang:scala-library:2.13.12")
implementation("com.microsoft.playwright:playwright:1.42.0")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.0")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.0")
}

tasks.test {
useJUnitPlatform()
}

application {
mainClass.set("Main")
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
kotlin.code.style=official
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading