File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
WooCommerce/UITestsFoundation/Screens/Products Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -64,11 +64,12 @@ public final class SingleProductScreen: ScreenObject {
6464 }
6565
6666 public func verifyProductTypeScreenLoaded( productType: String ) throws -> Self {
67- let productTypeLabel = NSPredicate ( format: " label ==[c] ' \( productType) \( productType == " external " ? " /Affiliate " : " " ) ' " )
67+ let productTypeLabel = productType + ( productType == " external " ? " /Affiliate " : " " )
68+ let productTypeLabelPredicate = NSPredicate ( format: " label ==[c] ' \( productTypeLabel) ' " )
6869
6970 // the common fields on add product screen
7071 XCTAssertTrue ( app. cells [ " product-review-cell " ] . exists)
71- XCTAssertTrue ( app. staticTexts. containing ( productTypeLabel ) . firstMatch. exists)
72+ XCTAssertTrue ( app. staticTexts. containing ( productTypeLabelPredicate ) . firstMatch. exists)
7273
7374 // different product types display different fields on add product screen
7475 // this is to validate that the correct screens are displayed
You can’t perform that action at this time.
0 commit comments