We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ground-android/app/src/test/java/com/google/android/ground/ui/offlineareas/selector/OfflineAreaSelectorFragmentTest.kt
Lines 90 to 91 in b05b832
matches(hasDescendant(withText(fragment.getString(R.string.offline_area_selector_title)))) ) } // TODO: Complete below test // Issue URL: https://github.com/google/ground-android/issues/3032 @Test fun `stopDownloading cancels active download and updates UI state`() = runWithTestDispatcher { composeTestRule.setContent { DownloadProgressDialog(viewModel.downloadProgress.value!!, {}) } val progressFlow = MutableSharedFlow<Pair<Int, Int>>() whenever(offlineAreaRepository.downloadTiles(any())).thenReturn(progressFlow) val downloadProgressValues = mutableListOf<Float>() val observer = Observer<Float> { downloadProgressValues.add(it) } viewModel.downloadProgress.observeForever(observer) viewModel.onDownloadClick() advanceUntilIdle() progressFlow.emit(Pair(50, 100)) advanceUntilIdle() composeTestRule .onNodeWithText(composeTestRule.activity.getString(R.string.cancel)) .isDisplayed() composeTestRule .onNodeWithText(composeTestRule.activity.getString(R.string.cancel)) .performClick() progressFlow.emit(Pair(75, 100)) composeTestRule .onNodeWithText(composeTestRule.activity.getString(R.string.cancel)) .isNotDisplayed() assertFalse(viewModel.isDownloadProgressVisible.value!!) assertNull(viewModel.downloadJob) viewModel.downloadProgress.removeObserver(observer) } }
The text was updated successfully, but these errors were encountered:
anandwana001
No branches or pull requests
ground-android/app/src/test/java/com/google/android/ground/ui/offlineareas/selector/OfflineAreaSelectorFragmentTest.kt
Lines 90 to 91 in b05b832
The text was updated successfully, but these errors were encountered: