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

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(),
)
}
}
}