Skip to content

Commit 3981b01

Browse files
committed
Merge branch 'trunk' into fix/7639-swipe-to-switch-time-range-tab
* trunk: (26 commits) Remove reference to removed IOS_VERSION variable Remove ios_version parameter from test_without_building lane Update test for loadAndsyncSite when forcedUpdate Restore and fix Unit Test for syncSites when JCP Removed WordPressComSiteInfo+Woo extension Update description comment Encapsulate universal links tracking events into WooAnalyticsEvent instances. 7655 Rename PluginWebView to AuthenticatedWebView Fix an issue where UI tests for iPad isn't running on iPad Add woo logo to widgets target Adds Basic UI for non conected store Update Widgets text to render correctly on dark mode Rename WordPressComSiteInfoWooTests Pass string instead of URL to avoid crashing Tracks 7633 Add Payment Gateway fetch fix to release notes 7633 Refresh PaymentGateway on Payment Menu open Remove jetpackConnectionPackageSupport flag Remove JCP from MockFeatureFlagService Remove tests JCP flag being false Make AccountStoreTest compile ...
2 parents 28f2c34 + 873549a commit 3981b01

File tree

43 files changed

+709
-664
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+709
-664
lines changed

.buildkite/commands/run-ui-tests.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22

33
TEST_NAME=$1
44
DEVICE=$2
5-
IOS_VERSION=$3
65

7-
echo "Running $TEST_NAME on $DEVICE for iOS $IOS_VERSION"
6+
echo "Running $TEST_NAME on $DEVICE"
87

98
# Run this at the start to fail early if value not available
109
echo '--- :test-analytics: Configuring Test Analytics'
@@ -36,7 +35,7 @@ echo "--- 🧪 Testing"
3635
xcrun simctl list >> /dev/null
3736
rake mocks &
3837
set +e
39-
bundle exec fastlane test_without_building name:"$TEST_NAME" device:"$DEVICE" ios_version:"$IOS_VERSION"
38+
bundle exec fastlane test_without_building name:"$TEST_NAME" device:"$DEVICE"
4039
TESTS_EXIT_STATUS=$?
4140
set -e
4241

.buildkite/pipeline.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ steps:
6868
# UI Tests
6969
#################
7070
- label: "🔬 UI Tests (iPhone)"
71-
command: .buildkite/commands/run-ui-tests.sh UITests 'iPhone 11' 15.0
71+
command: .buildkite/commands/run-ui-tests.sh UITests 'iPhone 11'
7272
depends_on: "build"
7373
env: *common_env
7474
plugins: *common_plugins
@@ -79,7 +79,7 @@ steps:
7979
context: "UI Tests (iPhone)"
8080

8181
- label: "🔬 UI Tests (iPad)"
82-
command: .buildkite/commands/run-ui-tests.sh UITests "iPad Air (4th generation)" 15.0
82+
command: .buildkite/commands/run-ui-tests.sh UITests "iPad Air (5th generation)"
8383
depends_on: "build"
8484
env: *common_env
8585
plugins: *common_plugins

Experiments/Experiments/DefaultFeatureFlagService.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ public struct DefaultFeatureFlagService: FeatureFlagService {
77
switch featureFlag {
88
case .barcodeScanner:
99
return buildConfig == .localDeveloper || buildConfig == .alpha
10-
case .jetpackConnectionPackageSupport:
11-
return true
1210
case .couponView:
1311
return true
1412
case .productSKUInputScanner:

Experiments/Experiments/FeatureFlag.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ public enum FeatureFlag: Int {
1414
///
1515
case reviews
1616

17-
/// Allows sites with plugins that include Jetpack Connection Package and without Jetpack-the-plugin to connect to the app
18-
///
19-
case jetpackConnectionPackageSupport
20-
2117
/// Displays the option to view coupons
2218
///
2319
case couponView

RELEASE-NOTES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
-----
55
- [*] Dashboard: the last selected time range tab (Today/This Week/This Month/This Year) is persisted for the site and shown on the next site launch (app launch or switching stores). [https://github.com/woocommerce/woocommerce-ios/pull/7638]
66
- [*] Dashboard: swiping to another time range tab now triggers syncing for the target tab. Previously, the stats on the target tab aren't synced from the swipe gesture. [https://github.com/woocommerce/woocommerce-ios/pull/7650]
7+
- [*] In-Person Payments: Fixed an issue where the Pay in Person toggle could be out of sync with the setting on the website. [https://github.com/woocommerce/woocommerce-ios/pull/7656]
78

89
10.2
910
-----

WooCommerce/Classes/Analytics/WooAnalyticsEvent.swift

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1574,3 +1574,20 @@ extension WooAnalyticsEvent {
15741574
}
15751575
}
15761576
}
1577+
1578+
// MARK: - Universal Links
1579+
//
1580+
extension WooAnalyticsEvent {
1581+
enum Key: String {
1582+
case path = "path"
1583+
case url = "url"
1584+
}
1585+
1586+
static func universalLinkOpened(with path: String) -> WooAnalyticsEvent {
1587+
WooAnalyticsEvent(statName: .universalLinkOpened, properties: [Key.path.rawValue: path])
1588+
}
1589+
1590+
static func universalLinkFailed(with url: URL) -> WooAnalyticsEvent {
1591+
WooAnalyticsEvent(statName: .universalLinkFailed, properties: [Key.url.rawValue: url.absoluteString])
1592+
}
1593+
}

WooCommerce/Classes/Analytics/WooAnalyticsStat.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,10 @@ public enum WooAnalyticsStat: String {
676676

677677
// MARK: Payments Menu
678678
case pluginsNotSyncedYet = "plugins_not_synced_yet"
679+
680+
// MARK: Universal Links
681+
case universalLinkOpened = "universal_link_opened"
682+
case universalLinkFailed = "universal_link_failed"
679683
}
680684

681685
public extension WooAnalyticsStat {

WooCommerce/Classes/Authentication/Navigation Exceptions/PluginSetupWebViewController.swift renamed to WooCommerce/Classes/Authentication/AuthenticatedWebViewController.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import Combine
22
import UIKit
33
import WebKit
44

5-
/// The web view to handle plugin setup in the login flow.
5+
/// A web view which is authenticated for WordPress.com, when possible.
66
///
7-
final class PluginSetupWebViewController: UIViewController {
7+
final class AuthenticatedWebViewController: UIViewController {
88

9-
private let viewModel: PluginSetupWebViewModel
9+
private let viewModel: AuthenticatedWebViewModel
1010

1111
/// Main web view
1212
private lazy var webView: WKWebView = {
@@ -26,7 +26,7 @@ final class PluginSetupWebViewController: UIViewController {
2626
/// Strong reference for the subscription to update progress bar
2727
private var subscriptions: Set<AnyCancellable> = []
2828

29-
init(viewModel: PluginSetupWebViewModel) {
29+
init(viewModel: AuthenticatedWebViewModel) {
3030
self.viewModel = viewModel
3131
super.init(nibName: nil, bundle: nil)
3232
}
@@ -51,7 +51,7 @@ final class PluginSetupWebViewController: UIViewController {
5151
}
5252
}
5353

54-
private extension PluginSetupWebViewController {
54+
private extension AuthenticatedWebViewController {
5555
func configureNavigationBar() {
5656
title = viewModel.title
5757
}
@@ -104,7 +104,7 @@ private extension PluginSetupWebViewController {
104104
}
105105
}
106106

107-
extension PluginSetupWebViewController: WKNavigationDelegate {
107+
extension AuthenticatedWebViewController: WKNavigationDelegate {
108108
func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction) async -> WKNavigationActionPolicy {
109109
guard let navigationURL = navigationAction.request.url else {
110110
return .allow

WooCommerce/Classes/Authentication/Navigation Exceptions/PluginSetupWebViewModel.swift renamed to WooCommerce/Classes/Authentication/AuthenticatedWebViewModel.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import Foundation
22
import WebKit
33

44
/// Abstracts different configurations and logic for web view controllers
5-
/// used for setting up plugins during the login flow
6-
protocol PluginSetupWebViewModel {
5+
/// which are authenticated for WordPress.com, where possible
6+
protocol AuthenticatedWebViewModel {
77
/// Title for the view
88
var title: String { get }
99

WooCommerce/Classes/Authentication/AuthenticationManager.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ extension AuthenticationManager: WordPressAuthenticatorDelegate {
318318
func troubleshootSite(_ siteInfo: WordPressComSiteInfo?, in navigationController: UINavigationController?) {
319319
ServiceLocator.analytics.track(event: .SitePicker.siteDiscovery(hasWordPress: siteInfo?.isWP ?? false,
320320
isWPCom: siteInfo?.isWPCom ?? false,
321-
hasValidJetpack: siteInfo?.hasValidJetpack ?? false))
321+
hasValidJetpack: siteInfo?.isJetpackConnected ?? false))
322322

323323
guard let site = siteInfo, let navigationController = navigationController else {
324324
navigationController?.show(noWPUI, sender: nil)
@@ -533,7 +533,7 @@ private extension AuthenticationManager {
533533
private extension AuthenticationManager {
534534
func isJetpackInvalidForSelfHostedSite(url: String) -> Bool {
535535
if let site = currentSelfHostedSite,
536-
site.url == url, !site.hasValidJetpack {
536+
site.url == url, !site.isJetpackConnected {
537537
return true
538538
}
539539
return false
@@ -656,7 +656,7 @@ private extension AuthenticationManager {
656656
}
657657

658658
/// Jetpack is required. Present an error if we don't detect a valid installation.
659-
guard site.hasValidJetpack == true else {
659+
guard site.isJetpackConnected == true else {
660660
return jetpackErrorUI(for: site.url, with: matcher, in: navigationController)
661661
}
662662

0 commit comments

Comments
 (0)