Skip a Menu test on API 33+
This test is failing on the lastest Cuttlefish builds, probably as a
result of the introduction of a default default edge to edge policy.
Until this is fixed, the tests are being skipped when running on API 33
or above.
Bug: 335809611
Bug: 335815616
Test: MenuTest
Relnote: N/A
Change-Id: Idb8fdd092cdee5033c662b287e645898fbc9b281
diff --git a/compose/material/material/src/androidInstrumentedTest/kotlin/androidx/compose/material/MenuTest.kt b/compose/material/material/src/androidInstrumentedTest/kotlin/androidx/compose/material/MenuTest.kt
index 5030a8b..966e740 100644
--- a/compose/material/material/src/androidInstrumentedTest/kotlin/androidx/compose/material/MenuTest.kt
+++ b/compose/material/material/src/androidInstrumentedTest/kotlin/androidx/compose/material/MenuTest.kt
@@ -16,6 +16,7 @@
package androidx.compose.material
+import android.os.Build.VERSION.SDK_INT
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box
@@ -48,6 +49,7 @@
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
import com.google.common.truth.Truth.assertThat
+import org.junit.Assume
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
@@ -129,6 +131,11 @@
@Test
fun menu_scrolledContent() {
+ // TODO This test is disabled on API 33+. See b/335809611 & b/335815616. Once popups are
+ // handled correctly with the introduction of a default edge to edge policy, we should be
+ // able to re-enable it.
+ Assume.assumeTrue(SDK_INT >= 33)
+
rule.setContent {
with(LocalDensity.current) {
Box(Modifier.requiredSize(20.toDp()).background(color = Color.Blue)) {
diff --git a/compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/MenuTest.kt b/compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/MenuTest.kt
index 536e9fe..03c7756 100644
--- a/compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/MenuTest.kt
+++ b/compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/MenuTest.kt
@@ -16,6 +16,7 @@
package androidx.compose.material3
+import android.os.Build.VERSION.SDK_INT
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box
@@ -42,6 +43,7 @@
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.MediumTest
import com.google.common.truth.Truth.assertThat
+import org.junit.Assume
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
@@ -125,6 +127,11 @@
@Test
fun menu_scrolledContent() {
+ // TODO This test is disabled on API 33+. See b/335809611. Once popups are handled correctly
+ // with the introduction of a default edge to edge policy, we should be able to re-enable
+ // it.
+ Assume.assumeTrue(SDK_INT >= 33)
+
rule.setContent {
with(LocalDensity.current) {
Box(Modifier.requiredSize(20.toDp()).background(color = Color.Blue)) {