Skip to content

Commit

Permalink
Fix failing e2eCreateOrderTest
Browse files Browse the repository at this point in the history
  • Loading branch information
irfano committed Nov 20, 2024
1 parent f412ed5 commit e3a3235
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import androidx.test.espresso.matcher.ViewMatchers
import androidx.test.espresso.matcher.ViewMatchers.hasDescendant
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.espresso.matcher.ViewMatchers.withParentIndex
import androidx.test.espresso.matcher.ViewMatchers.withText
import com.woocommerce.android.R
import com.woocommerce.android.e2e.helpers.util.NestedScrollViewExtension
Expand Down Expand Up @@ -43,7 +44,7 @@ class SingleOrderScreen : Screen(R.id.orderStatus_subtitle) {
}

fun assertOrderId(orderId: Int): SingleOrderScreen {
Espresso.onView(withId(R.id.toolbar))
Espresso.onView(Matchers.allOf(withId(R.id.toolbar), withParentIndex(0)))
.check(ViewAssertions.matches(hasDescendant(withText("Order #$orderId"))))
.check(ViewAssertions.matches(isDisplayed()))
return this
Expand Down

0 comments on commit e3a3235

Please sign in to comment.