1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2026-02-01 15:50:17 +00:00

test,ui: move comment error tests to error; remove unused ComposeView

This commit is contained in:
Su TT
2025-09-29 13:48:03 -04:00
parent fab0d35269
commit 3ab1322425
4 changed files with 5 additions and 15 deletions

3
.gitignore vendored
View File

@@ -19,3 +19,6 @@ app/release/
bin/
.vscode/
*.code-workspace
# logs
*.log

View File

@@ -1,4 +1,4 @@
package org.schabi.newpipe.ui.components.common
package org.schabi.newpipe.error
import android.content.Context
import androidx.test.core.app.ApplicationProvider
@@ -7,14 +7,12 @@ import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
import org.schabi.newpipe.R
import org.schabi.newpipe.error.ErrorInfo
import org.schabi.newpipe.error.UserAction
import org.schabi.newpipe.extractor.exceptions.ReCaptchaException
import java.io.IOException
import java.net.SocketTimeoutException
@RunWith(AndroidJUnit4::class)
class CommentSectionErrorTest {
class ErrorInfoCommentsTest {
private val context: Context by lazy { ApplicationProvider.getApplicationContext<Context>() }
// Test 1: Network error on initial load (Resource.Error)
@Test

View File

@@ -16,7 +16,6 @@ import androidx.compose.runtime.getValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.input.nestedscroll.nestedScroll
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.rememberNestedScrollInteropConnection
import androidx.compose.ui.res.pluralStringResource
import androidx.compose.ui.tooling.preview.Preview
@@ -57,7 +56,6 @@ private fun CommentSection(
val comments = commentsFlow.collectAsLazyPagingItems()
val nestedScrollInterop = rememberNestedScrollInteropConnection()
val state = rememberLazyListState()
val context = LocalContext.current
LazyColumnThemedScrollbar(state = state) {
LazyColumn(

View File

@@ -214,15 +214,6 @@
android:layout_marginTop="@dimen/video_item_detail_error_panel_margin"
android:visibility="gone"
tools:visibility="gone" />
<androidx.compose.ui.platform.ComposeView
android:id="@+id/compose_error_panel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/detail_title_root_layout"
android:layout_marginTop="@dimen/video_item_detail_error_panel_margin"
android:visibility="gone"
/>
<!--HIDING ROOT-->
<LinearLayout
android:id="@+id/detail_content_root_hiding"