From e14f888ab7efd7386d71d18643332c24a680680d Mon Sep 17 00:00:00 2001 From: Brandon Titus Date: Fri, 10 Apr 2020 12:32:22 -0600 Subject: [PATCH 01/12] Constraint Quick Actions Max Width --- .../Blog Details/Detail Header/NewBlogDetailHeaderView.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/WordPress/Classes/ViewRelated/Blog/Blog Details/Detail Header/NewBlogDetailHeaderView.swift b/WordPress/Classes/ViewRelated/Blog/Blog Details/Detail Header/NewBlogDetailHeaderView.swift index 114b271481ac..5e4f4ef4db63 100644 --- a/WordPress/Classes/ViewRelated/Blog/Blog Details/Detail Header/NewBlogDetailHeaderView.swift +++ b/WordPress/Classes/ViewRelated/Blog/Blog Details/Detail Header/NewBlogDetailHeaderView.swift @@ -125,9 +125,11 @@ class NewBlogDetailHeaderView: UIView { let edgeConstraints = [ leadingSafeAreaConstraint, - stackView.trailingAnchor.constraint(equalTo: layoutMarginsGuide.trailingAnchor), + stackView.trailingAnchor.constraint(lessThanOrEqualTo: layoutMarginsGuide.trailingAnchor), stackView.leadingAnchor.constraint(greaterThanOrEqualTo: leadingAnchor, constant: Constants.minimumSideSpacing), stackView.topAnchor.constraint(equalTo: topAnchor, constant: Constants.interSectionSpacing), + stackView.centerXAnchor.constraint(equalTo: layoutMarginsGuide.centerXAnchor), + stackView.widthAnchor.constraint(lessThanOrEqualToConstant: 500), buttonsStackView.topAnchor.constraint(equalTo: stackView.bottomAnchor, constant: Constants.interSectionSpacing), buttonsStackView.centerXAnchor.constraint(equalTo: stackView.centerXAnchor), bottomConstraint From 60d37212c05f870273eca16829980bbc14b73462 Mon Sep 17 00:00:00 2001 From: Brandon Titus Date: Mon, 13 Apr 2020 10:59:24 -0600 Subject: [PATCH 02/12] Adjust maximum quick actions width from feedback --- .../Detail Header/NewBlogDetailHeaderView.swift | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Blog/Blog Details/Detail Header/NewBlogDetailHeaderView.swift b/WordPress/Classes/ViewRelated/Blog/Blog Details/Detail Header/NewBlogDetailHeaderView.swift index 5e4f4ef4db63..666907ea2340 100644 --- a/WordPress/Classes/ViewRelated/Blog/Blog Details/Detail Header/NewBlogDetailHeaderView.swift +++ b/WordPress/Classes/ViewRelated/Blog/Blog Details/Detail Header/NewBlogDetailHeaderView.swift @@ -104,12 +104,6 @@ class NewBlogDetailHeaderView: UIView { stackView.setCustomSpacing(Constants.spacingBelowIcon, after: siteIconView) stackView.setCustomSpacing(Constants.spacingBelowTitle, after: titleLabel) - /// Constraints for larger widths with extra padding (iPhone portrait) - let extraPaddingSideConstraints = [ - buttonsStackView.trailingAnchor.constraint(greaterThanOrEqualTo: stackView.trailingAnchor, constant: -Constants.buttonsSidePadding), - buttonsStackView.leadingAnchor.constraint(lessThanOrEqualTo: stackView.leadingAnchor, constant: Constants.buttonsSidePadding) - ] - /// Constraints for constrained widths (iPad portrait) let minimumPaddingSideConstraints = [ buttonsStackView.leadingAnchor.constraint(greaterThanOrEqualTo: stackView.leadingAnchor, constant: 0), @@ -129,13 +123,13 @@ class NewBlogDetailHeaderView: UIView { stackView.leadingAnchor.constraint(greaterThanOrEqualTo: leadingAnchor, constant: Constants.minimumSideSpacing), stackView.topAnchor.constraint(equalTo: topAnchor, constant: Constants.interSectionSpacing), stackView.centerXAnchor.constraint(equalTo: layoutMarginsGuide.centerXAnchor), - stackView.widthAnchor.constraint(lessThanOrEqualToConstant: 500), + buttonsStackView.widthAnchor.constraint(equalToConstant: 320), buttonsStackView.topAnchor.constraint(equalTo: stackView.bottomAnchor, constant: Constants.interSectionSpacing), buttonsStackView.centerXAnchor.constraint(equalTo: stackView.centerXAnchor), bottomConstraint ] - NSLayoutConstraint.activate(extraPaddingSideConstraints + minimumPaddingSideConstraints + edgeConstraints) + NSLayoutConstraint.activate(minimumPaddingSideConstraints + edgeConstraints) } override init(frame: CGRect) { From 550253599f6b6eba8b35955ceaac20f122cf0756 Mon Sep 17 00:00:00 2001 From: Giorgio Ruscigno Date: Mon, 13 Apr 2020 17:36:36 -0500 Subject: [PATCH 03/12] Removed postReblogging feature flag --- .../BuildInformation/FeatureFlag.swift | 5 ---- .../Reader/ReaderDetailViewController.swift | 25 +++--------------- .../Reader/ReaderPostCardCell.swift | 26 +++++-------------- 3 files changed, 10 insertions(+), 46 deletions(-) diff --git a/WordPress/Classes/Utility/BuildInformation/FeatureFlag.swift b/WordPress/Classes/Utility/BuildInformation/FeatureFlag.swift index 5f53330e1b44..b59a6bd67be0 100644 --- a/WordPress/Classes/Utility/BuildInformation/FeatureFlag.swift +++ b/WordPress/Classes/Utility/BuildInformation/FeatureFlag.swift @@ -4,7 +4,6 @@ enum FeatureFlag: Int, CaseIterable { case jetpackDisconnect case debugMenu - case postReblogging case unifiedAuth case quickActions case meMove @@ -23,8 +22,6 @@ enum FeatureFlag: Int, CaseIterable { case .debugMenu: return BuildConfiguration.current ~= [.localDeveloper, .a8cBranchTest] - case .postReblogging: - return true case .unifiedAuth: return BuildConfiguration.current == .localDeveloper case .quickActions: @@ -57,8 +54,6 @@ extension FeatureFlag: OverrideableFlag { return "Jetpack disconnect" case .debugMenu: return "Debug menu" - case .postReblogging: - return "Post Reblogging" case .unifiedAuth: return "Unified Auth" case .quickActions: diff --git a/WordPress/Classes/ViewRelated/Reader/ReaderDetailViewController.swift b/WordPress/Classes/ViewRelated/Reader/ReaderDetailViewController.swift index 08c1f4a06c9d..6fe15f64a1fc 100644 --- a/WordPress/Classes/ViewRelated/Reader/ReaderDetailViewController.swift +++ b/WordPress/Classes/ViewRelated/Reader/ReaderDetailViewController.swift @@ -557,13 +557,6 @@ open class ReaderDetailViewController: UIViewController, UIViewControllerRestora WPStyleGuide.applyReaderCardTagButtonStyle(tagButton) WPStyleGuide.applyReaderCardActionButtonStyle(commentButton) WPStyleGuide.applyReaderCardActionButtonStyle(likeButton) - if !FeatureFlag.postReblogging.enabled { - // this becomes redundant, as saveForLaterButton does not have a label anymore - // and applyReaderActionButtonStyle() is called by applyReaderSaveForLaterButtonStyle - // which in turn is called by configureSaveForLaterButton. Same considerations for - // reblog button - WPStyleGuide.applyReaderCardActionButtonStyle(saveForLaterButton) - } view.backgroundColor = .listBackground @@ -952,9 +945,7 @@ open class ReaderDetailViewController: UIViewController, UIViewControllerRestora likeButton.isEnabled = ReaderHelpers.isLoggedIn() // as by design spec, only display like counts let likeCount = post?.likeCount()?.intValue ?? 0 - let shortTitle = likeCount > 0 ? "\(likeCount)" : "" - - let title = FeatureFlag.postReblogging.enabled ? shortTitle : post?.likeCountForDisplay() + let title = likeCount > 0 ? "\(likeCount)" : "" let selected = post?.isLiked ?? false let likeImage = UIImage(named: "icon-reader-like") @@ -969,9 +960,6 @@ open class ReaderDetailViewController: UIViewController, UIViewControllerRestora /// Uses the configuration in WPStyleGuide for the reblog button fileprivate func configureReblogButton() { - guard FeatureFlag.postReblogging.enabled else { - return - } reblogButton.isHidden = false WPStyleGuide.applyReaderReblogActionButtonStyle(reblogButton, showTitle: false) } @@ -1052,12 +1040,7 @@ open class ReaderDetailViewController: UIViewController, UIViewControllerRestora fileprivate func configureSaveForLaterButton() { WPStyleGuide.applyReaderSaveForLaterButtonStyle(saveForLaterButton) - if FeatureFlag.postReblogging.enabled { - WPStyleGuide.applyReaderSaveForLaterButtonTitles(saveForLaterButton, showTitle: false) - } else { - WPStyleGuide.applyReaderSaveForLaterButtonTitles(saveForLaterButton) - } - + WPStyleGuide.applyReaderSaveForLaterButtonTitles(saveForLaterButton, showTitle: false) saveForLaterButton.isHidden = false saveForLaterButton.isSelected = post?.isSavedForLater ?? false @@ -1563,9 +1546,7 @@ extension ReaderDetailViewController: Accessible { prepareHeaderForVoiceOver() prepareContentForVoiceOver() prepareActionButtonsForVoiceOver() - if FeatureFlag.postReblogging.enabled { - prepareReblogForVoiceOver() - } + prepareReblogForVoiceOver() NotificationCenter.default.addObserver(self, selector: #selector(setBarsAsVisibleIfVoiceOverIsEnabled), diff --git a/WordPress/Classes/ViewRelated/Reader/ReaderPostCardCell.swift b/WordPress/Classes/ViewRelated/Reader/ReaderPostCardCell.swift index 11dcc36c96d0..3aef302adbbf 100644 --- a/WordPress/Classes/ViewRelated/Reader/ReaderPostCardCell.swift +++ b/WordPress/Classes/ViewRelated/Reader/ReaderPostCardCell.swift @@ -243,11 +243,7 @@ import Gridicons borderedView.layer.borderWidth = .hairlineBorderWidth WPStyleGuide.applyReaderSaveForLaterButtonStyle(saveForLaterButton) - - if FeatureFlag.postReblogging.enabled { - WPStyleGuide.applyReaderReblogActionButtonStyle(reblogActionButton) - } - + WPStyleGuide.applyReaderReblogActionButtonStyle(reblogActionButton) WPStyleGuide.applyReaderFollowButtonStyle(followButton) WPStyleGuide.applyReaderCardBlogNameStyle(blogNameLabel) WPStyleGuide.applyReaderCardBylineLabelStyle(bylineLabel) @@ -509,8 +505,7 @@ import Gridicons fileprivate var shouldShowReblogActionButton: Bool { // reblog button is hidden if there's no content - guard FeatureFlag.postReblogging.enabled, - let provider = contentProvider, + guard let provider = contentProvider, !provider.isPrivate(), loggedInActionVisibility.isEnabled else { return false @@ -532,12 +527,9 @@ import Gridicons let commentTitle = commentCount > 0 ? String(commentCount) : "" likeActionButton.setTitle(likeTitle, for: .normal) commentActionButton.setTitle(commentTitle, for: .normal) - if FeatureFlag.postReblogging.enabled { - WPStyleGuide.applyReaderSaveForLaterButtonTitles(saveForLaterButton, showTitle: false) - WPStyleGuide.applyReaderReblogActionButtonTitle(reblogActionButton, showTitle: false) - } else { - saveForLaterButton.setTitle("", for: .normal) - } + WPStyleGuide.applyReaderSaveForLaterButtonTitles(saveForLaterButton, showTitle: false) + WPStyleGuide.applyReaderReblogActionButtonTitle(reblogActionButton, showTitle: false) + } else { let likeTitle = WPStyleGuide.likeCountForDisplay(likeCount) let commentTitle = WPStyleGuide.commentCountForDisplay(commentCount) @@ -546,9 +538,7 @@ import Gridicons commentActionButton.setTitle(commentTitle, for: .normal) WPStyleGuide.applyReaderSaveForLaterButtonTitles(saveForLaterButton) - if FeatureFlag.postReblogging.enabled { - WPStyleGuide.applyReaderReblogActionButtonTitle(reblogActionButton) - } + WPStyleGuide.applyReaderReblogActionButtonTitle(reblogActionButton) } } @@ -671,9 +661,7 @@ extension ReaderPostCardCell: Accessible { prepareMenuForVoiceOver() prepareVisitForVoiceOver() prepareFollowButtonForVoiceOver() - if FeatureFlag.postReblogging.enabled { - prepareReblogForVoiceOver() - } + prepareReblogForVoiceOver() } private func prepareCardForVoiceOver() { From 5eb122190fadb820976a215970e34536fc37840c Mon Sep 17 00:00:00 2001 From: Giorgio Ruscigno Date: Mon, 13 Apr 2020 18:33:26 -0500 Subject: [PATCH 04/12] Remove reblog feature flag from unit tests --- .../WordPressTest/ReaderDetailViewControllerTests.swift | 3 --- WordPress/WordPressTest/ReaderPostCardCellTests.swift | 9 --------- 2 files changed, 12 deletions(-) diff --git a/WordPress/WordPressTest/ReaderDetailViewControllerTests.swift b/WordPress/WordPressTest/ReaderDetailViewControllerTests.swift index 284a5e567482..3ba0df521089 100644 --- a/WordPress/WordPressTest/ReaderDetailViewControllerTests.swift +++ b/WordPress/WordPressTest/ReaderDetailViewControllerTests.swift @@ -28,9 +28,6 @@ class ReaderDetailViewControllerTests: XCTestCase { } func testReblogButtonMatchesExpectation() { - guard FeatureFlag.postReblogging.enabled else { - return - } XCTAssertEqual(readerDetailViewController?.getReblogButtonForTesting().accessibilityLabel, TestConstants.reblogLabel, "Incorrect accessibility label: Reblog button") } } diff --git a/WordPress/WordPressTest/ReaderPostCardCellTests.swift b/WordPress/WordPressTest/ReaderPostCardCellTests.swift index 836ee8991be2..106947b4b723 100644 --- a/WordPress/WordPressTest/ReaderPostCardCellTests.swift +++ b/WordPress/WordPressTest/ReaderPostCardCellTests.swift @@ -197,16 +197,10 @@ final class ReaderPostCardCellTests: XCTestCase { } func testReblogActionButtonMatchesExpectation() { - guard FeatureFlag.postReblogging.enabled else { - return - } XCTAssertEqual(cell?.getReblogButtonForTesting().accessibilityLabel, TestConstants.reblogLabel, "Incorrect accessibility label: Reblog button") } func testReblogButtonIsVisible() { - guard FeatureFlag.postReblogging.enabled else { - return - } guard let button = cell?.getReblogButtonForTesting() else { XCTFail("Reblog button not found.") return @@ -215,9 +209,6 @@ final class ReaderPostCardCellTests: XCTestCase { } func testReblogButtonVisibleWithNoLoggedInUser() { - guard FeatureFlag.postReblogging.enabled else { - return - } cell?.loggedInActionVisibility = .visible(enabled: false) cell?.configureCell(mock!) From c9469c36c70ff8c1cb25544446f040e6e7baecd6 Mon Sep 17 00:00:00 2001 From: James Frost Date: Tue, 14 Apr 2020 14:59:12 +0100 Subject: [PATCH 05/12] Update WPAuthenticator pod reference --- Podfile | 6 +++--- Podfile.lock | 15 ++++++++++----- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Podfile b/Podfile index 6c3e05450e68..3b4294b8f778 100644 --- a/Podfile +++ b/Podfile @@ -185,11 +185,11 @@ target 'WordPress' do pod 'Gridicons', '~> 1.0.1' - pod 'WordPressAuthenticator', '~> 1.13.0-beta.1' +# pod 'WordPressAuthenticator', '~> 1.13.0-beta.1' # While in PR - # pod 'WordPressAuthenticator', :git => 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', :branch => '' + pod 'WordPressAuthenticator', :git => 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', :branch => 'try/switch-primary-button' # pod 'WordPressAuthenticator', :git => 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', :commit => '' - # pod 'WordPressAuthenticator', :path => '../WordPressAuthenticator-iOS' +# pod 'WordPressAuthenticator', :path => '../WordPressAuthenticator-iOS' pod 'MediaEditor', '~> 1.0.1' # pod 'MediaEditor', :git => 'https://github.com/wordpress-mobile/MediaEditor-iOS.git', :commit => 'a4178ed9b0f3622faafb41dd12503e26c5523a32' diff --git a/Podfile.lock b/Podfile.lock index d3be74f6258d..accc04c2fa61 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -376,7 +376,7 @@ PODS: - WordPress-Aztec-iOS (1.17.1) - WordPress-Editor-iOS (1.17.1): - WordPress-Aztec-iOS (= 1.17.1) - - WordPressAuthenticator (1.13.0-beta.1): + - WordPressAuthenticator (1.13.0-beta.2): - 1PasswordExtension (= 1.8.6) - Alamofire (= 4.8) - CocoaLumberjack (~> 3.5) @@ -479,7 +479,7 @@ DEPENDENCIES: - Starscream (= 3.0.6) - SVProgressHUD (= 2.2.5) - WordPress-Editor-iOS (~> 1.17.1) - - WordPressAuthenticator (~> 1.13.0-beta.1) + - WordPressAuthenticator (from `https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git`, branch `try/switch-primary-button`) - WordPressKit (~> 4.7.1-beta.1) - WordPressMocks (~> 0.0.8) - WordPressShared (~> 1.8.16) @@ -527,7 +527,6 @@ SPEC REPOS: - UIDeviceIdentifier - WordPress-Aztec-iOS - WordPress-Editor-iOS - - WordPressAuthenticator - WordPressKit - WordPressMocks - WordPressShared @@ -613,6 +612,9 @@ EXTERNAL SOURCES: RNTAztecView: :git: http://github.com/wordpress-mobile/gutenberg-mobile/ :tag: v1.25.0 + WordPressAuthenticator: + :branch: try/switch-primary-button + :git: https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git Yoga: :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.25.0/react-native-gutenberg-bridge/third-party-podspecs/Yoga.podspec.json @@ -626,6 +628,9 @@ CHECKOUT OPTIONS: RNTAztecView: :git: http://github.com/wordpress-mobile/gutenberg-mobile/ :tag: v1.25.0 + WordPressAuthenticator: + :commit: f37763a0f2514470d67c92ce16886dc2ef764564 + :git: https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git SPEC CHECKSUMS: 1PasswordExtension: f97cc80ae58053c331b2b6dc8843ba7103b33794 @@ -697,7 +702,7 @@ SPEC CHECKSUMS: UIDeviceIdentifier: 44f805037d21b94394821828f4fcaba34b38c2d0 WordPress-Aztec-iOS: 319620514af963ca519bd83b96a2c0ebdf3a0f03 WordPress-Editor-iOS: 497b55838ef0030cc6ca82eb92da84e661423521 - WordPressAuthenticator: b64a15c023570a85ffa748766fd3e7469eac9449 + WordPressAuthenticator: 693ff4ee341e1cf9acb6d1fb53c5372ab6efb10f WordPressKit: dde0a214279fb70d7150b69ae90c7224c18fe2d0 WordPressMocks: b4064b99a073117bbc304abe82df78f2fbe60992 WordPressShared: 1bc316ed162f42af4e0fa2869437e9e28b532b01 @@ -714,6 +719,6 @@ SPEC CHECKSUMS: ZendeskSupportSDK: a87ab1e4badace92c75eb11dc77ede1e995b2adc ZIPFoundation: 249fa8890597086cd536bb2df5c9804d84e122b0 -PODFILE CHECKSUM: 082f5addde6658b17532f09619ce370f79441e6b +PODFILE CHECKSUM: e2f1b1175d2f4e236ee24220675954da95d62d12 COCOAPODS: 1.8.4 From 98366957903c7e4f2f9c3bfb0ffed86d0a9eb12a Mon Sep 17 00:00:00 2001 From: James Frost Date: Tue, 14 Apr 2020 15:55:48 +0100 Subject: [PATCH 06/12] Updated release notes --- RELEASE-NOTES.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index d5359dc1cd61..4815fc4cccd6 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -3,6 +3,7 @@ * [internal] the signup flow using email has code changes that can cause regressions. See https://git.io/JvALZ for testing details. * Classic Editor: Fixed action sheet position for additional Media sources picker on iPad * [internal] Notifications tab should pop to the root of the navigation stack when tapping on the tab from within a notification detail screen. See https://git.io/Jvxka for testing details. +* Updated the appearance of the login and signup buttons to make signup more prominent. 14.6 ----- From ed552e069fa60324ce0ead1db3ac6e5997c52e6a Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Tue, 14 Apr 2020 13:44:45 -0500 Subject: [PATCH 07/12] Point podfile to feature branch for Authenticator --- Podfile | 4 ++-- Podfile.lock | 15 ++++++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Podfile b/Podfile index 6c3e05450e68..f375f9fa147d 100644 --- a/Podfile +++ b/Podfile @@ -185,9 +185,9 @@ target 'WordPress' do pod 'Gridicons', '~> 1.0.1' - pod 'WordPressAuthenticator', '~> 1.13.0-beta.1' + #pod 'WordPressAuthenticator', '~> 1.13.0-beta.3' # While in PR - # pod 'WordPressAuthenticator', :git => 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', :branch => '' + pod 'WordPressAuthenticator', :git => 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', :branch => 'issue/239-remove-showURLUsernamePassword' # pod 'WordPressAuthenticator', :git => 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', :commit => '' # pod 'WordPressAuthenticator', :path => '../WordPressAuthenticator-iOS' diff --git a/Podfile.lock b/Podfile.lock index d3be74f6258d..919091630746 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -376,7 +376,7 @@ PODS: - WordPress-Aztec-iOS (1.17.1) - WordPress-Editor-iOS (1.17.1): - WordPress-Aztec-iOS (= 1.17.1) - - WordPressAuthenticator (1.13.0-beta.1): + - WordPressAuthenticator (1.13.0-beta.3): - 1PasswordExtension (= 1.8.6) - Alamofire (= 4.8) - CocoaLumberjack (~> 3.5) @@ -479,7 +479,7 @@ DEPENDENCIES: - Starscream (= 3.0.6) - SVProgressHUD (= 2.2.5) - WordPress-Editor-iOS (~> 1.17.1) - - WordPressAuthenticator (~> 1.13.0-beta.1) + - WordPressAuthenticator (from `https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git`, branch `issue/239-remove-showURLUsernamePassword`) - WordPressKit (~> 4.7.1-beta.1) - WordPressMocks (~> 0.0.8) - WordPressShared (~> 1.8.16) @@ -527,7 +527,6 @@ SPEC REPOS: - UIDeviceIdentifier - WordPress-Aztec-iOS - WordPress-Editor-iOS - - WordPressAuthenticator - WordPressKit - WordPressMocks - WordPressShared @@ -613,6 +612,9 @@ EXTERNAL SOURCES: RNTAztecView: :git: http://github.com/wordpress-mobile/gutenberg-mobile/ :tag: v1.25.0 + WordPressAuthenticator: + :branch: issue/239-remove-showURLUsernamePassword + :git: https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git Yoga: :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.25.0/react-native-gutenberg-bridge/third-party-podspecs/Yoga.podspec.json @@ -626,6 +628,9 @@ CHECKOUT OPTIONS: RNTAztecView: :git: http://github.com/wordpress-mobile/gutenberg-mobile/ :tag: v1.25.0 + WordPressAuthenticator: + :commit: 9a1cdfce612c96623bdf7680cc493d405f295e3a + :git: https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git SPEC CHECKSUMS: 1PasswordExtension: f97cc80ae58053c331b2b6dc8843ba7103b33794 @@ -697,7 +702,7 @@ SPEC CHECKSUMS: UIDeviceIdentifier: 44f805037d21b94394821828f4fcaba34b38c2d0 WordPress-Aztec-iOS: 319620514af963ca519bd83b96a2c0ebdf3a0f03 WordPress-Editor-iOS: 497b55838ef0030cc6ca82eb92da84e661423521 - WordPressAuthenticator: b64a15c023570a85ffa748766fd3e7469eac9449 + WordPressAuthenticator: 6aa4deec9a328c354ea08a1d1a60f1ca19cb8279 WordPressKit: dde0a214279fb70d7150b69ae90c7224c18fe2d0 WordPressMocks: b4064b99a073117bbc304abe82df78f2fbe60992 WordPressShared: 1bc316ed162f42af4e0fa2869437e9e28b532b01 @@ -714,6 +719,6 @@ SPEC CHECKSUMS: ZendeskSupportSDK: a87ab1e4badace92c75eb11dc77ede1e995b2adc ZIPFoundation: 249fa8890597086cd536bb2df5c9804d84e122b0 -PODFILE CHECKSUM: 082f5addde6658b17532f09619ce370f79441e6b +PODFILE CHECKSUM: 4573a5308667afd305404b2277ef0c2d7bd55613 COCOAPODS: 1.8.4 From 72d5200ca6b4380beae6c13c4fb6db35380c9890 Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Tue, 14 Apr 2020 14:19:05 -0500 Subject: [PATCH 08/12] Add an internal testing note. --- RELEASE-NOTES.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index d5359dc1cd61..8d5b717b3e35 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -1,8 +1,9 @@ 14.7 ----- -* [internal] the signup flow using email has code changes that can cause regressions. See https://git.io/JvALZ for testing details. * Classic Editor: Fixed action sheet position for additional Media sources picker on iPad +* [internal] the signup flow using email has code changes that can cause regressions. See https://git.io/JvALZ for testing details. * [internal] Notifications tab should pop to the root of the navigation stack when tapping on the tab from within a notification detail screen. See https://git.io/Jvxka for testing details. +* [internal] the login by email flow and the self-hosted login flow have code changes that can cause regressions. See https://git.io/JfeFN for testing details. 14.6 ----- From 2cb62df131b5df63972f6dcd79aa0361fdf47b2c Mon Sep 17 00:00:00 2001 From: Brandon Titus Date: Tue, 14 Apr 2020 20:06:14 -0600 Subject: [PATCH 09/12] Allow width constraint to break in compact Width won't fit in compact so it can break in that scenario --- .../Detail Header/NewBlogDetailHeaderView.swift | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Blog/Blog Details/Detail Header/NewBlogDetailHeaderView.swift b/WordPress/Classes/ViewRelated/Blog/Blog Details/Detail Header/NewBlogDetailHeaderView.swift index 666907ea2340..2483345efe45 100644 --- a/WordPress/Classes/ViewRelated/Blog/Blog Details/Detail Header/NewBlogDetailHeaderView.swift +++ b/WordPress/Classes/ViewRelated/Blog/Blog Details/Detail Header/NewBlogDetailHeaderView.swift @@ -113,20 +113,18 @@ class NewBlogDetailHeaderView: UIView { let bottomConstraint = buttonsStackView.bottomAnchor.constraint(equalTo: bottomAnchor, constant: -Constants.buttonsBottomPadding) bottomConstraint.priority = UILayoutPriority(999) // Allow to break so encapsulated height (on initial table view load) doesn't spew warnings - /// If we are able to attach to the safe area's leading edge, we should, otherwise it can break - let leadingSafeAreaConstraint = stackView.leadingAnchor.constraint(equalTo: safeAreaLayoutGuide.leadingAnchor) - leadingSafeAreaConstraint.priority = .defaultHigh + let widthConstraint = buttonsStackView.widthAnchor.constraint(equalToConstant: 320) + widthConstraint.priority = .defaultHigh let edgeConstraints = [ - leadingSafeAreaConstraint, stackView.trailingAnchor.constraint(lessThanOrEqualTo: layoutMarginsGuide.trailingAnchor), stackView.leadingAnchor.constraint(greaterThanOrEqualTo: leadingAnchor, constant: Constants.minimumSideSpacing), stackView.topAnchor.constraint(equalTo: topAnchor, constant: Constants.interSectionSpacing), stackView.centerXAnchor.constraint(equalTo: layoutMarginsGuide.centerXAnchor), - buttonsStackView.widthAnchor.constraint(equalToConstant: 320), buttonsStackView.topAnchor.constraint(equalTo: stackView.bottomAnchor, constant: Constants.interSectionSpacing), buttonsStackView.centerXAnchor.constraint(equalTo: stackView.centerXAnchor), - bottomConstraint + bottomConstraint, + widthConstraint ] NSLayoutConstraint.activate(minimumPaddingSideConstraints + edgeConstraints) From 55930ab6a31c9d2c9d9e0d0599beadca43164611 Mon Sep 17 00:00:00 2001 From: James Frost Date: Wed, 15 Apr 2020 09:15:37 +0100 Subject: [PATCH 10/12] Bumped WPAuthenticator pod version --- Podfile | 4 ++-- Podfile.lock | 11 +++-------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/Podfile b/Podfile index 3b4294b8f778..d973948d9285 100644 --- a/Podfile +++ b/Podfile @@ -185,9 +185,9 @@ target 'WordPress' do pod 'Gridicons', '~> 1.0.1' -# pod 'WordPressAuthenticator', '~> 1.13.0-beta.1' + pod 'WordPressAuthenticator', '~> 1.13.0-beta.2' # While in PR - pod 'WordPressAuthenticator', :git => 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', :branch => 'try/switch-primary-button' +# pod 'WordPressAuthenticator', :git => 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', :branch => 'try/switch-primary-button' # pod 'WordPressAuthenticator', :git => 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', :commit => '' # pod 'WordPressAuthenticator', :path => '../WordPressAuthenticator-iOS' diff --git a/Podfile.lock b/Podfile.lock index accc04c2fa61..ba7cd64fce48 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -479,7 +479,7 @@ DEPENDENCIES: - Starscream (= 3.0.6) - SVProgressHUD (= 2.2.5) - WordPress-Editor-iOS (~> 1.17.1) - - WordPressAuthenticator (from `https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git`, branch `try/switch-primary-button`) + - WordPressAuthenticator (~> 1.13.0-beta.2) - WordPressKit (~> 4.7.1-beta.1) - WordPressMocks (~> 0.0.8) - WordPressShared (~> 1.8.16) @@ -527,6 +527,7 @@ SPEC REPOS: - UIDeviceIdentifier - WordPress-Aztec-iOS - WordPress-Editor-iOS + - WordPressAuthenticator - WordPressKit - WordPressMocks - WordPressShared @@ -612,9 +613,6 @@ EXTERNAL SOURCES: RNTAztecView: :git: http://github.com/wordpress-mobile/gutenberg-mobile/ :tag: v1.25.0 - WordPressAuthenticator: - :branch: try/switch-primary-button - :git: https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git Yoga: :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.25.0/react-native-gutenberg-bridge/third-party-podspecs/Yoga.podspec.json @@ -628,9 +626,6 @@ CHECKOUT OPTIONS: RNTAztecView: :git: http://github.com/wordpress-mobile/gutenberg-mobile/ :tag: v1.25.0 - WordPressAuthenticator: - :commit: f37763a0f2514470d67c92ce16886dc2ef764564 - :git: https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git SPEC CHECKSUMS: 1PasswordExtension: f97cc80ae58053c331b2b6dc8843ba7103b33794 @@ -719,6 +714,6 @@ SPEC CHECKSUMS: ZendeskSupportSDK: a87ab1e4badace92c75eb11dc77ede1e995b2adc ZIPFoundation: 249fa8890597086cd536bb2df5c9804d84e122b0 -PODFILE CHECKSUM: e2f1b1175d2f4e236ee24220675954da95d62d12 +PODFILE CHECKSUM: d4b871b14b78129b9c99ba51d55b4442c8655acc COCOAPODS: 1.8.4 From 800362b3eabe4fad3acc966d6f7fe06f25b5a2bb Mon Sep 17 00:00:00 2001 From: "Thuy.Copeland" Date: Wed, 15 Apr 2020 09:42:24 -0500 Subject: [PATCH 11/12] Point podfile to latest Auth release --- Podfile | 4 ++-- Podfile.lock | 11 +++-------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/Podfile b/Podfile index 4e6b021814e4..3e14318ba542 100644 --- a/Podfile +++ b/Podfile @@ -185,9 +185,9 @@ target 'WordPress' do pod 'Gridicons', '~> 1.0.1' - #pod 'WordPressAuthenticator', '~> 1.13.0-beta.3' + pod 'WordPressAuthenticator', '~> 1.13.0-beta.3' # While in PR - pod 'WordPressAuthenticator', :git => 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', :branch => 'issue/239-remove-showURLUsernamePassword' + # pod 'WordPressAuthenticator', :git => 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', :branch => '' # pod 'WordPressAuthenticator', :git => 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', :commit => '' # pod 'WordPressAuthenticator', :path => '../WordPressAuthenticator-iOS' diff --git a/Podfile.lock b/Podfile.lock index 919091630746..bb767f34b9cc 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -479,7 +479,7 @@ DEPENDENCIES: - Starscream (= 3.0.6) - SVProgressHUD (= 2.2.5) - WordPress-Editor-iOS (~> 1.17.1) - - WordPressAuthenticator (from `https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git`, branch `issue/239-remove-showURLUsernamePassword`) + - WordPressAuthenticator (~> 1.13.0-beta.3) - WordPressKit (~> 4.7.1-beta.1) - WordPressMocks (~> 0.0.8) - WordPressShared (~> 1.8.16) @@ -527,6 +527,7 @@ SPEC REPOS: - UIDeviceIdentifier - WordPress-Aztec-iOS - WordPress-Editor-iOS + - WordPressAuthenticator - WordPressKit - WordPressMocks - WordPressShared @@ -612,9 +613,6 @@ EXTERNAL SOURCES: RNTAztecView: :git: http://github.com/wordpress-mobile/gutenberg-mobile/ :tag: v1.25.0 - WordPressAuthenticator: - :branch: issue/239-remove-showURLUsernamePassword - :git: https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git Yoga: :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.25.0/react-native-gutenberg-bridge/third-party-podspecs/Yoga.podspec.json @@ -628,9 +626,6 @@ CHECKOUT OPTIONS: RNTAztecView: :git: http://github.com/wordpress-mobile/gutenberg-mobile/ :tag: v1.25.0 - WordPressAuthenticator: - :commit: 9a1cdfce612c96623bdf7680cc493d405f295e3a - :git: https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git SPEC CHECKSUMS: 1PasswordExtension: f97cc80ae58053c331b2b6dc8843ba7103b33794 @@ -719,6 +714,6 @@ SPEC CHECKSUMS: ZendeskSupportSDK: a87ab1e4badace92c75eb11dc77ede1e995b2adc ZIPFoundation: 249fa8890597086cd536bb2df5c9804d84e122b0 -PODFILE CHECKSUM: 4573a5308667afd305404b2277ef0c2d7bd55613 +PODFILE CHECKSUM: 318b388b9de5b3025ac2de8fe4119edf6ce8a261 COCOAPODS: 1.8.4 From 02426df5a7d1f0acf61bbf8437c762eaa318c154 Mon Sep 17 00:00:00 2001 From: Rachel McR Date: Thu, 16 Apr 2020 11:11:55 +0100 Subject: [PATCH 12/12] Testing: Use Fastlane for CI test runs with retries (#13810) * Use Fastlane for CI test runs with retries --- .circleci/config.yml | 38 +++++++++++-------------- Gemfile.lock | 9 ++++++ Scripts/fastlane/Fastfile | 56 +++++++++++++++++++++++++++++-------- Scripts/fastlane/Pluginfile | 1 + 4 files changed, 71 insertions(+), 33 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 42567f24450a..23907c5bf015 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,19 +20,6 @@ commands: echo $PATH fi - save-xcresult: - steps: - - run: - name: Zip xcresult - command: | - mkdir testresults - zip -r testresults/xcresult.zip test-without-building.xcresult - when: on_fail # Zips the .xcresult file when tests fail, so it can be saved - - store_artifacts: - name: Save xcresult - path: testresults - destination: logs - jobs: Build Tests: executor: @@ -51,23 +38,28 @@ jobs: paths: - DerivedData/Build/Products - Pods/WordPressMocks + - vendor/bundle Unit Tests: executor: name: ios/default xcode-version: "11.2.1" steps: - fix-path + - git/shallow-checkout - ios/boot-simulator: xcode-version: "11.2.1" device: iPhone 11 - attach_workspace: at: ./ + - run: + name: Prepare Bundle + command: bundle --path vendor/bundle - ios/wait-for-simulator - - ios/xcodebuild: - command: test-without-building - arguments: -xctestrun DerivedData/Build/Products/WordPress_WordPressUnitTests_iphonesimulator13.2-x86_64.xctestrun -destination "platform=iOS Simulator,id=$SIMULATOR_UDID" -resultBundlePath test-without-building.xcresult + - run: + name: Run Unit Tests + working_directory: Scripts + command: bundle exec fastlane test_without_building xctestrun:DerivedData/Build/Products/WordPress_WordPressUnitTests_iphonesimulator13.2-x86_64.xctestrun destination:"platform=iOS Simulator,id=$SIMULATOR_UDID" try_count:3 - ios/save-xcodebuild-artifacts - - save-xcresult UI Tests: parameters: device: @@ -81,21 +73,25 @@ jobs: xcode-version: "11.2.1" steps: - fix-path + - git/shallow-checkout - ios/boot-simulator: xcode-version: "11.2.1" device: << parameters.device >> - attach_workspace: at: ./ + - run: + name: Prepare Bundle + command: bundle --path vendor/bundle - run: name: Run mocks command: ./Pods/WordPressMocks/scripts/start.sh 8282 background: true - ios/wait-for-simulator - - ios/xcodebuild: - command: test-without-building - arguments: -xctestrun DerivedData/Build/Products/WordPress_WordPressUITests_iphonesimulator13.2-x86_64.xctestrun -destination "platform=iOS Simulator,id=$SIMULATOR_UDID" -resultBundlePath test-without-building.xcresult + - run: + name: Run UI Tests + working_directory: Scripts + command: bundle exec fastlane test_without_building xctestrun:DerivedData/Build/Products/WordPress_WordPressUITests_iphonesimulator13.2-x86_64.xctestrun destination:"platform=iOS Simulator,id=$SIMULATOR_UDID" try_count:3 - ios/save-xcodebuild-artifacts - - save-xcresult - when: condition: << parameters.post-to-slack >> steps: diff --git a/Gemfile.lock b/Gemfile.lock index 0ca1c7c09bb2..86224c23dd0f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -81,6 +81,7 @@ GEM cocoapods-try (1.1.0) colored (1.2) colored2 (3.1.2) + colorize (0.8.1) commander-fastlane (4.4.6) highline (~> 1.7.2) commonmarker (0.20.1) @@ -144,6 +145,12 @@ GEM xcpretty-travis-formatter (>= 0.0.3) fastlane-plugin-appcenter (1.7.1) fastlane-plugin-sentry (1.6.0) + fastlane-plugin-test_center (3.10.1) + colorize + json + plist + xcodeproj + xctest_list (>= 1.1.8) fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) @@ -270,6 +277,7 @@ GEM rouge (~> 2.0.7) xcpretty-travis-formatter (1.0.0) xcpretty (~> 0.2, >= 0.0.7) + xctest_list (1.1.8) PLATFORMS ruby @@ -281,6 +289,7 @@ DEPENDENCIES fastlane (= 2.143.0)! fastlane-plugin-appcenter (= 1.7.1) fastlane-plugin-sentry + fastlane-plugin-test_center fastlane-plugin-wpmreleasetoolkit! octokit (~> 4.0)! rake! diff --git a/Scripts/fastlane/Fastfile b/Scripts/fastlane/Fastfile index 1e3172768d55..f859af2bf9d4 100644 --- a/Scripts/fastlane/Fastfile +++ b/Scripts/fastlane/Fastfile @@ -15,19 +15,22 @@ def get_required_env(key) ENV[key] end -before_all do - # Check that the env files exist - unless is_ci || File.file?(USER_ENV_FILE_PATH) - UI.user_error!("~/.wpios-env.default not found: Please copy env/user.env-example to #{USER_ENV_FILE_PATH} and fill in the values") - end - unless File.file?(PROJECT_ENV_FILE_PATH) - UI.user_error!("project.env not found: Make sure your configuration is up to date with `rake dependencies`") - end +before_all do |lane| + # Skip these checks/steps for test lane (not needed for testing) + unless lane == :test_without_building + # Check that the env files exist + unless is_ci || File.file?(USER_ENV_FILE_PATH) + UI.user_error!("~/.wpios-env.default not found: Please copy env/user.env-example to #{USER_ENV_FILE_PATH} and fill in the values") + end + unless File.file?(PROJECT_ENV_FILE_PATH) + UI.user_error!("project.env not found: Make sure your configuration is up to date with `rake dependencies`") + end - # This allows code signing to work on CircleCI - # It is skipped if this isn't running on CI - # See https://circleci.com/docs/2.0/ios-codesigning/ - setup_circle_ci + # This allows code signing to work on CircleCI + # It is skipped if this isn't running on CI + # See https://circleci.com/docs/2.0/ios-codesigning/ + setup_circle_ci + end end platform :ios do @@ -483,6 +486,35 @@ import "./ScreenshotFastfile" "org.wordpress.WordPressThisWeekWidget"]) end +######################################################################## +# Test Lanes +######################################################################## + ##################################################################################### + # test_without_building + # ----------------------------------------------------------------------------------- + # This lane runs tests without building the app. + # It requires a prebuilt xctestrun file and simulator destination where the tests will be run. + # ----------------------------------------------------------------------------------- + # Usage: + # bundle exec fastlane test_without_building [xctestrun:] [destination:] [try_count:] + # + # Example: + # bundle exec fastlane test_without_building xctestrun:WordPress_WordPressUITests_iphonesimulator13.2-x86_64.xctestrun destination:"platform=iOS Simulator,id=$SIMULATOR_UDID" try_count:3 + ##################################################################################### + desc "Run tests without building" + lane :test_without_building do | options | + multi_scan( + workspace: "../WordPress.xcworkspace", + scheme: "WordPress", + test_without_building: true, + xctestrun: "../#{options[:xctestrun]}", + destination: options[:destination], + try_count: options[:try_count], + output_directory: "../build/results", + result_bundle: true + ) + end + ######################################################################## # Helper Lanes ######################################################################## diff --git a/Scripts/fastlane/Pluginfile b/Scripts/fastlane/Pluginfile index 9d4d40aa834e..7d79f8b17356 100644 --- a/Scripts/fastlane/Pluginfile +++ b/Scripts/fastlane/Pluginfile @@ -9,3 +9,4 @@ end gem 'fastlane-plugin-wpmreleasetoolkit', git: 'https://github.com/wordpress-mobile/release-toolkit', tag: '0.9.1' gem 'fastlane-plugin-sentry' gem 'fastlane-plugin-appcenter', '1.7.1' +gem 'fastlane-plugin-test_center'