diff --git a/.github/workflows/appium-tests.yml b/.github/workflows/appium-tests.yml deleted file mode 100644 index a9ce7ab..0000000 --- a/.github/workflows/appium-tests.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: iOS Appium Tests - -on: [push, pull_request] - -jobs: - ios-test: - runs-on: macos-latest - - steps: - - uses: actions/checkout@v2 - - - name: Set up JDK 11 - uses: actions/setup-java@v2 - with: - java-version: '11' - distribution: 'adopt' - - - name: Install Node.js - uses: actions/setup-node@v2 - with: - node-version: '14' - - - name: Install Appium - run: npm install -g appium - - - name: Install Appium Doctor - run: npm install -g appium-doctor - - - name: Check Appium configuration - run: appium-doctor --ios - - - name: Install Carthage - run: brew install carthage - - # Additional steps for configuring WebDriverAgent - - # Install additional dependencies or tools you might need - - - name: Start Appium Server - run: appium & - - - name: Run iOS UI tests - run: # Add command to run your iOS tests here. E.g., a script to start Appium tests. - - # Optional: Steps to upload artifacts like test reports or screenshots diff --git a/shared/build.gradle.kts b/shared/build.gradle.kts index 14df184..895f3a2 100644 --- a/shared/build.gradle.kts +++ b/shared/build.gradle.kts @@ -59,6 +59,7 @@ kotlin { val commonTest by getting { dependencies { implementation(libs.kotlin.test) + implementation(libs.ktor.client.mock) } } } @@ -82,8 +83,5 @@ dependencies { implementation(libs.androidx.animation.android) implementation(libs.androidx.ui.tooling.preview.android) implementation(libs.androidx.ui.tooling.preview.desktop) - testImplementation(libs.mockk) - testImplementation(libs.mockk) - testImplementation(libs.ktor.client.mock) debugImplementation(libs.compose.ui.tooling.preview) } \ No newline at end of file diff --git a/shared/src/commonTest/kotlin/com/example/kmptemplate/Test.kt b/shared/src/commonTest/kotlin/com/example/kmptemplate/Test.kt index 28da842..4453209 100644 --- a/shared/src/commonTest/kotlin/com/example/kmptemplate/Test.kt +++ b/shared/src/commonTest/kotlin/com/example/kmptemplate/Test.kt @@ -2,6 +2,7 @@ package com.example.kmptemplate import Greeting import io.ktor.client.* +import io.ktor.client.engine.mock.* import io.ktor.client.plugins.contentnegotiation.* import io.ktor.http.* import io.ktor.serialization.kotlinx.json.* @@ -32,8 +33,9 @@ class CommonGreetingTest { }) } } - assertTrue("Check 2021-09 is mentioned", Greeting(mockHttpClient).greet().contains("Greetings!")) - + assertTrue { + "Check 2021-09 is mentioned".equals( Greeting(mockHttpClient).greet().contains("Greetings!")) + } } } } \ No newline at end of file diff --git a/shared/src/iosTest/kotlin/com/example/kmptemplate/Test.ios.kt b/shared/src/iosTest/kotlin/com/example/kmptemplate/Test.ios.kt index 17f8760..f5ca35b 100644 --- a/shared/src/iosTest/kotlin/com/example/kmptemplate/Test.ios.kt +++ b/shared/src/iosTest/kotlin/com/example/kmptemplate/Test.ios.kt @@ -36,7 +36,9 @@ class IosGreetingTest { }) } } - assertTrue("Check 2021-09 is mentioned", Greeting(mockHttpClient).greet().contains("Greetings!")) + assertTrue { + "Check 2021-09 is mentioned".equals( Greeting(mockHttpClient).greet().contains("Greetings!")) + } } }