Skip to content

Commit

Permalink
Merge branch 'trunk' into test/macos-15.1.1-ci-upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
spencertransier committed Jan 9, 2025
2 parents 5ce0fe2 + 93a514a commit 5738b42
Show file tree
Hide file tree
Showing 490 changed files with 18,603 additions and 5,247 deletions.
4 changes: 4 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ steps:
- label: ":microscope: UI Tests (iPhone)"
command: .buildkite/commands/run-ui-tests.sh UITests 'iPhone 16'
depends_on: build
# Only run on `trunk` and `release/*` -- See p91TBi-cBM-p2#comment-13736
if: build.branch == 'trunk' || build.branch =~ /^release\//
plugins: [$CI_TOOLKIT]
artifact_paths:
- fastlane/test_output/*
Expand All @@ -104,6 +106,8 @@ steps:
- label: ":microscope: UI Tests (iPad)"
command: .buildkite/commands/run-ui-tests.sh UITests "iPad (10th generation)"
depends_on: build
# Only run on `trunk` and `release/*` -- See p91TBi-cBM-p2#comment-13736
if: build.branch == 'trunk' || build.branch =~ /^release\//
plugins: [$CI_TOOLKIT]
artifact_paths:
- fastlane/test_output/*
Expand Down
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Closes: #
<!-- Id number of the GitHub issue this PR addresses. -->
<!-- Part of: # -> use this if your PR is one of many related to one issue -->

## Description
<!-- Take the time to write a good summary. Why is it needed? What does it do? When fixing bugs try to avoid just writing “See original issue” – clarify what the problem was and how you’ve fixed it. -->
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/screenshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ jobs:

steps:
- name: "Check out Project"
uses: actions/checkout@v1
uses: actions/checkout@v4
- name: "Set up Ruby"
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Restore CocoaPods Dependency Cache
id: restore-cocoapods-dependency-cache
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
Expand All @@ -37,13 +37,13 @@ jobs:
run: bundle exec fastlane build_screenshots

- name: Archive App
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: screenshot-app
path: fastlane/DerivedData/Build/Products/Debug-iphonesimulator/WooCommerce.app

- name: Archive Runner
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: screenshot-runner
path: fastlane/DerivedData/Build/Products/Debug-iphonesimulator/WooCommerceScreenshots-Runner.app
Expand All @@ -58,7 +58,7 @@ jobs:
language: [ar, de-DE, en-US, es-ES, fr-FR, he, id, it, ja, ko, nl-NL, pt-BR, ru, sv, tr, zh-Hans, zh-Hant]
mode: [dark, light]
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: "Set up Ruby"
uses: ruby/setup-ruby@v1
with:
Expand All @@ -68,13 +68,13 @@ jobs:
run: bundle exec fastlane run configure_apply

- name: Download Screenshot App
uses: actions/download-artifact@v1
uses: actions/download-artifact@v4
with:
name: screenshot-app
path: fastlane/DerivedData/Build/Products/Debug-iphonesimulator/WooCommerce.app

- name: Download Screenshot Runner
uses: actions/download-artifact@v1
uses: actions/download-artifact@v4
with:
name: screenshot-runner
path: fastlane/DerivedData/Build/Products/Debug-iphonesimulator/WooCommerceScreenshots-Runner.app
Expand All @@ -85,7 +85,7 @@ jobs:
- name: Store Logs
if: always()
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: "screenshot-log-${{ matrix.language }}-${{ matrix.mode }}"
path: fastlane/logs
Expand All @@ -101,7 +101,7 @@ jobs:
runs-on: macos-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4

- name: Install Native Dependencies
run: |
Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:
aws s3 cp fastlane/screenshots/screenshots.html s3://$S3_BUCKET/$GITHUB_RUN_ID/screenshots/screenshots.html
- name: Archive Raw Screenshots
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: raw-screenshots
path: fastlane/screenshots
Expand Down Expand Up @@ -159,7 +159,7 @@ jobs:
bundle exec fastlane create_promo_screenshots force:true
- name: Archive Promo Screenshots
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: promo-screenshots
path: fastlane/promo_screenshots
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<!--
Contains editorialized release notes. Raw release notes should go into `RELEASE-NOTES.txt`.
-->
## 21.3

This update brings enhanced reliability and clarity to your WooCommerce experience! Enjoy improved Jetpack setup, smoother media handling, and better product and payment workflows. We’ve also optimized storage and addressed key UI issues to elevate performance. Plus, Tap to Pay onboarding now guides you with ease!

## 21.2
In just two weeks, we've jam-packed this release. There's GTIN global product identifier support, and you can edit the call-to-action in Blaze campaigns.

Expand Down
14 changes: 10 additions & 4 deletions Experiments/Experiments/DefaultFeatureFlagService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,20 @@ public struct DefaultFeatureFlagService: FeatureFlagService {
return buildConfig == .localDeveloper || buildConfig == .alpha
case .productGlobalUniqueIdentifierSupport:
return true
case .paymentsOnboardingInPointOfSale:
return true
case .sendReceiptAfterPayment:
return false
return true
case .sendReceiptsForPointOfSale:
return true
case .acceptCashForPointOfSale:
return false
case .tapToPayEducation:
return false
return true
case .variableProductsInPointOfSale:
return buildConfig == .localDeveloper || buildConfig == .alpha
case .hideSitesInStorePicker:
return true
case .filterHistoryOnOrderAndProductLists:
return buildConfig == .localDeveloper || buildConfig == .alpha
default:
return true
}
Expand Down
20 changes: 16 additions & 4 deletions Experiments/Experiments/FeatureFlag.swift
Original file line number Diff line number Diff line change
Expand Up @@ -193,18 +193,30 @@ public enum FeatureFlag: Int {
///
case productGlobalUniqueIdentifierSupport

/// Supports Woo Payments onboarding in POS so that merchants who have not completed onboarding can access POS.
///
case paymentsOnboardingInPointOfSale

/// Enables sending receipt after the payment via the API
case sendReceiptAfterPayment

/// Adds support for sending receipts after the payment for POS
///
case sendReceiptsForPointOfSale

/// Adds support for accepting cash as payment for POS
///
case acceptCashForPointOfSale

/// Enables new Tap to Pay onboarding and education features
///
case tapToPayEducation

/// Supports variable products in POS.
///
case variableProductsInPointOfSale

/// Supports hiding sites from the store picker
///
case hideSitesInStorePicker

/// Supports managing filer history on order and product lists
///
case filterHistoryOnOrderAndProductLists
}
7 changes: 7 additions & 0 deletions Fakes/Fakes/Fake.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,10 @@ extension NSRange {
.init()
}
}

extension UUID {
/// Returns a default UUID
static func fake() -> Self {
.init()
}
}
34 changes: 33 additions & 1 deletion Fakes/Fakes/Networking.generated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2761,6 +2761,16 @@ extension Networking.WooShippingAccountSettings {
)
}
}
extension Networking.WooShippingCarrierPredefinedOptions {
/// Returns a "ready to use" type filled with fake values.
///
public static func fake() -> Networking.WooShippingCarrierPredefinedOptions {
.init(
carrierID: .fake(),
predefinedOptions: .fake()
)
}
}
extension Networking.WooShippingCreatePackageResponse {
/// Returns a "ready to use" type filled with fake values.
///
Expand All @@ -2784,6 +2794,28 @@ extension Networking.WooShippingCustomPackage {
)
}
}
extension Networking.WooShippingOriginAddress {
/// Returns a "ready to use" type filled with fake values.
///
public static func fake() -> Networking.WooShippingOriginAddress {
.init(
id: .fake(),
company: .fake(),
address1: .fake(),
address2: .fake(),
city: .fake(),
state: .fake(),
postcode: .fake(),
country: .fake(),
phone: .fake(),
firstName: .fake(),
lastName: .fake(),
email: .fake(),
defaultAddress: .fake(),
isVerified: .fake()
)
}
}
extension Networking.WooShippingPackagePurchase {
/// Returns a "ready to use" type filled with fake values.
///
Expand All @@ -2801,7 +2833,7 @@ extension Networking.WooShippingPackagesResponse {
///
public static func fake() -> Networking.WooShippingPackagesResponse {
.init(
storeOptions: .fake(),
siteID: .fake(),
customPackages: .fake(),
savedPredefinedPackages: .fake(),
allPredefinedOptions: .fake()
Expand Down
16 changes: 16 additions & 0 deletions Fakes/Fakes/Yosemite.generated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,22 @@ extension Yosemite.JustInTimeMessageTemplate {
.banner
}
}
extension Yosemite.POSSimpleProduct {
/// Returns a "ready to use" type filled with fake values.
///
public static func fake() -> Yosemite.POSSimpleProduct {
.init(
id: .fake(),
name: .fake(),
formattedPrice: .fake(),
productImageSource: .fake(),
productID: .fake(),
price: .fake(),
productType: .fake(),
bundledItems: .fake()
)
}
}
extension Yosemite.ProductReviewFromNoteParcel {
/// Returns a "ready to use" type filled with fake values.
///
Expand Down
3 changes: 3 additions & 0 deletions Hardware/Hardware/CardReader/CardReaderService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ public protocol CardReaderService {
/// The Publisher that emits software update state changes
var softwareUpdateEvents: AnyPublisher<CardReaderSoftwareUpdateState, Never> { get }

/// The Publisher that emits when TTP Terms and Services are accepted
var builtInCardReaderAcceptToSEvents: AnyPublisher<Void, Never> { get }

// MARK: - Commands

/// Checks for support of a given reader type and discovery method combination. Does not start discovery.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ public struct NoOpCardReaderService: CardReaderService {
public var softwareUpdateEvents: AnyPublisher<CardReaderSoftwareUpdateState, Never>
= CurrentValueSubject<CardReaderSoftwareUpdateState, Never>(.none).eraseToAnyPublisher()

/// The Publisher that emits the when when TTP Terms and Services are accepted
public var builtInCardReaderAcceptToSEvents: AnyPublisher<Void, Never>
= PassthroughSubject<Void, Never>().eraseToAnyPublisher()

public init() {}
// MARK: - Commands

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ public final class StripeCardReaderService: NSObject {
private let discoveryStatusSubject = CurrentValueSubject<CardReaderServiceDiscoveryStatus, Never>(.idle)
private let readerEventsSubject = PassthroughSubject<CardReaderEvent, Never>()
private let softwareUpdateSubject = CurrentValueSubject<CardReaderSoftwareUpdateState, Never>(.none)
private let builtInCardReaderAcceptToSSubject = PassthroughSubject<Void, Never>()

private var connectionAttemptInvalidated: Bool = false

/// Volatile, in-memory cache of discovered readers. It has to be cleared after we connect to a reader
Expand Down Expand Up @@ -62,6 +64,10 @@ extension StripeCardReaderService: CardReaderService {
softwareUpdateSubject.eraseToAnyPublisher()
}

public var builtInCardReaderAcceptToSEvents: AnyPublisher<Void, Never> {
builtInCardReaderAcceptToSSubject.eraseToAnyPublisher()
}

// MARK: - CardReaderService conformance. Commands

public func checkSupport(for cardReaderType: CardReaderType,
Expand Down Expand Up @@ -989,6 +995,10 @@ extension StripeCardReaderService: LocalMobileReaderDelegate {
softwareUpdateSubject.send(.none)
}
}

public func localMobileReaderDidAcceptTermsOfService(_ reader: Reader) {
builtInCardReaderAcceptToSSubject.send(())
}
}

// MARK: - Terminal delegate
Expand Down
Loading

0 comments on commit 5738b42

Please sign in to comment.