Skip to content

Commit 27a1d7c

Browse files
committed
use accessibilityId instead of staticTexts
1 parent a74f8f0 commit 27a1d7c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

WooCommerce/UITestsFoundation/Screens/MyStore/MyStoreScreen.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,22 @@ public final class MyStoreScreen: ScreenObject {
2828
return self
2929
}
3030

31-
func tapTimeframeTab(timeframe: String) -> MyStoreScreen {
32-
app.cells.staticTexts[timeframe].tap()
31+
func tapTimeframeTab(timeframeId: String) -> MyStoreScreen {
32+
app.cells[timeframeId].tap()
3333

3434
return self
3535
}
3636

3737
public func goToThisWeekTab() -> MyStoreScreen {
38-
return tapTimeframeTab(timeframe: "This Week")
38+
return tapTimeframeTab(timeframeId: "period-data-thisWeek-tab")
3939
}
4040

4141
public func goToThisMonthTab() -> MyStoreScreen {
42-
return tapTimeframeTab(timeframe: "This Month")
42+
return tapTimeframeTab(timeframeId: "period-data-thisMonth-tab")
4343
}
4444

4545
public func goToThisYearTab() -> MyStoreScreen {
46-
return tapTimeframeTab(timeframe: "This Year")
46+
return tapTimeframeTab(timeframeId: "period-data-thisYear-tab")
4747
}
4848

4949
func verifyStatsForTimeframeLoaded(timeframe: String) -> MyStoreScreen {

0 commit comments

Comments
 (0)