Skip to content

Commit cf12627

Browse files
committed
Update release notes and add move SKU format string to a private extension of a test class based on CR suggestions.
1 parent a9f7508 commit cf12627

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

RELEASE-NOTES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
10.6
44
-----
55

6+
- [**] Products tab: products search now has an option to search products by SKU. Stores with WC version 6.6+ support partial SKU search, otherwise the product(s) with the exact SKU match is returned. [https://github.com/woocommerce/woocommerce-ios/pull/7781]
67
- [*] Fixed a rare crash when selecting a store in the store picker. [https://github.com/woocommerce/woocommerce-ios/pull/7765]
78
- [*] Help center: Added help center web page with FAQs for "Not a WooCommerce site" and "Wrong WordPress.com account" error screens. [https://github.com/woocommerce/woocommerce-ios/pull/7767, https://github.com/woocommerce/woocommerce-ios/pull/7769]
8-
- [*] Products tab: products search now has an option to search products by SKU. Stores with WC version 6.6+ support partial SKU search, otherwise the product(s) with the exact SKU match is returned. [https://github.com/woocommerce/woocommerce-ios/pull/7781]
99

1010
10.5
1111
-----

WooCommerce/WooCommerceTests/ViewRelated/Products/ProductsTabProductViewModelTests.swift

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,7 @@ final class ProductsTabProductViewModelTests: XCTestCase {
103103
let detailsText = viewModel.detailsAttributedString.string
104104

105105
// Then
106-
let skuFormat = NSLocalizedString("SKU: %1$@", comment: "Label about the SKU of a product in the product list. Reads, `SKU: productSku`")
107-
let expectedSKU = String.localizedStringWithFormat(skuFormat, sku)
106+
let expectedSKU = String.localizedStringWithFormat(Localization.skuFormat, sku)
108107
XCTAssertTrue(detailsText.contains(expectedSKU))
109108
}
110109

@@ -118,8 +117,7 @@ final class ProductsTabProductViewModelTests: XCTestCase {
118117
let detailsText = viewModel.detailsAttributedString.string
119118

120119
// Then
121-
let skuFormat = NSLocalizedString("SKU: %1$@", comment: "Label about the SKU of a product in the product list. Reads, `SKU: productSku`")
122-
let skuText = String.localizedStringWithFormat(skuFormat, sku)
120+
let skuText = String.localizedStringWithFormat(Localization.skuFormat, sku)
123121
XCTAssertFalse(detailsText.contains(skuText))
124122
}
125123
}
@@ -138,3 +136,9 @@ extension ProductsTabProductViewModelTests {
138136
variations: variations)
139137
}
140138
}
139+
140+
private extension ProductsTabProductViewModelTests {
141+
enum Localization {
142+
static let skuFormat = NSLocalizedString("SKU: %1$@", comment: "Label about the SKU of a product in the product list. Reads, `SKU: productSku`")
143+
}
144+
}

0 commit comments

Comments
 (0)