diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 13ee6bd..b81b9cb 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -6,7 +6,6 @@
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ] ✨ New feature (non-breaking change which adds functionality)
-- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] 📝 Documentation update
- [ ] ♻️ Code refactoring (no functional changes)
- [ ] 🎨 UI/UX improvement
@@ -20,7 +19,6 @@ Fixes #(issue number)
## Changes Made
-
-
-
-
@@ -47,17 +45,5 @@ Fixes #(issue number)
- Android Version:
- App Version:
-## Checklist
-
-
-- [ ] My code follows the project's code style guidelines
-- [ ] I have performed a self-review of my code
-- [ ] I have commented my code, particularly in hard-to-understand areas
-- [ ] I have made corresponding changes to the documentation
-- [ ] My changes generate no new warnings or errors
-- [ ] I have added tests that prove my fix is effective or that my feature works
-- [ ] New and existing unit tests pass locally with my changes
-- [ ] Any dependent changes have been merged and published
-
## Additional Notes
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2dae4a4..9ad8eb1 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -4,11 +4,11 @@ on:
push:
branches:
- develop
- - main
+ - master
pull_request:
branches:
- develop
- - main
+ - master
jobs:
build:
@@ -80,57 +80,6 @@ jobs:
app/build/reports/lint-results*.xml
retention-days: 7
- # Uncomment this job when you have instrumented tests ready
- # instrumented-tests:
- # name: Instrumented Tests
- # runs-on: ubuntu-latest
- # timeout-minutes: 45
- # strategy:
- # matrix:
- # api-level: [31, 34]
- # target: [google_apis]
- #
- # steps:
- # - name: Checkout code
- # uses: actions/checkout@v4
- #
- # - name: Set up JDK 17
- # uses: actions/setup-java@v4
- # with:
- # distribution: 'temurin'
- # java-version: '17'
- #
- # - name: Setup Gradle
- # uses: gradle/actions/setup-gradle@v3
- #
- # - name: Grant execute permission for gradlew
- # run: chmod +x gradlew
- #
- # - name: Enable KVM group perms
- # run: |
- # echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
- # sudo udevadm control --reload-rules
- # sudo udevadm trigger --name-match=kvm
- #
- # - name: Run instrumented tests
- # uses: reactivecircus/android-emulator-runner@v2
- # with:
- # api-level: ${{ matrix.api-level }}
- # target: ${{ matrix.target }}
- # arch: x86_64
- # profile: Nexus 6
- # script: ./gradlew connectedDebugAndroidTest --stacktrace
- #
- # - name: Upload instrumented test results
- # if: always()
- # uses: actions/upload-artifact@v4
- # with:
- # name: instrumented-test-results-api-${{ matrix.api-level }}
- # path: |
- # app/build/reports/androidTests/
- # app/build/outputs/androidTest-results/
- # retention-days: 7
-
code-quality:
name: Code Quality Checks
runs-on: ubuntu-latest
diff --git a/.idea/deploymentTargetSelector.xml b/.idea/deploymentTargetSelector.xml
index 4b158c2..fe06dbe 100644
--- a/.idea/deploymentTargetSelector.xml
+++ b/.idea/deploymentTargetSelector.xml
@@ -13,16 +13,11 @@
-
+
+
+
+
-
-
-
-
-
-
-
-
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index c76e5f1..1bd516a 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -3,6 +3,7 @@ plugins {
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose)
alias(libs.plugins.detekt)
+ alias(libs.plugins.ksp)
id("org.jetbrains.kotlin.kapt")
id("com.google.dagger.hilt.android")
}
@@ -16,8 +17,8 @@ android {
applicationId = "com.serranoie.app.media.sorter"
minSdk = 31
targetSdk = 36
- versionCode = 1014
- versionName = "1.0.14"
+ versionCode = 102
+ versionName = "1.0.2"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
@@ -48,10 +49,17 @@ android {
buildFeatures {
compose = true
}
+
+ testOptions {
+ unitTests {
+ isReturnDefaultValues = true
+ }
+ }
}
dependencies {
implementation(libs.androidx.core.ktx)
+ implementation(libs.androidx.core.splashscreen)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.lifecycle.viewmodel.compose)
implementation(libs.androidx.activity.compose)
@@ -64,7 +72,15 @@ dependencies {
implementation(libs.androidx.material3)
implementation(libs.material3)
implementation(libs.androidx.work.runtime.ktx)
+ // Unit Testing
testImplementation(libs.junit)
+ testImplementation("io.mockk:mockk:1.13.14")
+ testImplementation("io.mockk:mockk-android:1.13.14")
+ testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.9.0")
+ testImplementation("androidx.arch.core:core-testing:2.2.0")
+ testImplementation("app.cash.turbine:turbine:1.2.0")
+
+ // UI Testing
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
androidTestImplementation(platform(libs.androidx.compose.bom))
@@ -90,23 +106,24 @@ dependencies {
// Wavy Slider for video progress
implementation(libs.wavy.slider)
- implementation("com.google.dagger:hilt-android:2.57.1")
- kapt("com.google.dagger:hilt-android-compiler:2.57.1")
+ implementation(libs.hilt.android)
+ kapt(libs.hilt.android.compiler)
implementation(libs.androidx.hilt.navigation.compose)
// Hilt Work integration
- implementation("androidx.hilt:hilt-work:1.2.0")
- kapt("androidx.hilt:hilt-compiler:1.2.0")
+ kapt(libs.androidx.hilt.compiler)
implementation(libs.androidx.hilt.work)
// Update checking dependencies
- implementation("com.google.android.play:app-update:2.1.0")
- implementation("com.google.android.play:app-update-ktx:2.1.0")
- implementation("androidx.work:work-runtime-ktx:2.10.0")
- implementation("com.squareup.retrofit2:retrofit:2.11.0")
- implementation("com.squareup.retrofit2:converter-gson:2.11.0")
- implementation("com.squareup.okhttp3:okhttp:4.12.0")
- implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")
+ implementation(libs.app.update)
+ implementation(libs.app.update.ktx)
+ implementation(libs.androidx.work.runtime.ktx)
+ implementation(libs.retrofit)
+ implementation(libs.retrofit.gson)
+ implementation(libs.okhttp)
+ implementation(libs.okhttp.logging)
+
+ implementation("androidx.compose.animation:animation:1.6.7")
}
// Detekt configuration
diff --git a/app/src/androidTest/java/com/serranoie/app/media/sorter/ExampleInstrumentedTest.kt b/app/src/androidTest/java/com/serranoie/app/media/sorter/ExampleInstrumentedTest.kt
deleted file mode 100644
index 414f016..0000000
--- a/app/src/androidTest/java/com/serranoie/app/media/sorter/ExampleInstrumentedTest.kt
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.serranoie.app.media.sorter
-
-import androidx.test.platform.app.InstrumentationRegistry
-import androidx.test.ext.junit.runners.AndroidJUnit4
-
-import org.junit.Test
-import org.junit.runner.RunWith
-
-import org.junit.Assert.*
-
-/**
- * Instrumented test, which will execute on an Android device.
- *
- * See [testing documentation](http://d.android.com/tools/testing).
- */
-@RunWith(AndroidJUnit4::class)
-class ExampleInstrumentedTest {
- @Test
- fun useAppContext() {
- // Context of the app under test.
- val appContext = InstrumentationRegistry.getInstrumentation().targetContext
- assertEquals("com.serranoie.app.media.sorter", appContext.packageName)
- }
-}
diff --git a/app/src/androidTest/java/com/serranoie/app/media/sorter/presentation/review/ReviewScreenTest.kt b/app/src/androidTest/java/com/serranoie/app/media/sorter/presentation/review/ReviewScreenTest.kt
new file mode 100644
index 0000000..3a4d6f2
--- /dev/null
+++ b/app/src/androidTest/java/com/serranoie/app/media/sorter/presentation/review/ReviewScreenTest.kt
@@ -0,0 +1,120 @@
+package com.serranoie.app.media.sorter.presentation.review
+
+import android.app.PendingIntent
+import android.net.Uri
+import androidx.activity.ComponentActivity
+import androidx.compose.ui.test.*
+import androidx.compose.ui.test.junit4.createAndroidComposeRule
+import androidx.test.ext.junit.runners.AndroidJUnit4
+import com.serranoie.app.media.sorter.data.MediaFile
+import com.serranoie.app.media.sorter.domain.Result
+import com.serranoie.app.media.sorter.domain.repository.MediaRepository
+import com.serranoie.app.media.sorter.presentation.model.MediaFileUi
+import com.serranoie.app.media.sorter.presentation.ui.theme.SorterTheme
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import java.time.LocalDate
+
+@RunWith(AndroidJUnit4::class)
+class ReviewScreenTest {
+
+ @get:Rule
+ val composeRule = createAndroidComposeRule()
+
+ private val fakeRepository = object : MediaRepository {
+ override suspend fun fetchMediaFiles(): Result> = Result.Success(emptyList())
+ override suspend fun getMediaByFolder(): Result