Add missing isTablet assumptions to tests

While migrating the tests the @Before functions from the legacy tests were not copied over

Test: atest WMShellFlickerServiceTests on a non-tablet device
Change-Id: I051fa8800c184bde9741fb0f4a62e0ee79793e70
This commit is contained in:
Pablo Gamito
2023-07-17 09:57:59 +00:00
parent a30e60b8af
commit cb0733bf83
3 changed files with 9 additions and 0 deletions

View File

@@ -25,6 +25,7 @@ import androidx.test.uiautomator.UiDevice
import com.android.launcher3.tapl.LauncherInstrumentation
import com.android.wm.shell.flicker.service.Utils
import org.junit.After
import org.junit.Assume
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
@@ -45,6 +46,8 @@ constructor(val rotation: Rotation = Rotation.ROTATION_0) {
@Before
fun setup() {
Assume.assumeTrue(tapl.isTablet)
tapl.setEnableRotation(true)
tapl.setExpectedRotation(rotation.value)

View File

@@ -25,6 +25,7 @@ import androidx.test.uiautomator.UiDevice
import com.android.launcher3.tapl.LauncherInstrumentation
import com.android.wm.shell.flicker.service.Utils
import org.junit.After
import org.junit.Assume
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
@@ -46,6 +47,8 @@ constructor(val rotation: Rotation = Rotation.ROTATION_0) {
@Before
fun setup() {
Assume.assumeTrue(tapl.isTablet)
tapl.setEnableRotation(true)
tapl.setExpectedRotation(rotation.value)

View File

@@ -25,6 +25,7 @@ import androidx.test.uiautomator.UiDevice
import com.android.launcher3.tapl.LauncherInstrumentation
import com.android.wm.shell.flicker.service.Utils
import org.junit.After
import org.junit.Assume
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
@@ -45,6 +46,8 @@ constructor(val rotation: Rotation = Rotation.ROTATION_0) {
@Before
fun setup() {
Assume.assumeTrue(tapl.isTablet)
tapl.setEnableRotation(true)
tapl.setExpectedRotation(rotation.value)