Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class MoreMenuScreen : Screen(R.id.more_menu_compose_view) {

while (currentAttempt < maxAttempts) {
try {
composeTestRule.onNodeWithContentDescription(getTranslatedString(R.string.settings))
composeTestRule.onNodeWithContentDescription(getTranslatedString(R.string.more_menu_button_settings))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

R.string.settings was not the correct string for the button but it was working since we use the same string for settings and more_menu_button_settings for all languages except for French.

.assertIsDisplayed()
.assertHasClickAction()
break // Exit loop if node is displayed and clickable
Expand All @@ -47,7 +47,7 @@ class MoreMenuScreen : Screen(R.id.more_menu_compose_view) {
}

composeTestRule.onNodeWithContentDescription(
getTranslatedString(R.string.settings)
getTranslatedString(R.string.more_menu_button_settings)
).assertHasClickAction().performClick()

return SettingsScreen()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import com.woocommerce.android.e2e.helpers.util.ProductData
import com.woocommerce.android.e2e.helpers.util.Screen
import org.hamcrest.Matchers

class SingleOrderScreen : Screen(R.id.orderStatus_subtitle) {
class SingleOrderScreen : Screen(R.id.orderDetail_container) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the language is set to Arabic, the test cannot find orderStatus_subtitle. This is likely because we use a different text view for RTL languages. Using orderDetail_container makes sense, as it is also used in goBackToOrdersScreen().

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense, I think the cause that this used to work and not anymore could be linked to the tablet support and how it changed the screen layout.

Another possibility is to use orderRefreshLayout as it's the root layout of the screen, but I think both serve the same purpose here.

fun goBackToOrdersScreen(): OrderListScreen {
if (isElementDisplayed(R.id.orderDetail_container)) {
pressBack()
Expand Down
Loading