Skip to content

Commit e03bd88

Browse files
committed
runs UI POS screenhot tests on iPads only
1 parent bbd2d49 commit e03bd88

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

WooCommerce/WooCommerceScreenshots/WooCommerceScreenshots.swift

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -74,25 +74,27 @@ class WooCommerceScreenshots: XCTestCase {
7474
.goBackToOrderScreen()
7575
.goBackToOrdersScreen()
7676

77-
// POS
78-
try TabNavComponent()
79-
.goToPOSScreen()
80-
.tapAddProduct(productID: 1)
81-
.tapAddProduct(productID: 2)
82-
.thenTakeScreenshot(named: "pos-dashboard", orientation: .landscapeLeft)
83-
.tapConnectReader()
84-
.waitForReaderConnected()
85-
.tapCheckout()
86-
.waitForTotalsLoaded()
87-
.waitForCardPaymentReady()
88-
.thenTakeScreenshot(named: "pos-payment", orientation: .landscapeLeft)
89-
.tapCashPayment()
90-
.tapMarkPaymentComplete()
91-
.waitForPaymentSuccess()
92-
.thenTakeScreenshot(named: "pos-success", orientation: .landscapeLeft)
93-
.tapMenuButton()
94-
.tapExitMenuItem()
95-
.confirmExitPOS()
77+
// POS - iPad only
78+
if UIDevice.current.userInterfaceIdiom == .pad {
79+
try TabNavComponent()
80+
.goToPOSScreen()
81+
.tapAddProduct(productID: 1)
82+
.tapAddProduct(productID: 2)
83+
.thenTakeScreenshot(named: "pos-dashboard", orientation: .landscapeLeft)
84+
.tapConnectReader()
85+
.waitForReaderConnected()
86+
.tapCheckout()
87+
.waitForTotalsLoaded()
88+
.waitForCardPaymentReady()
89+
.thenTakeScreenshot(named: "pos-payment", orientation: .landscapeLeft)
90+
.tapCashPayment()
91+
.tapMarkPaymentComplete()
92+
.waitForPaymentSuccess()
93+
.thenTakeScreenshot(named: "pos-success", orientation: .landscapeLeft)
94+
.tapMenuButton()
95+
.tapExitMenuItem()
96+
.confirmExitPOS()
97+
}
9698

9799
// Products
98100
try TabNavComponent()

0 commit comments

Comments
 (0)