diff --git a/WooCommerce/Classes/POS/Presentation/Barcode Scanner Setup/PointOfSaleBarcodeScannerSetupModels.swift b/WooCommerce/Classes/POS/Presentation/Barcode Scanner Setup/PointOfSaleBarcodeScannerSetupModels.swift index 5e1c83bf8bb..0f629806c81 100644 --- a/WooCommerce/Classes/POS/Presentation/Barcode Scanner Setup/PointOfSaleBarcodeScannerSetupModels.swift +++ b/WooCommerce/Classes/POS/Presentation/Barcode Scanner Setup/PointOfSaleBarcodeScannerSetupModels.swift @@ -29,11 +29,11 @@ enum PointOfSaleBarcodeScannerType { var analyticsName: String { switch self { case .starBSH20B: - return "Star_BSH_20B" + return "star_bsh_20b" case .tera12002D: - return "Tera_1200_2D" + return "tera_1200_2d" case .netum1228BC: - return "Netum_1228BC" + return "netum_1228bc" case .other: return "other" } diff --git a/WooCommerce/Classes/POS/Presentation/Barcode Scanner Setup/PointOfSaleBarcodeScannerSetupStepViews.swift b/WooCommerce/Classes/POS/Presentation/Barcode Scanner Setup/PointOfSaleBarcodeScannerSetupStepViews.swift index ba8d425ee79..e3362d9dd3c 100644 --- a/WooCommerce/Classes/POS/Presentation/Barcode Scanner Setup/PointOfSaleBarcodeScannerSetupStepViews.swift +++ b/WooCommerce/Classes/POS/Presentation/Barcode Scanner Setup/PointOfSaleBarcodeScannerSetupStepViews.swift @@ -196,9 +196,9 @@ private extension PointOfSaleBarcodeScannerSetupCompleteView { comment: "Title shown when scanner setup is successfully completed" ) static let instruction = NSLocalizedString( - "pos.barcodeScannerSetup.complete.instruction", - value: "You are ready to start scanning products. \nRead more about barcode and QR code scanner support.", - comment: "Message shown when scanner setup is complete, with additional information link" + "pos.barcodeScannerSetup.complete.instruction.2", + value: "You are ready to start scanning products. Next time you need to connect your scanner, just turn it on and it will reconnect automatically.", + comment: "Message shown when scanner setup is complete" ) } } diff --git a/WooCommerce/Classes/POS/Presentation/POSFloatingControlView.swift b/WooCommerce/Classes/POS/Presentation/POSFloatingControlView.swift index 79fa802323a..707fd930ab9 100644 --- a/WooCommerce/Classes/POS/Presentation/POSFloatingControlView.swift +++ b/WooCommerce/Classes/POS/Presentation/POSFloatingControlView.swift @@ -63,7 +63,13 @@ struct POSFloatingControlView: View { ServiceLocator.analytics.track(.pointOfSaleBarcodeScanningMenuItemTapped) } label: { Label( - title: { Text(Localization.barcodeScanning) }, + title: { + if ServiceLocator.featureFlagService.isFeatureFlagEnabled(.pointOfSaleBarcodeScanningi2) { + Text(Localization.barcodeScanningSetup) + } else { + Text(Localization.barcodeScanning) + } + }, icon: { Image(systemName: "barcode.viewfinder") }) } } @@ -173,6 +179,12 @@ private extension POSFloatingControlView { value: "Barcode scanning", comment: "The title of the menu button to view barcode scanner documentation, shown in a popover menu." ) + + static let barcodeScanningSetup = NSLocalizedString( + "pointOfSale.floatingButtons.barcodeScanningSetup.button.title", + value: "Initial barcode scanner setup", + comment: "The title of the menu button to start a barcode scanner setup flow." + ) } } diff --git a/WooCommerce/WooCommerceTests/POS/Presentation/Barcode Scanner Setup/PointOfSaleBarcodeScannerSetupFlowManagerTests.swift b/WooCommerce/WooCommerceTests/POS/Presentation/Barcode Scanner Setup/PointOfSaleBarcodeScannerSetupFlowManagerTests.swift index 906ca8138af..37198f00f01 100644 --- a/WooCommerce/WooCommerceTests/POS/Presentation/Barcode Scanner Setup/PointOfSaleBarcodeScannerSetupFlowManagerTests.swift +++ b/WooCommerce/WooCommerceTests/POS/Presentation/Barcode Scanner Setup/PointOfSaleBarcodeScannerSetupFlowManagerTests.swift @@ -20,7 +20,7 @@ struct PointOfSaleBarcodeScannerSetupFlowManagerTests { // Then it tracks the scanner selected event let event = mockAnalytics.events.first #expect(event?.eventName == WooAnalyticsStat.pointOfSaleBarcodeScannerSetupScannerSelected.rawValue) - #expect(event?.properties["scanner"] as? String == "Star_BSH_20B") + #expect(event?.properties["scanner"] as? String == PointOfSaleBarcodeScannerType.starBSH20B.analyticsName) } @available(iOS 17.0, *) @@ -42,7 +42,7 @@ struct PointOfSaleBarcodeScannerSetupFlowManagerTests { // Then it tracks the dismissal event let event = mockAnalytics.events.first #expect(event?.eventName == WooAnalyticsStat.pointOfSaleBarcodeScannerSetupDismissed.rawValue) - #expect(event?.properties["scanner"] as? String == "Star_BSH_20B") + #expect(event?.properties["scanner"] as? String == PointOfSaleBarcodeScannerType.starBSH20B.analyticsName) #expect(event?.properties["step"] as? String == "setup_barcode_hid") } @@ -84,7 +84,7 @@ struct PointOfSaleBarcodeScannerSetupFlowManagerTests { // Then it tracks the scanner connected event let event = mockAnalytics.events.first #expect(event?.eventName == WooAnalyticsStat.pointOfSaleBarcodeScannerSetupScannerConnected.rawValue) - #expect(event?.properties["scanner"] as? String == "Netum_1228BC") + #expect(event?.properties["scanner"] as? String == PointOfSaleBarcodeScannerType.netum1228BC.analyticsName) } @available(iOS 17.0, *)