@@ -14,8 +14,8 @@ import org.junit.runner.RunWith
1414import org.schabi.newpipe.R
1515import org.schabi.newpipe.error.ErrorInfo
1616import org.schabi.newpipe.error.UserAction
17- import org.schabi.newpipe.extractor.exceptions.ContentNotAvailableException
1817import org.schabi.newpipe.extractor.exceptions.ReCaptchaException
18+ import org.schabi.newpipe.extractor.exceptions.UnsupportedContentInCountryException
1919import org.schabi.newpipe.ui.theme.AppTheme
2020
2121@RunWith(AndroidJUnit4 ::class )
@@ -71,10 +71,10 @@ class ErrorPanelTest {
7171 }
7272
7373 /* *
74- * Test Recaptcha Error shows solve, retry and open in browser buttons
74+ * Test Recaptcha Error shows all buttons: solve, retry, open in browser, report
7575 */
7676 @Test
77- fun recaptchaErrorShowsSolveAndRetryOpenInBrowserButtons () {
77+ fun recaptchaErrorShowsAllButtons () {
7878 var retryClicked = false
7979 val recaptchaErrorInfo = ErrorInfo (
8080 throwable = ReCaptchaException (
@@ -99,7 +99,7 @@ class ErrorPanelTest {
9999 composeRule.onNodeWithText(text(R .string.open_in_browser), ignoreCase = true )
100100 .assertIsDisplayed()
101101 composeRule.onNodeWithText(text(R .string.error_snackbar_action), ignoreCase = true )
102- .assertDoesNotExist ()
102+ .assertIsDisplayed ()
103103 assert (retryClicked) { " onRetry callback should have been invoked" }
104104 }
105105
@@ -109,14 +109,14 @@ class ErrorPanelTest {
109109 @Test
110110 fun testNonRetryableErrorHidesRetryAndReportButtons () {
111111 val contentNotAvailable = ErrorInfo (
112- throwable = ContentNotAvailableException ( " Video has been removed " ),
112+ throwable = UnsupportedContentInCountryException ( " Not available here " ),
113113 userAction = UserAction .REQUESTED_STREAM ,
114114 request = " https://example.com/watch?v=qux"
115115 )
116116
117117 setErrorPanel(contentNotAvailable)
118118
119- composeRule.onNodeWithText(text(R .string.content_not_available ))
119+ composeRule.onNodeWithText(text(R .string.unsupported_content_in_country ))
120120 .assertIsDisplayed()
121121 composeRule.onNodeWithText(text(R .string.retry), ignoreCase = true )
122122 .assertDoesNotExist()
0 commit comments