Skip to content

Commit

Permalink
Delete flaky tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yektasarioglu committed Mar 21, 2022
1 parent 7d1a3f1 commit 3515d36
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 107 deletions.
2 changes: 0 additions & 2 deletions features/search/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ dependencies {
DAGGER_HILT_ANDROID_TEST
LOCAL_TEST
TESTING

TURBINE
}

kapt {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
package com.theteampotato.gifit.home.view

import androidx.arch.core.executor.testing.InstantTaskExecutorRule
import androidx.compose.runtime.getValue
import androidx.compose.ui.test.assertIsDisplayed
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onNodeWithText
import com.theteampotato.gifit.domain.usecase.*

import com.theteampotato.gifit.home.viewmodel.SearchViewModel
import com.theteampotato.gifit.testing.DispatcherProvider
import com.theteampotato.gifit.testing.getOrAwaitValue
import com.theteampotato.gifit.ui.GIFitTheme

import dagger.hilt.android.testing.HiltAndroidRule
import dagger.hilt.android.testing.HiltAndroidTest
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.test.StandardTestDispatcher
import kotlinx.coroutines.test.setMain

import org.junit.Before
import org.junit.Rule
Expand All @@ -35,6 +30,8 @@ class SearchScreenTest {
@Inject lateinit var isSearchResultExist: IsSearchResultExist
@Inject lateinit var removeSearchResultFromFavorites: RemoveSearchResultFromFavorites
@Inject lateinit var getSearchResult: GetSearchResult
@Inject lateinit var translateText: TranslateText
@Inject lateinit var readText: ReadText

private lateinit var searchViewModel: SearchViewModel

Expand All @@ -52,7 +49,9 @@ class SearchScreenTest {
addSearchResultToFavorites = addSearchResultToFavorites,
getSearchResult = getSearchResult,
isSearchResultExist = isSearchResultExist,
removeSearchResultFromFavorites = removeSearchResultFromFavorites
removeSearchResultFromFavorites = removeSearchResultFromFavorites,
translateText = translateText,
readText = readText
)

composeTestRule.setContent {
Expand All @@ -73,10 +72,7 @@ class SearchScreenTest {
val givenValue = "Ofis"
val expectedValue = "Office"

//composeTestRule.o

searchViewModel.searchKeyword(givenValue)
//searchViewModel.mSearchResultLiveData.getOrAwaitValue()

composeTestRule.onNodeWithText(expectedValue).assertIsDisplayed()
}
Expand Down

This file was deleted.

0 comments on commit 3515d36

Please sign in to comment.