Skip to content

Commit

Permalink
TECH: Skip test on API 21
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikitae57 committed Sep 7, 2023
1 parent 67af773 commit d2d508a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ package com.kaspersky.kaspressample.docloc_tests.advanced

import android.Manifest
import android.graphics.Color
import android.os.Build
import androidx.fragment.app.testing.FragmentScenario
import androidx.fragment.app.testing.launchFragmentInContainer
import androidx.test.rule.GrantPermissionRule
import com.kaspersky.kaspressample.docloc.ScreenshotSampleFragment
import com.kaspersky.kaspressample.docloc.ScreenshotSampleView
import com.kaspersky.kaspresso.annotations.ScreenShooterTest
import com.kaspersky.kaspresso.testcases.api.testcase.DocLocScreenshotTestCase
import org.junit.Assume
import org.junit.Rule
import org.junit.Test

Expand All @@ -28,6 +30,7 @@ class AdvancedScreenshotSampleTest : DocLocScreenshotTestCase(locales = "en,ru")
@ScreenShooterTest
@Test
fun test() = before {
Assume.assumeTrue("launchFragmentInContainer blocks UI manipulation while onFragment is open", Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP)
scenario = launchFragmentInContainer()
}.after {
}.run {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ package com.kaspersky.kaspressample.docloc_tests.advanced

import android.Manifest
import android.graphics.Color
import android.os.Build
import androidx.fragment.app.testing.FragmentScenario
import androidx.fragment.app.testing.launchFragmentInContainer
import androidx.test.rule.GrantPermissionRule
import com.kaspersky.kaspressample.docloc.ScreenshotSampleFragment
import com.kaspersky.kaspressample.docloc.ScreenshotSampleView
import com.kaspersky.kaspresso.annotations.ScreenShooterTest
import com.kaspersky.kaspresso.testcases.api.testcase.DocLocScreenshotTestCase
import org.junit.Assume
import org.junit.Rule
import org.junit.Test
import java.io.File
Expand All @@ -32,7 +34,8 @@ class AdvancedScreenshotSampleTestLegacy : DocLocScreenshotTestCase(
@ScreenShooterTest
@Test
fun test() = before {
scenario = launchFragmentInContainer<ScreenshotSampleFragment>()
Assume.assumeTrue("launchFragmentInContainer blocks UI manipulation while onFragment is open", Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP)
scenario = launchFragmentInContainer()
}.after {
}.run {
scenario.onFragment {
Expand Down

0 comments on commit d2d508a

Please sign in to comment.