refactor: drop screenshot tests

This breaks the Anvil Gradle Plugin

See: https://github.com/ZacSweers/anvil/issues/89
This commit is contained in:
Harsh Shandilya 2025-03-28 15:15:53 +05:30
parent 82d8303bfe
commit 5599d6d70d
10 changed files with 0 additions and 78 deletions

1
.gitattributes vendored
View file

@ -2,4 +2,3 @@
**/*.html linguist-vendored
android/src/main/baseline-prof.txt linguist-generated -diff
android/src/main/generated/** linguist-generated -diff
**/screenshotTest/**/*.png filter=lfs diff=lfs merge=lfs -text

View file

@ -29,7 +29,6 @@ plugins {
alias(libs.plugins.kotlin.composeCompiler)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.navigation.safeargs)
alias(libs.plugins.screenshot)
alias(libs.plugins.dependencyAnalysis)
}
@ -45,7 +44,6 @@ extensions.configure<ApplicationExtension> {
applicationIdSuffix = ".internal"
isDebuggable = true
}
experimentalProperties["android.experimental.enableScreenshotTest"] = true
}
aboutLibraries.gitHubApiToken = providers.environmentVariable("GITHUB_TOKEN").orNull
@ -139,8 +137,6 @@ dependencies {
kapt(libs.dagger.compiler)
screenshotTestImplementation(libs.androidx.compose.ui.tooling)
addTestDependencies(project)
androidTestImplementation(libs.androidx.test.espresso.core)
androidTestImplementation(libs.androidx.test.uiautomator)

View file

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:10defb7f6abec5d8bd07e07625e30e5b68d3a330e87f157e8138688f8d7ef0aa
size 214795

View file

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:64dd5c002c021774469d7d9a15433678a014f720b6cde2281fbbf20daee98712
size 216093

View file

@ -1,37 +0,0 @@
/*
* Copyright © Harsh Shandilya.
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
*/
package dev.msfjarvis.claw.android.ui.lists
import android.annotation.SuppressLint
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.runtime.Composable
import androidx.paging.PagingData
import androidx.paging.compose.collectAsLazyPagingItems
import dev.msfjarvis.claw.common.posts.TEST_POST
import dev.msfjarvis.claw.common.posts.TEST_POST_ACTIONS
import dev.msfjarvis.claw.common.theme.LobstersTheme
import dev.msfjarvis.claw.common.ui.preview.ThemePreviews
import kotlinx.coroutines.flow.MutableStateFlow
@SuppressLint("ComposePreviewPublic", "ComposeUnstableReceiver")
class NetworkPostsTest {
@ThemePreviews
@Composable
fun DefaultPreview() {
val items = List(20) { TEST_POST.copy(shortId = "${TEST_POST.shortId}${it}") }
val flow = MutableStateFlow(PagingData.from(items))
LobstersTheme {
NetworkPosts(
lazyPagingItems = flow.collectAsLazyPagingItems(),
listState = rememberLazyListState(),
postActions = TEST_POST_ACTIONS,
contentPadding = PaddingValues(),
)
}
}
}

View file

@ -21,7 +21,6 @@ class DependencyUpdatesPlugin : Plugin<Project> {
override fun apply(project: Project) {
project.pluginManager.apply(VersionCatalogUpdatePlugin::class)
project.extensions.configure<VersionCatalogUpdateExtension> {
keep.keepUnusedLibraries.set(true)
versionSelector {
val currentVersion = Version.tryParse(it.currentVersion).getOrNull()
val newVersion = Version.tryParse(it.candidate.version).getOrNull()

View file

@ -16,7 +16,6 @@ plugins {
alias(libs.plugins.anvil)
alias(libs.plugins.whetstone)
alias(libs.plugins.kotlin.composeCompiler)
alias(libs.plugins.screenshot)
alias(libs.plugins.dependencyAnalysis)
}
@ -26,7 +25,6 @@ android {
compose = true
}
namespace = "dev.msfjarvis.claw.common"
experimentalProperties["android.experimental.enableScreenshotTest"] = true
}
androidComponents { beforeVariants { (it as HasUnitTestBuilder).enableUnitTest = false } }
@ -69,8 +67,6 @@ dependencies {
implementation(libs.kotlinResult.coroutines)
implementation(libs.napier)
screenshotTestImplementation(libs.androidx.compose.ui.tooling)
compileOnly(libs.androidx.compose.ui.tooling.preview)
runtimeOnly(libs.androidx.compose.ui.tooling)

View file

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9d9d4a162b7ba995f625b4feb683879de46ad1c583a37c5cc721030521cece11
size 6633

View file

@ -1,21 +0,0 @@
/*
* Copyright © Harsh Shandilya.
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
*/
package dev.msfjarvis.claw.common.ui.decorations
import android.annotation.SuppressLint
import androidx.compose.runtime.Composable
import androidx.compose.ui.tooling.preview.Preview
import dev.msfjarvis.claw.common.theme.LobstersTheme
@SuppressLint("ComposePreviewPublic", "ComposeUnstableReceiver")
class MonthHeaderTest {
@Preview(showBackground = true)
@Composable
fun DefaultPreview() {
LobstersTheme { MonthHeader(label = "April 2023") }
}
}

View file

@ -138,7 +138,6 @@ licensee = "app.cash.licensee:1.13.0"
modulegraphassert = "com.jraska.module.graph.assertion:2.8.0"
navigation-safeargs = { id = "androidx.navigation.safeargs.kotlin", version.ref = "navigation" }
poko = "dev.drewhamilton.poko:0.18.4"
screenshot = "com.android.compose.screenshot:0.0.1-alpha09"
sqldelight = { id = "app.cash.sqldelight", version.ref = "sqldelight" }
tracelog = "dev.msfjarvis.tracelog:0.1.3"
whetstone = { id = "dev.msfjarvis.whetstone", version.ref = "whetstone" }