|
1 | 1 | package io.sentry.uitest.android |
2 | 2 |
|
3 | 3 | import android.graphics.Color |
4 | | -import android.util.TypedValue |
5 | 4 | import android.view.View |
6 | 5 | import android.widget.EditText |
| 6 | +import android.widget.FrameLayout |
7 | 7 | import android.widget.LinearLayout |
8 | 8 | import androidx.test.core.app.launchActivity |
9 | 9 | import androidx.test.espresso.Espresso.onView |
@@ -550,10 +550,6 @@ class UserFeedbackUiTest : BaseUiTest() { |
550 | 550 | assertEquals((densityScale * 12).toInt(), widget.paddingTop) |
551 | 551 | assertEquals((densityScale * 12).toInt(), widget.paddingBottom) |
552 | 552 |
|
553 | | - val typedValue = TypedValue() |
554 | | - widget.context.theme.resolveAttribute(android.R.attr.colorForeground, typedValue, true) |
555 | | - assertEquals(typedValue.data, widget.currentTextColor) |
556 | | - |
557 | 553 | assertEquals("Report a Bug", widget.text) |
558 | 554 | } |
559 | 555 |
|
@@ -666,14 +662,19 @@ class UserFeedbackUiTest : BaseUiTest() { |
666 | 662 | val buttonId = Int.MAX_VALUE - 1 |
667 | 663 | val feedbackScenario = launchActivity<EmptyActivity>() |
668 | 664 | feedbackScenario.onActivity { |
| 665 | + val layoutParams = |
| 666 | + FrameLayout.LayoutParams( |
| 667 | + LinearLayout.LayoutParams.MATCH_PARENT, |
| 668 | + LinearLayout.LayoutParams.MATCH_PARENT, |
| 669 | + ) |
669 | 670 | val view = |
670 | | - LinearLayout(it).apply { |
671 | | - orientation = LinearLayout.VERTICAL |
| 671 | + FrameLayout(it).apply { |
672 | 672 | addView( |
673 | 673 | SentryUserFeedbackButton(it).apply { |
674 | 674 | id = buttonId |
675 | 675 | widgetConfig?.invoke(this) |
676 | | - } |
| 676 | + }, |
| 677 | + layoutParams, |
677 | 678 | ) |
678 | 679 | } |
679 | 680 | it.setContentView(view) |
|
0 commit comments