-
Notifications
You must be signed in to change notification settings - Fork 997
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Link]
PayWithLinkButton
corner radius fixes (#1438)
* Make Link button match corner radius behavior of PKPaymentButton * Cleanup * Fix typo * Add test * Rename test * Cleanup * Cleanup * Add test * Cleanup * Make corners continuous when possible
- Loading branch information
1 parent
fcf45a0
commit 23a6ba8
Showing
21 changed files
with
91 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+79 Bytes
(100%)
...64/PaymentSheetUITest.PaymentSheetSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+141 Bytes
(100%)
...ntSheetUITest.PaymentSheetSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+194 Bytes
(100%)
...enceImages_64/StripeiOS_Tests.PayWithLinkButtonSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+242 Bytes
(100%)
...4/StripeiOS_Tests.PayWithLinkButtonSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+8.96 KB
...es_64/StripeiOS_Tests.PayWithLinkButtonSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+185 Bytes
(100%)
...nceImages_64/StripeiOS_Tests.PayWithLinkButtonSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+220 Bytes
(100%)
...eImages_64/StripeiOS_Tests.PayWithLinkButtonSnapshotTests/[email protected]
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.
Binary file added
BIN
+17.1 KB
...64/StripeiOS_Tests.PayWithLinkButtonSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+13.8 KB
..._64/StripeiOS_Tests.PayWithLinkButtonSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+206 Bytes
(100%)
...ceImages_64/StripeiOS_Tests.WalletHeaderViewSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+194 Bytes
(100%)
...4/StripeiOS_Tests.WalletHeaderViewSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+25.4 KB
..._64/StripeiOS_Tests.WalletHeaderViewSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+197 Bytes
(100%)
...ipeiOS_Tests.WalletHeaderViewSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+195 Bytes
(100%)
..._Tests.WalletHeaderViewSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+195 Bytes
(100%)
...ceImages_64/StripeiOS_Tests.WalletHeaderViewSnapshotTests/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,20 +14,30 @@ import StripeCoreTestUtils | |
|
||
class PayWithLinkButtonSnapshotTests: FBSnapshotTestCase { | ||
|
||
private let emailAddress = "[email protected]" | ||
private let longEmailAddress = "[email protected]" | ||
|
||
override func setUp() { | ||
super.setUp() | ||
// recordMode = true | ||
} | ||
|
||
func testDefault() { | ||
let sut = makeSUT() | ||
sut.linkAccount = makeAccountStub(email: "[email protected]", isRegistered: false) | ||
sut.linkAccount = makeAccountStub(email: emailAddress, isRegistered: false) | ||
verify(sut) | ||
|
||
sut.isHighlighted = true | ||
verify(sut, identifier: "Highlighted") | ||
} | ||
|
||
func testDefault_rounded() { | ||
let sut = makeSUT() | ||
sut.cornerRadius = 16 | ||
sut.linkAccount = makeAccountStub(email: emailAddress, isRegistered: false) | ||
verify(sut) | ||
} | ||
|
||
func testDisabled() { | ||
let sut = makeSUT() | ||
sut.isEnabled = false | ||
|
@@ -36,13 +46,27 @@ class PayWithLinkButtonSnapshotTests: FBSnapshotTestCase { | |
|
||
func testRegistered() { | ||
let sut = makeSUT() | ||
sut.linkAccount = makeAccountStub(email: "[email protected]", isRegistered: true) | ||
sut.linkAccount = makeAccountStub(email: emailAddress, isRegistered: true) | ||
verify(sut) | ||
} | ||
|
||
func testRegistered_rounded() { | ||
let sut = makeSUT() | ||
sut.cornerRadius = 16 | ||
sut.linkAccount = makeAccountStub(email: emailAddress, isRegistered: true) | ||
verify(sut) | ||
} | ||
|
||
func testRegisteredWithLongEmailAddress() { | ||
func testRegistered_square() { | ||
let sut = makeSUT() | ||
sut.cornerRadius = 0 | ||
sut.linkAccount = makeAccountStub(email: emailAddress, isRegistered: true) | ||
verify(sut) | ||
} | ||
|
||
func testRegistered_withLongEmailAddress() { | ||
let sut = PayWithLinkButton() | ||
sut.linkAccount = makeAccountStub(email: "[email protected]", isRegistered: true) | ||
sut.linkAccount = makeAccountStub(email: longEmailAddress, isRegistered: true) | ||
verify(sut) | ||
} | ||
|
||
|
@@ -79,4 +103,5 @@ private extension PayWithLinkButtonSnapshotTests { | |
func makeSUT() -> PayWithLinkButton { | ||
return PayWithLinkButton() | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters