Skip to content

Commit

Permalink
Remove redundant tests
Browse files Browse the repository at this point in the history
  • Loading branch information
markmur committed Mar 5, 2024
1 parent c795341 commit 6091c01
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 148 deletions.
14 changes: 6 additions & 8 deletions Samples/SwiftUIExample/SwiftUIExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -465,18 +465,17 @@
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = SwiftUIExample/Info.plist;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeRight UIInterfaceOrientationLandscapeLeft";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeRight UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationPortraitUpsideDown";
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.shopify.SwiftUIExample;
PRODUCT_BUNDLE_IDENTIFIER = com.shopify.checkoutKit.SwiftUIExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
Expand All @@ -497,18 +496,17 @@
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = SwiftUIExample/Info.plist;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = UIInterfaceOrientationPortrait;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeRight UIInterfaceOrientationLandscapeLeft";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeRight UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationPortraitUpsideDown";
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.shopify.SwiftUIExample;
PRODUCT_BUNDLE_IDENTIFIER = com.shopify.checkoutKit.SwiftUIExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "1024.png",
"filename" : "1024.jpg",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
Expand Down
16 changes: 8 additions & 8 deletions Samples/SwiftUIExample/SwiftUIExample/CartView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ struct CartView: View {
isShowingCheckout = true
}, label: {
Text("Checkout")
.padding()
.frame(maxWidth: .infinity)
.background(Color.blue)
.foregroundColor(.white)
.cornerRadius(10)
.bold()
})
.accessibilityIdentifier("checkoutButton")
.padding()
.frame(maxWidth: .infinity)
.background(Color.blue)
.foregroundColor(.white)
.cornerRadius(10)
.bold()
.sheet(isPresented: $isShowingCheckout) {
if let url = checkoutURL {
CheckoutSheet(checkout: url)
Expand Down Expand Up @@ -81,12 +81,12 @@ struct CartView: View {
.accessibility(identifier: "CheckoutSheet")
}
}
.padding(.top, 20)
.padding(.top, 15)
.padding(.horizontal, 5)
}

Spacer()
}.padding()
}.padding(10)
} else {
EmptyState()
}
Expand Down
15 changes: 10 additions & 5 deletions Samples/SwiftUIExample/SwiftUIExample/CatalogView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,22 @@ struct CatalogView: View {
if isAddingToCart {
ProgressView()
.progressViewStyle(CircularProgressViewStyle(tint: .white))
.padding()
.frame(maxWidth: 400)
.background(Color.blue)
.foregroundColor(.white)
.cornerRadius(10)
} else {
Text("Add to cart")
.font(.headline)
.padding()
.frame(maxWidth: 400)
.background(Color.blue)
.foregroundColor(.white)
.cornerRadius(10)
}
})
.accessibilityIdentifier("addToCartButton")
.padding()
.frame(maxWidth: 400)
.background(Color.blue)
.foregroundColor(.white)
.cornerRadius(10)
.sheet(isPresented: $isShowingCart) {
NavigationView {
CartView(
Expand Down
14 changes: 2 additions & 12 deletions Samples/SwiftUIExample/SwiftUIExample/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>StorefrontDomain</key>
<string>$(STOREFRONT_DOMAIN)</string>
<key>StorefrontAccessToken</key>
<string>$(STOREFRONT_ACCESS_TOKEN)</string>
<key>StorefrontDomain</key>
<string>$(STOREFRONT_DOMAIN)</string>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
Expand All @@ -25,13 +25,3 @@
</dict>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleURLTypes</key>
<array>
<dict/>
</array>
</dict>
</plist>
53 changes: 0 additions & 53 deletions Samples/SwiftUIExample/SwiftUIExampleTests/AppTests.swift

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions Sources/ShopifyCheckoutSheetKit/CheckoutDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ public protocol CheckoutDelegate: AnyObject {
/// Tells the delegate that the checkout successfully completed, returning a completed event with order details
func checkoutDidComplete(event: CheckoutCompletedEvent)

func checkoutDidPresent()

/// Tells the delegate that the checkout was cancelled by the buyer.
func checkoutDidCancel()

Expand All @@ -50,8 +48,6 @@ extension CheckoutDelegate {
/// No-op by default
}

public func checkoutDidPresent() {}

public func checkoutDidClickLink(url: URL) {
handleUrl(url)
}
Expand Down

0 comments on commit 6091c01

Please sign in to comment.