From 26d458e491003dd296796f4d27bc5545b00babea Mon Sep 17 00:00:00 2001 From: Tony Li Date: Fri, 30 Jun 2023 19:46:24 +1200 Subject: [PATCH 01/72] Do not discard notification observers in NoticePresenter --- .../System/Notices/NoticePresenter.swift | 84 +++++++++++-------- 1 file changed, 47 insertions(+), 37 deletions(-) diff --git a/WordPress/Classes/ViewRelated/System/Notices/NoticePresenter.swift b/WordPress/Classes/ViewRelated/System/Notices/NoticePresenter.swift index 7546c7916a28..a745319309cd 100644 --- a/WordPress/Classes/ViewRelated/System/Notices/NoticePresenter.swift +++ b/WordPress/Classes/ViewRelated/System/Notices/NoticePresenter.swift @@ -1,4 +1,5 @@ import Foundation +import Combine import UIKit import UserNotifications import WordPressFlux @@ -59,6 +60,8 @@ class NoticePresenter { private var currentNoticePresentation: NoticePresentation? private var currentKeyboardPresentation: KeyboardPresentation = .notPresent + private var notificationObservers = Set() + init(store: NoticeStore = StoreContainer.shared.notice, animator: NoticeAnimator = NoticeAnimator(duration: Animations.appearanceDuration, springDampening: Animations.appearanceSpringDamping, springVelocity: NoticePresenter.Animations.appearanceSpringVelocity)) { self.store = store @@ -97,54 +100,61 @@ class NoticePresenter { // MARK: - Events private func listenToKeyboardEvents() { - NotificationCenter.default.addObserver(forName: UIResponder.keyboardWillShowNotification, object: nil, queue: nil) { [weak self] (notification) in - guard let self = self, - let userInfo = notification.userInfo, - let keyboardFrameValue = userInfo[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue, - let durationValue = userInfo[UIResponder.keyboardAnimationDurationUserInfoKey] as? NSNumber else { - return - } - - self.currentKeyboardPresentation = .present(height: keyboardFrameValue.cgRectValue.size.height) - - guard let currentContainer = self.currentNoticePresentation?.containerView else { - return - } + NotificationCenter.default + .publisher(for: UIResponder.keyboardWillShowNotification) + .sink { [weak self] (notification) in + guard let self = self, + let userInfo = notification.userInfo, + let keyboardFrameValue = userInfo[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue, + let durationValue = userInfo[UIResponder.keyboardAnimationDurationUserInfoKey] as? NSNumber else { + return + } - UIView.animate(withDuration: durationValue.doubleValue, animations: { - currentContainer.bottomConstraint?.constant = self.onScreenNoticeContainerBottomConstraintConstant - self.view.layoutIfNeeded() - }) - } - NotificationCenter.default.addObserver(forName: UIResponder.keyboardWillHideNotification, object: nil, queue: nil) { [weak self] (notification) in - self?.currentKeyboardPresentation = .notPresent + self.currentKeyboardPresentation = .present(height: keyboardFrameValue.cgRectValue.size.height) - guard let self = self, - let currentContainer = self.currentNoticePresentation?.containerView, - let userInfo = notification.userInfo, - let durationValue = userInfo[UIResponder.keyboardAnimationDurationUserInfoKey] as? NSNumber else { + guard let currentContainer = self.currentNoticePresentation?.containerView else { return + } + + UIView.animate(withDuration: durationValue.doubleValue, animations: { + currentContainer.bottomConstraint?.constant = self.onScreenNoticeContainerBottomConstraintConstant + self.view.layoutIfNeeded() + }) } + .store(in: ¬ificationObservers) + NotificationCenter.default + .publisher(for: UIResponder.keyboardWillHideNotification) + .sink { [weak self] (notification) in + self?.currentKeyboardPresentation = .notPresent + + guard let self = self, + let currentContainer = self.currentNoticePresentation?.containerView, + let userInfo = notification.userInfo, + let durationValue = userInfo[UIResponder.keyboardAnimationDurationUserInfoKey] as? NSNumber else { + return + } - UIView.animate(withDuration: durationValue.doubleValue, animations: { - currentContainer.bottomConstraint?.constant = self.onScreenNoticeContainerBottomConstraintConstant - self.view.layoutIfNeeded() - }) - } + UIView.animate(withDuration: durationValue.doubleValue, animations: { + currentContainer.bottomConstraint?.constant = self.onScreenNoticeContainerBottomConstraintConstant + self.view.layoutIfNeeded() + }) + } + .store(in: ¬ificationObservers) } /// Adjust the current Notice so it will always be in the correct y-position after the /// device is rotated. private func listenToOrientationChangeEvents() { - let nc = NotificationCenter.default - nc.addObserver(forName: NSNotification.Name.WPTabBarHeightChanged, object: nil, queue: nil) { [weak self] _ in - guard let self = self, - let containerView = self.currentNoticePresentation?.containerView else { - return - } + NotificationCenter.default.publisher(for: .WPTabBarHeightChanged) + .sink { [weak self] _ in + guard let self = self, + let containerView = self.currentNoticePresentation?.containerView else { + return + } - containerView.bottomConstraint?.constant = -self.window.untouchableViewController.offsetOnscreen - } + containerView.bottomConstraint?.constant = -self.window.untouchableViewController.offsetOnscreen + } + .store(in: ¬ificationObservers) } /// Handle all changes in the `NoticeStore`. From d204b03633bdbe8dfea5645893b52a4d828545e5 Mon Sep 17 00:00:00 2001 From: Tony Li Date: Fri, 30 Jun 2023 19:47:24 +1200 Subject: [PATCH 02/72] Retain a notification observer in StatsForegroundObservable --- .../Stats/StatsForegroundObservable.swift | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Stats/StatsForegroundObservable.swift b/WordPress/Classes/ViewRelated/Stats/StatsForegroundObservable.swift index 447af1b75cf2..63d45d12e1ef 100644 --- a/WordPress/Classes/ViewRelated/Stats/StatsForegroundObservable.swift +++ b/WordPress/Classes/ViewRelated/Stats/StatsForegroundObservable.swift @@ -4,9 +4,11 @@ protocol StatsForegroundObservable: AnyObject { func reloadStatsData() } +private var observerKey = 0 + extension StatsForegroundObservable where Self: UIViewController { func addWillEnterForegroundObserver() { - NotificationCenter.default.addObserver(forName: UIApplication.willEnterForegroundNotification, + enterForegroundObserver = NotificationCenter.default.addObserver(forName: UIApplication.willEnterForegroundNotification, object: nil, queue: nil) { [weak self] _ in self?.reloadStatsData() @@ -14,8 +16,18 @@ extension StatsForegroundObservable where Self: UIViewController { } func removeWillEnterForegroundObserver() { - NotificationCenter.default.removeObserver(self, - name: UIApplication.willEnterForegroundNotification, - object: nil) + if let enterForegroundObserver { + NotificationCenter.default.removeObserver(enterForegroundObserver) + } + enterForegroundObserver = nil + } + + private var enterForegroundObserver: NSObjectProtocol? { + get { + objc_getAssociatedObject(self, &observerKey) as? NSObjectProtocol + } + set { + objc_setAssociatedObject(self, &observerKey, newValue, .OBJC_ASSOCIATION_RETAIN) + } } } From c7b76d93ebc2fc3520266cb1d08cd3697efc2283 Mon Sep 17 00:00:00 2001 From: Tony Li Date: Tue, 4 Jul 2023 15:40:21 +1200 Subject: [PATCH 03/72] Move notification handler to its own function --- .../ChangeUsernameViewController.swift | 29 ++++++++++++------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Me/My Profile/Change Username/ChangeUsernameViewController.swift b/WordPress/Classes/ViewRelated/Me/My Profile/Change Username/ChangeUsernameViewController.swift index 062ba6d33b29..a40cdea405dd 100644 --- a/WordPress/Classes/ViewRelated/Me/My Profile/Change Username/ChangeUsernameViewController.swift +++ b/WordPress/Classes/ViewRelated/Me/My Profile/Change Username/ChangeUsernameViewController.swift @@ -156,23 +156,30 @@ private extension ChangeUsernameViewController { textField.placeholder = Constants.Alert.confirm NotificationCenter.default.addObserver(forName: UITextField.textDidChangeNotification, object: textField, - queue: .main) {_ in - if let text = textField.text, - !text.isEmpty, - let username = self?.viewModel.selectedUsername, - text == username { - self?.changeUsernameAction?.isEnabled = true - textField.textColor = .success - return - } - self?.changeUsernameAction?.isEnabled = false - textField.textColor = .text + queue: .main) { [weak self] notification in + self?.handleTextDidChangeNotification(notification) } } DDLogInfo("Prompting user for confirmation of change username") return alertController } + @objc func handleTextDidChangeNotification(_ notification: Foundation.Notification) { + guard let textField = notification.object as? UITextField else { + return + } + + if let text = textField.text, + !text.isEmpty, + text == self.viewModel.selectedUsername { + self.changeUsernameAction?.isEnabled = true + textField.textColor = .success + return + } + self.changeUsernameAction?.isEnabled = false + textField.textColor = .text + } + enum Constants { static let actionButtonTitle = NSLocalizedString("Save", comment: "Settings Text save button title") static let username = NSLocalizedString("Username", comment: "The header and main title") From 6d286e50096b480439977d9639193543444ee7e3 Mon Sep 17 00:00:00 2001 From: Tony Li Date: Tue, 4 Jul 2023 15:42:47 +1200 Subject: [PATCH 04/72] Update notification handler function --- .../ChangeUsernameViewController.swift | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Me/My Profile/Change Username/ChangeUsernameViewController.swift b/WordPress/Classes/ViewRelated/Me/My Profile/Change Username/ChangeUsernameViewController.swift index a40cdea405dd..bdf7803e888e 100644 --- a/WordPress/Classes/ViewRelated/Me/My Profile/Change Username/ChangeUsernameViewController.swift +++ b/WordPress/Classes/ViewRelated/Me/My Profile/Change Username/ChangeUsernameViewController.swift @@ -169,15 +169,9 @@ private extension ChangeUsernameViewController { return } - if let text = textField.text, - !text.isEmpty, - text == self.viewModel.selectedUsername { - self.changeUsernameAction?.isEnabled = true - textField.textColor = .success - return - } - self.changeUsernameAction?.isEnabled = false - textField.textColor = .text + let enabled = textField.text?.isEmpty == false && textField.text == self.viewModel.selectedUsername + changeUsernameAction?.isEnabled = enabled + textField.textColor = enabled ? .success : .text } enum Constants { From 6784a648118e53875cc77bbaf442ab87611b30d1 Mon Sep 17 00:00:00 2001 From: Tony Li Date: Tue, 4 Jul 2023 15:51:47 +1200 Subject: [PATCH 05/72] Fix incorrectly unregistered notification observer --- .../ChangeUsernameViewController.swift | 37 ++++++++++++------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Me/My Profile/Change Username/ChangeUsernameViewController.swift b/WordPress/Classes/ViewRelated/Me/My Profile/Change Username/ChangeUsernameViewController.swift index bdf7803e888e..2e5affc71539 100644 --- a/WordPress/Classes/ViewRelated/Me/My Profile/Change Username/ChangeUsernameViewController.swift +++ b/WordPress/Classes/ViewRelated/Me/My Profile/Change Username/ChangeUsernameViewController.swift @@ -15,6 +15,8 @@ class ChangeUsernameViewController: SignupUsernameTableViewController { } return saveItem }() + + private weak var confirmationController: UIAlertController? private var changeUsernameAction: UIAlertAction? init(service: AccountSettingsService, settings: AccountSettings?, completionBlock: @escaping CompletionBlock) { @@ -31,6 +33,13 @@ class ChangeUsernameViewController: SignupUsernameTableViewController { super.viewDidLoad() setupViewModel() setupUI() + + NotificationCenter.default.addObserver( + self, + selector: #selector(handleTextDidChangeNotification(_:)), + name: UITextField.textDidChangeNotification, + object: nil + ) } override func viewWillAppear(_ animated: Bool) { @@ -105,7 +114,9 @@ private extension ChangeUsernameViewController { } func save() { - present(changeUsernameConfirmationPrompt(), animated: true) + let controller = changeUsernameConfirmationPrompt() + present(controller, animated: true) + confirmationController = controller } func changeUsername() { @@ -135,10 +146,7 @@ private extension ChangeUsernameViewController { preferredStyle: .alert) alertController.addAttributeMessage(String(format: Constants.Alert.message, viewModel.selectedUsername), highlighted: viewModel.selectedUsername) - alertController.addCancelActionWithTitle(Constants.Alert.cancel, handler: { [weak alertController] _ in - if let textField = alertController?.textFields?.first { - NotificationCenter.default.removeObserver(textField, name: UITextField.textDidChangeNotification, object: nil) - } + alertController.addCancelActionWithTitle(Constants.Alert.cancel, handler: { _ in DDLogInfo("User cancelled alert") }) changeUsernameAction = alertController.addDefaultActionWithTitle(Constants.Alert.change, handler: { [weak alertController] _ in @@ -148,27 +156,30 @@ private extension ChangeUsernameViewController { return } DDLogInfo("User changes username") - NotificationCenter.default.removeObserver(textField, name: UITextField.textDidChangeNotification, object: nil) self.changeUsername() }) changeUsernameAction?.isEnabled = false - alertController.addTextField { [weak self] textField in + alertController.addTextField { textField in textField.placeholder = Constants.Alert.confirm - NotificationCenter.default.addObserver(forName: UITextField.textDidChangeNotification, - object: textField, - queue: .main) { [weak self] notification in - self?.handleTextDidChangeNotification(notification) - } } DDLogInfo("Prompting user for confirmation of change username") return alertController } @objc func handleTextDidChangeNotification(_ notification: Foundation.Notification) { - guard let textField = notification.object as? UITextField else { + guard notification.name == UITextField.textDidChangeNotification, + let confirmationController, + let textField = notification.object as? UITextField, + confirmationController.textFields?.contains(textField) == true + else { + DDLogInfo("The notification is not sent from the text field within the change username confirmation prompt") return } + // We need to add another condition to check if the text field is the username confirmation text field, if there + // are more than one text field in the prompt. + precondition(confirmationController.textFields?.count == 1, "There should be only one text field in the prompt") + let enabled = textField.text?.isEmpty == false && textField.text == self.viewModel.selectedUsername changeUsernameAction?.isEnabled = enabled textField.textColor = enabled ? .success : .text From 549f96ee9158e90fa4f182b9ecdcfe754662528a Mon Sep 17 00:00:00 2001 From: Tony Li Date: Tue, 4 Jul 2023 15:53:03 +1200 Subject: [PATCH 06/72] Fix a retain cycle between view controller and alert action --- .../Change Username/ChangeUsernameViewController.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Me/My Profile/Change Username/ChangeUsernameViewController.swift b/WordPress/Classes/ViewRelated/Me/My Profile/Change Username/ChangeUsernameViewController.swift index 2e5affc71539..13ac46dfe62d 100644 --- a/WordPress/Classes/ViewRelated/Me/My Profile/Change Username/ChangeUsernameViewController.swift +++ b/WordPress/Classes/ViewRelated/Me/My Profile/Change Username/ChangeUsernameViewController.swift @@ -149,8 +149,9 @@ private extension ChangeUsernameViewController { alertController.addCancelActionWithTitle(Constants.Alert.cancel, handler: { _ in DDLogInfo("User cancelled alert") }) - changeUsernameAction = alertController.addDefaultActionWithTitle(Constants.Alert.change, handler: { [weak alertController] _ in - guard let textField = alertController?.textFields?.first, + changeUsernameAction = alertController.addDefaultActionWithTitle(Constants.Alert.change, handler: { [weak alertController, weak self] _ in + guard let self, let alertController else { return } + guard let textField = alertController.textFields?.first, textField.text == self.viewModel.selectedUsername else { DDLogInfo("Username confirmation failed") return From 17c3f69d05c8b1b3a863df2ce62cc0f82e1246d6 Mon Sep 17 00:00:00 2001 From: Tony Li Date: Tue, 4 Jul 2023 15:59:05 +1200 Subject: [PATCH 07/72] Delete `changeUsernameAction` property --- .../Change Username/ChangeUsernameViewController.swift | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Me/My Profile/Change Username/ChangeUsernameViewController.swift b/WordPress/Classes/ViewRelated/Me/My Profile/Change Username/ChangeUsernameViewController.swift index 13ac46dfe62d..7c899e58b112 100644 --- a/WordPress/Classes/ViewRelated/Me/My Profile/Change Username/ChangeUsernameViewController.swift +++ b/WordPress/Classes/ViewRelated/Me/My Profile/Change Username/ChangeUsernameViewController.swift @@ -17,7 +17,6 @@ class ChangeUsernameViewController: SignupUsernameTableViewController { }() private weak var confirmationController: UIAlertController? - private var changeUsernameAction: UIAlertAction? init(service: AccountSettingsService, settings: AccountSettings?, completionBlock: @escaping CompletionBlock) { self.viewModel = ChangeUsernameViewModel(service: service, settings: settings) @@ -149,7 +148,7 @@ private extension ChangeUsernameViewController { alertController.addCancelActionWithTitle(Constants.Alert.cancel, handler: { _ in DDLogInfo("User cancelled alert") }) - changeUsernameAction = alertController.addDefaultActionWithTitle(Constants.Alert.change, handler: { [weak alertController, weak self] _ in + let action = alertController.addDefaultActionWithTitle(Constants.Alert.change, handler: { [weak alertController, weak self] _ in guard let self, let alertController else { return } guard let textField = alertController.textFields?.first, textField.text == self.viewModel.selectedUsername else { @@ -159,7 +158,7 @@ private extension ChangeUsernameViewController { DDLogInfo("User changes username") self.changeUsername() }) - changeUsernameAction?.isEnabled = false + action.isEnabled = false alertController.addTextField { textField in textField.placeholder = Constants.Alert.confirm } @@ -181,6 +180,10 @@ private extension ChangeUsernameViewController { // are more than one text field in the prompt. precondition(confirmationController.textFields?.count == 1, "There should be only one text field in the prompt") + let actions = confirmationController.actions.filter({ $0.title == Constants.Alert.change }) + precondition(actions.count == 1, "More than one 'Change username' action found") + let changeUsernameAction = actions.first + let enabled = textField.text?.isEmpty == false && textField.text == self.viewModel.selectedUsername changeUsernameAction?.isEnabled = enabled textField.textColor = enabled ? .success : .text From 69b707af3e89f66a0e2da03ca5cac3eb9a5f5346 Mon Sep 17 00:00:00 2001 From: Tony Li Date: Wed, 5 Jul 2023 10:13:09 +1200 Subject: [PATCH 08/72] Only observe text field change notification from the alert --- .../ChangeUsernameViewController.swift | 45 ++++++++++++------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Me/My Profile/Change Username/ChangeUsernameViewController.swift b/WordPress/Classes/ViewRelated/Me/My Profile/Change Username/ChangeUsernameViewController.swift index 7c899e58b112..8dd57cb91311 100644 --- a/WordPress/Classes/ViewRelated/Me/My Profile/Change Username/ChangeUsernameViewController.swift +++ b/WordPress/Classes/ViewRelated/Me/My Profile/Change Username/ChangeUsernameViewController.swift @@ -1,3 +1,4 @@ +import Combine import WordPressAuthenticator class ChangeUsernameViewController: SignupUsernameTableViewController { @@ -16,7 +17,12 @@ class ChangeUsernameViewController: SignupUsernameTableViewController { return saveItem }() - private weak var confirmationController: UIAlertController? + private var confirmationTextObserver: AnyCancellable? + private weak var confirmationController: UIAlertController? { + didSet { + observeConfirmationTextField() + } + } init(service: AccountSettingsService, settings: AccountSettings?, completionBlock: @escaping CompletionBlock) { self.viewModel = ChangeUsernameViewModel(service: service, settings: settings) @@ -32,13 +38,6 @@ class ChangeUsernameViewController: SignupUsernameTableViewController { super.viewDidLoad() setupViewModel() setupUI() - - NotificationCenter.default.addObserver( - self, - selector: #selector(handleTextDidChangeNotification(_:)), - name: UITextField.textDidChangeNotification, - object: nil - ) } override func viewWillAppear(_ animated: Bool) { @@ -166,19 +165,35 @@ private extension ChangeUsernameViewController { return alertController } - @objc func handleTextDidChangeNotification(_ notification: Foundation.Notification) { - guard notification.name == UITextField.textDidChangeNotification, - let confirmationController, - let textField = notification.object as? UITextField, - confirmationController.textFields?.contains(textField) == true + func observeConfirmationTextField() { + confirmationTextObserver?.cancel() + confirmationTextObserver = nil + + guard let confirmationController, + let textField = confirmationController.textFields?.first else { - DDLogInfo("The notification is not sent from the text field within the change username confirmation prompt") return } // We need to add another condition to check if the text field is the username confirmation text field, if there // are more than one text field in the prompt. - precondition(confirmationController.textFields?.count == 1, "There should be only one text field in the prompt") + assert(confirmationController.textFields?.count == 1, "There should be only one text field in the prompt") + + confirmationTextObserver = NotificationCenter.default + .publisher(for: UITextField.textDidChangeNotification, object: textField) + .sink(receiveValue: { [weak self] in + self?.handleTextDidChangeNotification($0) + }) + } + + func handleTextDidChangeNotification(_ notification: Foundation.Notification) { + guard notification.name == UITextField.textDidChangeNotification, + let confirmationController, + let textField = notification.object as? UITextField + else { + DDLogInfo("The notification is not sent from the text field within the change username confirmation prompt") + return + } let actions = confirmationController.actions.filter({ $0.title == Constants.Alert.change }) precondition(actions.count == 1, "More than one 'Change username' action found") From 48b399c102110ba06c383bad5f2c55eca70c4691 Mon Sep 17 00:00:00 2001 From: Tony Li Date: Wed, 5 Jul 2023 13:18:06 +1200 Subject: [PATCH 09/72] Address some code style issues --- .../ViewRelated/System/Notices/NoticePresenter.swift | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/WordPress/Classes/ViewRelated/System/Notices/NoticePresenter.swift b/WordPress/Classes/ViewRelated/System/Notices/NoticePresenter.swift index a745319309cd..33d80c8c0616 100644 --- a/WordPress/Classes/ViewRelated/System/Notices/NoticePresenter.swift +++ b/WordPress/Classes/ViewRelated/System/Notices/NoticePresenter.swift @@ -102,8 +102,8 @@ class NoticePresenter { private func listenToKeyboardEvents() { NotificationCenter.default .publisher(for: UIResponder.keyboardWillShowNotification) - .sink { [weak self] (notification) in - guard let self = self, + .sink { [weak self] notification in + guard let self, let userInfo = notification.userInfo, let keyboardFrameValue = userInfo[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue, let durationValue = userInfo[UIResponder.keyboardAnimationDurationUserInfoKey] as? NSNumber else { @@ -122,12 +122,13 @@ class NoticePresenter { }) } .store(in: ¬ificationObservers) + NotificationCenter.default .publisher(for: UIResponder.keyboardWillHideNotification) - .sink { [weak self] (notification) in + .sink { [weak self] notification in self?.currentKeyboardPresentation = .notPresent - guard let self = self, + guard let self, let currentContainer = self.currentNoticePresentation?.containerView, let userInfo = notification.userInfo, let durationValue = userInfo[UIResponder.keyboardAnimationDurationUserInfoKey] as? NSNumber else { From 66fe483570ed8b570ea1c26a3fa6c601cba26868 Mon Sep 17 00:00:00 2001 From: Tony Li Date: Wed, 5 Jul 2023 13:45:23 +1200 Subject: [PATCH 10/72] Use Combine API to observe notifications in WPLoggingStack --- .../Utility/Logging/WPCrashLoggingProvider.swift | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/WordPress/Classes/Utility/Logging/WPCrashLoggingProvider.swift b/WordPress/Classes/Utility/Logging/WPCrashLoggingProvider.swift index 43770b7f486a..17582673230c 100644 --- a/WordPress/Classes/Utility/Logging/WPCrashLoggingProvider.swift +++ b/WordPress/Classes/Utility/Logging/WPCrashLoggingProvider.swift @@ -1,4 +1,5 @@ import UIKit +import Combine import AutomatticTracks /// A wrapper around the logging stack – provides shared initialization and configuration for Tracks Crash and Event Logging @@ -12,6 +13,8 @@ struct WPLoggingStack { private let eventLoggingDataProvider = EventLoggingDataProvider.fromDDFileLogger(WPLogger.shared().fileLogger) private let eventLoggingDelegate = EventLoggingDelegate() + private let enterForegroundObserver: AnyCancellable + init() { let eventLogging = EventLogging(dataSource: eventLoggingDataProvider, delegate: eventLoggingDelegate) @@ -20,18 +23,16 @@ struct WPLoggingStack { self.crashLogging = CrashLogging(dataProvider: WPCrashLoggingDataProvider(), eventLogging: eventLogging) /// Upload any remaining files any time the app becomes active - let willEnterForeground = UIApplication.willEnterForegroundNotification - NotificationCenter.default.addObserver(forName: willEnterForeground, object: nil, queue: nil, using: self.willEnterForeground) + enterForegroundObserver = NotificationCenter.default.publisher(for: UIApplication.willEnterForegroundNotification) + .sink(receiveValue: { [eventLogging] _ in + eventLogging.uploadNextLogFileIfNeeded() + DDLogDebug("📜 Resumed encrypted log upload queue due to app entering foreground") + }) } func start() throws { _ = try crashLogging.start() } - - private func willEnterForeground(note: Foundation.Notification) { - self.eventLogging.uploadNextLogFileIfNeeded() - DDLogDebug("📜 Resumed encrypted log upload queue due to app entering foreground") - } } struct WPCrashLoggingDataProvider: CrashLoggingDataProvider { From 8ee703f47940d23070c649dc0409a2a9ad357d65 Mon Sep 17 00:00:00 2001 From: Tony Li Date: Wed, 5 Jul 2023 16:49:55 +1200 Subject: [PATCH 11/72] Add warnings about incorrect `performQuery` usages --- .../Classes/Utility/CoreDataHelper.swift | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/WordPress/Classes/Utility/CoreDataHelper.swift b/WordPress/Classes/Utility/CoreDataHelper.swift index afea8bc21751..c241568d2eec 100644 --- a/WordPress/Classes/Utility/CoreDataHelper.swift +++ b/WordPress/Classes/Utility/CoreDataHelper.swift @@ -196,6 +196,8 @@ extension ContextManager.ContextManagerError: LocalizedError, CustomDebugStringC extension CoreDataStack { /// Perform a query using the `mainContext` and return the result. + /// + /// - Warning: Do not return `NSManagedObject` instances from the closure. func performQuery(_ block: @escaping (NSManagedObjectContext) -> T) -> T { var value: T! = nil self.mainContext.performAndWait { @@ -360,3 +362,69 @@ extension CoreDataStack { try ContextManager.migrateDataModelsIfNecessary(storeURL: databaseLocation, objectModel: objectModel) } } + +/// This extension declares many `performQuery` usages that may introduce Core Data concurrency issues. +/// +/// The context object used by the `performQuery` function is opaque to the caller. The caller should not assume what +/// the context object is, nor the context queue type (the main queue or a background queue). That means the caller +/// does not have enough information to guarantee safe access to the returned `NSManagedObject` instances. +/// +/// The closure passed to the `performQuery` function should use the context to query objects and return none Core Data +/// types. Here is an example of how it should be used. +/// +/// ``` +/// // Wrong: +/// let account = coreDataStack.performQuery { context in +/// return Account.lookUp(in: context) +/// } +/// let name = account.username +/// +/// // Right: +/// let name = coreDataStack.performQuery { context in +/// let account = Account.lookUp(in: context) +/// return account.username +/// } +/// ``` +extension CoreDataStack { + @available(*, deprecated, message: "Returning `NSManagedObject` instances may introduce Core Data concurrency issues.") + func performQuery(_ block: @escaping (NSManagedObjectContext) -> T) -> T where T: NSManagedObject { + mainContext.performAndWait { [mainContext] in + block(mainContext) + } + } + + @available(*, deprecated, message: "Returning `NSManagedObject` instances may introduce Core Data concurrency issues.") + func performQuery(_ block: @escaping (NSManagedObjectContext) -> T?) -> T? where T: NSManagedObject { + mainContext.performAndWait { [mainContext] in + block(mainContext) + } + } + + @available(*, deprecated, message: "Returning `NSManagedObject` instances may introduce Core Data concurrency issues.") + func performQuery(_ block: @escaping (NSManagedObjectContext) -> T) -> T where T: Sequence, T.Element: NSManagedObject { + mainContext.performAndWait { [mainContext] in + block(mainContext) + } + } + + @available(*, deprecated, message: "Returning `NSManagedObject` instances may introduce Core Data concurrency issues.") + func performQuery(_ block: @escaping (NSManagedObjectContext) -> T?) -> T? where T: Sequence, T.Element: NSManagedObject { + mainContext.performAndWait { [mainContext] in + block(mainContext) + } + } + + @available(*, deprecated, message: "Returning `NSManagedObject` instances may introduce Core Data concurrency issues.") + func performQuery(_ block: @escaping (NSManagedObjectContext) -> Result) -> Result where T: NSManagedObject, E: Error { + mainContext.performAndWait { [mainContext] in + block(mainContext) + } + } + + @available(*, deprecated, message: "Returning `NSManagedObject` instances may introduce Core Data concurrency issues.") + func performQuery(_ block: @escaping (NSManagedObjectContext) -> Result?) -> Result? where T: NSManagedObject, E: Error { + mainContext.performAndWait { [mainContext] in + block(mainContext) + } + } +} From e44432eb019fc263ab39a51fdc6a75f86ab31dd9 Mon Sep 17 00:00:00 2001 From: Tony Li Date: Thu, 6 Jul 2023 10:20:08 +1200 Subject: [PATCH 12/72] Fix memory leaks on viewing a post from a notification --- .../Reader/Comments/ReaderCommentsFollowPresenter.swift | 2 +- .../Detail/Views/ReaderDetailCommentsTableViewDelegate.swift | 2 +- .../Reader/Detail/Views/ReaderDetailHeaderView.swift | 4 ++-- .../Reader/Detail/Views/ReaderDetailLikesView.swift | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Reader/Comments/ReaderCommentsFollowPresenter.swift b/WordPress/Classes/ViewRelated/Reader/Comments/ReaderCommentsFollowPresenter.swift index d3d24c21c008..6736584f10a2 100644 --- a/WordPress/Classes/ViewRelated/Reader/Comments/ReaderCommentsFollowPresenter.swift +++ b/WordPress/Classes/ViewRelated/Reader/Comments/ReaderCommentsFollowPresenter.swift @@ -15,7 +15,7 @@ class ReaderCommentsFollowPresenter: NSObject { private let post: ReaderPost private weak var delegate: ReaderCommentsFollowPresenterDelegate? - private let presentingViewController: UIViewController + private unowned let presentingViewController: UIViewController private let followCommentsService: FollowCommentsService? // MARK: - Initialization diff --git a/WordPress/Classes/ViewRelated/Reader/Detail/Views/ReaderDetailCommentsTableViewDelegate.swift b/WordPress/Classes/ViewRelated/Reader/Detail/Views/ReaderDetailCommentsTableViewDelegate.swift index 4cf701ed5f16..362e679b03b8 100644 --- a/WordPress/Classes/ViewRelated/Reader/Detail/Views/ReaderDetailCommentsTableViewDelegate.swift +++ b/WordPress/Classes/ViewRelated/Reader/Detail/Views/ReaderDetailCommentsTableViewDelegate.swift @@ -7,7 +7,7 @@ class ReaderDetailCommentsTableViewDelegate: NSObject, UITableViewDataSource, UI private(set) var totalComments = 0 private var post: ReaderPost? - private var presentingViewController: UIViewController? + private weak var presentingViewController: UIViewController? private weak var buttonDelegate: BorderedButtonTableViewCellDelegate? private(set) var headerView: ReaderDetailCommentsHeader? var followButtonTappedClosure: (() ->Void)? diff --git a/WordPress/Classes/ViewRelated/Reader/Detail/Views/ReaderDetailHeaderView.swift b/WordPress/Classes/ViewRelated/Reader/Detail/Views/ReaderDetailHeaderView.swift index e568c03ecef8..7109c297eb0e 100644 --- a/WordPress/Classes/ViewRelated/Reader/Detail/Views/ReaderDetailHeaderView.swift +++ b/WordPress/Classes/ViewRelated/Reader/Detail/Views/ReaderDetailHeaderView.swift @@ -1,7 +1,7 @@ import UIKit import AutomatticTracks -protocol ReaderDetailHeaderViewDelegate { +protocol ReaderDetailHeaderViewDelegate: AnyObject { func didTapBlogName() func didTapMenuButton(_ sender: UIView) func didTapHeaderAvatar() @@ -43,7 +43,7 @@ class ReaderDetailHeaderView: UIStackView, NibLoadable { /// Any interaction with the header is sent to the delegate /// - var delegate: ReaderDetailHeaderViewDelegate? + weak var delegate: ReaderDetailHeaderViewDelegate? func configure(for post: ReaderPost) { self.post = post diff --git a/WordPress/Classes/ViewRelated/Reader/Detail/Views/ReaderDetailLikesView.swift b/WordPress/Classes/ViewRelated/Reader/Detail/Views/ReaderDetailLikesView.swift index 6e220b113af7..be506522818d 100644 --- a/WordPress/Classes/ViewRelated/Reader/Detail/Views/ReaderDetailLikesView.swift +++ b/WordPress/Classes/ViewRelated/Reader/Detail/Views/ReaderDetailLikesView.swift @@ -1,6 +1,6 @@ import UIKit -protocol ReaderDetailLikesViewDelegate { +protocol ReaderDetailLikesViewDelegate: AnyObject { func didTapLikesView() } @@ -13,7 +13,7 @@ class ReaderDetailLikesView: UIView, NibLoadable { @IBOutlet private weak var selfAvatarImageView: CircularImageView! static let maxAvatarsDisplayed = 5 - var delegate: ReaderDetailLikesViewDelegate? + weak var delegate: ReaderDetailLikesViewDelegate? /// Stores the number of total likes _without_ adding the like from self. private var totalLikes: Int = 0 From 6472ccd095667a40e47eab9abb3882f1942f5977 Mon Sep 17 00:00:00 2001 From: kean Date: Wed, 5 Jul 2023 18:39:58 -0400 Subject: [PATCH 13/72] Show campaign details page from dashboard --- .../Blaze/DashboardBlazeCampaignsCardView.swift | 16 ++++++++++++++-- .../Blaze/DashboardBlazeCardCellViewModel.swift | 6 +++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Blaze/DashboardBlazeCampaignsCardView.swift b/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Blaze/DashboardBlazeCampaignsCardView.swift index a80debbd3238..3db39894eb7c 100644 --- a/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Blaze/DashboardBlazeCampaignsCardView.swift +++ b/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Blaze/DashboardBlazeCampaignsCardView.swift @@ -26,6 +26,7 @@ final class DashboardBlazeCampaignsCardView: UIView { private var blog: Blog? private weak var presentingViewController: BlogDashboardViewController? + private var campaign: BlazeCampaign? // MARK: - Initializers @@ -69,6 +70,10 @@ final class DashboardBlazeCampaignsCardView: UIView { frameView.onHeaderTap = { [weak self] in self?.showCampaignList() } + + campaignView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(campainViewTapped))) + campaignView.isAccessibilityElement = true + campaignView.accessibilityTraits = .allowsDirectInteraction } private func showCampaignList() { @@ -82,15 +87,21 @@ final class DashboardBlazeCampaignsCardView: UIView { } } + @objc private func campainViewTapped() { + guard let presentingViewController, let blog, let campaign else { return } + BlazeFlowCoordinator.presentBlazeCampaignDetails(in: presentingViewController, source: .dashboardCard, blog: blog, campaignID: campaign.campaignID) + } + @objc private func buttonCreateCampaignTapped() { guard let presentingViewController, let blog else { return } BlazeEventsTracker.trackEntryPointTapped(for: .dashboardCard) BlazeFlowCoordinator.presentBlaze(in: presentingViewController, source: .dashboardCard, blog: blog) } - func configure(blog: Blog, viewController: BlogDashboardViewController?, campaign: BlazeCampaignViewModel) { + func configure(blog: Blog, viewController: BlogDashboardViewController?, campaign: BlazeCampaign) { self.blog = blog self.presentingViewController = viewController + self.campaign = campaign frameView.addMoreMenu(items: [ UIMenu(options: .displayInline, children: [ @@ -101,7 +112,8 @@ final class DashboardBlazeCampaignsCardView: UIView { ]) ], card: .blaze) - campaignView.configure(with: campaign, blog: blog) + let viewModel = BlazeCampaignViewModel(campaign: campaign) + campaignView.configure(with: viewModel, blog: blog) } } diff --git a/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Blaze/DashboardBlazeCardCellViewModel.swift b/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Blaze/DashboardBlazeCardCellViewModel.swift index 7360fdbdc6d2..fecbb50eaac3 100644 --- a/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Blaze/DashboardBlazeCardCellViewModel.swift +++ b/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Blaze/DashboardBlazeCardCellViewModel.swift @@ -14,7 +14,7 @@ final class DashboardBlazeCardCellViewModel { /// Showing "Promote you content with Blaze" promo card. case promo /// Showing the latest Blaze campaign. - case campaign(BlazeCampaignViewModel) + case campaign(BlazeCampaign) } var onRefresh: ((DashboardBlazeCardCellViewModel) -> Void)? @@ -31,7 +31,7 @@ final class DashboardBlazeCardCellViewModel { if isBlazeCampaignsFlagEnabled(), let blogID = blog.dotComID?.intValue, let campaign = store.getBlazeCampaign(forBlogID: blogID) { - self.state = .campaign(BlazeCampaignViewModel(campaign: campaign)) + self.state = .campaign(campaign) } NotificationCenter.default.addObserver(self, selector: #selector(refresh), name: .blazeCampaignCreated, object: nil) @@ -57,7 +57,7 @@ final class DashboardBlazeCardCellViewModel { store.setBlazeCampaign(campaign, forBlogID: blogID) } if let campaign { - state = .campaign(BlazeCampaignViewModel(campaign: campaign)) + state = .campaign(campaign) } else { state = .promo } From 12554eaf066b819e0180c144fb314e6187d1eb1d Mon Sep 17 00:00:00 2001 From: Tony Li Date: Thu, 6 Jul 2023 10:50:16 +1200 Subject: [PATCH 14/72] Update a code comment Co-authored-by: Paul Von Schrottky <1898325+guarani@users.noreply.github.com> --- WordPress/Classes/Utility/CoreDataHelper.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPress/Classes/Utility/CoreDataHelper.swift b/WordPress/Classes/Utility/CoreDataHelper.swift index c241568d2eec..095ebcb8aa94 100644 --- a/WordPress/Classes/Utility/CoreDataHelper.swift +++ b/WordPress/Classes/Utility/CoreDataHelper.swift @@ -369,7 +369,7 @@ extension CoreDataStack { /// the context object is, nor the context queue type (the main queue or a background queue). That means the caller /// does not have enough information to guarantee safe access to the returned `NSManagedObject` instances. /// -/// The closure passed to the `performQuery` function should use the context to query objects and return none Core Data +/// The closure passed to the `performQuery` function should use the context to query objects and return non- Core Data /// types. Here is an example of how it should be used. /// /// ``` From 6284867beaeb0c310cbd020748175dc943eae6fc Mon Sep 17 00:00:00 2001 From: kean Date: Wed, 5 Jul 2023 18:59:24 -0400 Subject: [PATCH 15/72] Make dashboard campaign card accessible --- .../Cards/Blaze/DashboardBlazeCampaignView.swift | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Blaze/DashboardBlazeCampaignView.swift b/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Blaze/DashboardBlazeCampaignView.swift index 84ba63790dac..db9ba0ac416c 100644 --- a/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Blaze/DashboardBlazeCampaignView.swift +++ b/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Blaze/DashboardBlazeCampaignView.swift @@ -73,6 +73,8 @@ final class DashboardBlazeCampaignView: UIView { if viewModel.isShowingStats { makeStatsViews(for: viewModel).forEach(statsView.addArrangedSubview) } + + enableVoiceOver(with: viewModel) } private func makeStatsViews(for viewModel: BlazeCampaignViewModel) -> [UIView] { @@ -84,6 +86,16 @@ final class DashboardBlazeCampaignView: UIView { return [impressionsView, clicksView] } + + private func enableVoiceOver(with viewModel: BlazeCampaignViewModel) { + var accessibilityLabel = "\(viewModel.title), \(viewModel.status.title)" + if viewModel.isShowingStats { + accessibilityLabel += ", \(Strings.impressions) \(viewModel.impressions), \(Strings.clicks) \(viewModel.clicks)" + } + self.isAccessibilityElement = true + self.accessibilityLabel = accessibilityLabel + self.accessibilityTraits = .allowsDirectInteraction + } } private extension DashboardBlazeCampaignView { From 0ae7ff802588af45108fd8a638913210532a0ff4 Mon Sep 17 00:00:00 2001 From: kean Date: Wed, 5 Jul 2023 19:20:02 -0400 Subject: [PATCH 16/72] Fix deprecation warning --- .../DashboardBlazeCampaignsCardView.swift | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Blaze/DashboardBlazeCampaignsCardView.swift b/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Blaze/DashboardBlazeCampaignsCardView.swift index 3db39894eb7c..b9a235af3567 100644 --- a/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Blaze/DashboardBlazeCampaignsCardView.swift +++ b/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Blaze/DashboardBlazeCampaignsCardView.swift @@ -14,13 +14,19 @@ final class DashboardBlazeCampaignsCardView: UIView { private lazy var createCampaignButton: UIButton = { let button = UIButton() button.translatesAutoresizingMaskIntoConstraints = false + button.configuration = { + var configuration = UIButton.Configuration.plain() + configuration.attributedTitle = { + var string = AttributedString(Strings.createCampaignButton) + string.font = WPStyleGuide.fontForTextStyle(.callout, fontWeight: .bold) + string.foregroundColor = UIColor.primary + return string + }() + configuration.contentInsets = Constants.createCampaignInsets + return configuration + }() button.contentHorizontalAlignment = .leading - button.setTitle(Strings.createCampaignButton, for: .normal) button.addTarget(self, action: #selector(buttonCreateCampaignTapped), for: .touchUpInside) - button.titleLabel?.font = WPStyleGuide.fontForTextStyle(.callout, fontWeight: .bold) - button.titleLabel?.adjustsFontForContentSizeCategory = true - button.setTitleColor(UIColor.primary, for: .normal) - button.contentEdgeInsets = Constants.createCampaignInsets return button }() @@ -126,6 +132,6 @@ private extension DashboardBlazeCampaignsCardView { enum Constants { static let campaignViewInsets = UIEdgeInsets(top: 16, left: 16, bottom: 16, right: 16) - static let createCampaignInsets = UIEdgeInsets(top: 16, left: 16, bottom: 8, right: 16) + static let createCampaignInsets = NSDirectionalEdgeInsets(top: 16, leading: 16, bottom: 8, trailing: 16) } } From 19c768213ff2e8d70269451f9c93d7118c14da01 Mon Sep 17 00:00:00 2001 From: Tony Li Date: Thu, 6 Jul 2023 11:26:22 +1200 Subject: [PATCH 17/72] Fix memory leaks in ReaderStreamViewController --- .../Classes/ViewRelated/Reader/ReaderListStreamHeader.swift | 2 +- .../ViewRelated/Reader/ReaderRecommendedSiteCardCell.swift | 4 ++-- .../Reader/ReaderSearchSuggestionsViewController.swift | 4 ++-- .../Classes/ViewRelated/Reader/ReaderSiteStreamHeader.swift | 2 +- .../Classes/ViewRelated/Reader/ReaderStreamHeader.swift | 6 +++--- .../Classes/ViewRelated/Reader/ReaderTagStreamHeader.swift | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Reader/ReaderListStreamHeader.swift b/WordPress/Classes/ViewRelated/Reader/ReaderListStreamHeader.swift index 1f2659a9bc76..9529a374a07d 100644 --- a/WordPress/Classes/ViewRelated/Reader/ReaderListStreamHeader.swift +++ b/WordPress/Classes/ViewRelated/Reader/ReaderListStreamHeader.swift @@ -7,7 +7,7 @@ import WordPressShared.WPStyleGuide @IBOutlet fileprivate weak var detailLabel: UILabel! // Required by ReaderStreamHeader protocol. - open var delegate: ReaderStreamHeaderDelegate? + open weak var delegate: ReaderStreamHeaderDelegate? // MARK: - Lifecycle Methods diff --git a/WordPress/Classes/ViewRelated/Reader/ReaderRecommendedSiteCardCell.swift b/WordPress/Classes/ViewRelated/Reader/ReaderRecommendedSiteCardCell.swift index 5f59ecec911c..3c30c5a570fe 100644 --- a/WordPress/Classes/ViewRelated/Reader/ReaderRecommendedSiteCardCell.swift +++ b/WordPress/Classes/ViewRelated/Reader/ReaderRecommendedSiteCardCell.swift @@ -9,7 +9,7 @@ class ReaderRecommendedSiteCardCell: UITableViewCell { @IBOutlet weak var descriptionLabel: UILabel! @IBOutlet weak var infoTrailingConstraint: NSLayoutConstraint! - var delegate: ReaderRecommendedSitesCardCellDelegate? + weak var delegate: ReaderRecommendedSitesCardCellDelegate? override func awakeFromNib() { super.awakeFromNib() @@ -110,6 +110,6 @@ class ReaderRecommendedSiteCardCell: UITableViewCell { } } -protocol ReaderRecommendedSitesCardCellDelegate { +protocol ReaderRecommendedSitesCardCellDelegate: AnyObject { func handleFollowActionForCell(_ cell: ReaderRecommendedSiteCardCell) } diff --git a/WordPress/Classes/ViewRelated/Reader/ReaderSearchSuggestionsViewController.swift b/WordPress/Classes/ViewRelated/Reader/ReaderSearchSuggestionsViewController.swift index c8483a61d375..3169d407021b 100644 --- a/WordPress/Classes/ViewRelated/Reader/ReaderSearchSuggestionsViewController.swift +++ b/WordPress/Classes/ViewRelated/Reader/ReaderSearchSuggestionsViewController.swift @@ -5,7 +5,7 @@ import WordPressShared /// Defines methods that a delegate should implement for clearing suggestions /// and for responding to a selected suggestion. /// -protocol ReaderSearchSuggestionsDelegate { +protocol ReaderSearchSuggestionsDelegate: AnyObject { func searchSuggestionsController(_ controller: ReaderSearchSuggestionsViewController, selectedItem: String) } @@ -28,7 +28,7 @@ class ReaderSearchSuggestionsViewController: UIViewController { } @objc var tableViewHandler: WPTableViewHandler! - var delegate: ReaderSearchSuggestionsDelegate? + weak var delegate: ReaderSearchSuggestionsDelegate? @objc let cellIdentifier = "CellIdentifier" @objc let rowAndButtonHeight = CGFloat(44.0) diff --git a/WordPress/Classes/ViewRelated/Reader/ReaderSiteStreamHeader.swift b/WordPress/Classes/ViewRelated/Reader/ReaderSiteStreamHeader.swift index 71cad564149b..b4437e4e2a05 100644 --- a/WordPress/Classes/ViewRelated/Reader/ReaderSiteStreamHeader.swift +++ b/WordPress/Classes/ViewRelated/Reader/ReaderSiteStreamHeader.swift @@ -36,7 +36,7 @@ fileprivate func > (lhs: T?, rhs: T?) -> Bool { @IBOutlet fileprivate weak var descriptionLabel: UILabel! @IBOutlet fileprivate weak var descriptionLabelTopConstraint: NSLayoutConstraint! - open var delegate: ReaderStreamHeaderDelegate? + open weak var delegate: ReaderStreamHeaderDelegate? fileprivate var defaultBlavatar = "blavatar-default" // MARK: - Lifecycle Methods diff --git a/WordPress/Classes/ViewRelated/Reader/ReaderStreamHeader.swift b/WordPress/Classes/ViewRelated/Reader/ReaderStreamHeader.swift index d970a7c02cbf..137cbc363037 100644 --- a/WordPress/Classes/ViewRelated/Reader/ReaderStreamHeader.swift +++ b/WordPress/Classes/ViewRelated/Reader/ReaderStreamHeader.swift @@ -1,11 +1,11 @@ import Foundation -public protocol ReaderStreamHeaderDelegate: NSObjectProtocol { +@objc public protocol ReaderStreamHeaderDelegate { func handleFollowActionForHeader(_ header: ReaderStreamHeader, completion: @escaping () -> Void) } -public protocol ReaderStreamHeader: NSObjectProtocol { - var delegate: ReaderStreamHeaderDelegate? {get set} +@objc public protocol ReaderStreamHeader { + weak var delegate: ReaderStreamHeaderDelegate? {get set} func enableLoggedInFeatures(_ enable: Bool) func configureHeader(_ topic: ReaderAbstractTopic) } diff --git a/WordPress/Classes/ViewRelated/Reader/ReaderTagStreamHeader.swift b/WordPress/Classes/ViewRelated/Reader/ReaderTagStreamHeader.swift index 0ce723d11d09..55278fcbe80f 100644 --- a/WordPress/Classes/ViewRelated/Reader/ReaderTagStreamHeader.swift +++ b/WordPress/Classes/ViewRelated/Reader/ReaderTagStreamHeader.swift @@ -5,7 +5,7 @@ import WordPressShared @IBOutlet fileprivate weak var titleLabel: UILabel! @IBOutlet fileprivate weak var followButton: UIButton! - open var delegate: ReaderStreamHeaderDelegate? + open weak var delegate: ReaderStreamHeaderDelegate? // MARK: - Lifecycle Methods open override func awakeFromNib() { From 2a9ece2b5b0393d8639e7033ecc8bf240320e980 Mon Sep 17 00:00:00 2001 From: kean Date: Fri, 23 Jun 2023 18:14:28 -0400 Subject: [PATCH 18/72] Add improved feature flag picker --- .../FeatureFlagOverrideStore.swift | 4 + .../App Settings/DebugFeatureFlagsView.swift | 175 ++++++++++++++++++ .../DebugMenuViewController.swift | 39 +--- WordPress/WordPress.xcodeproj/project.pbxproj | 6 + 4 files changed, 194 insertions(+), 30 deletions(-) create mode 100644 WordPress/Classes/ViewRelated/Me/App Settings/DebugFeatureFlagsView.swift diff --git a/WordPress/Classes/Utility/BuildInformation/FeatureFlagOverrideStore.swift b/WordPress/Classes/Utility/BuildInformation/FeatureFlagOverrideStore.swift index 0b9b458757e5..fee62cdf6fdb 100644 --- a/WordPress/Classes/Utility/BuildInformation/FeatureFlagOverrideStore.swift +++ b/WordPress/Classes/Utility/BuildInformation/FeatureFlagOverrideStore.swift @@ -45,6 +45,10 @@ struct FeatureFlagOverrideStore { } } + func removeOverride(for featureFlag: OverridableFlag) { + store.removeObject(forKey: key(for: featureFlag)) + } + /// - returns: The overridden value for the specified feature flag, if one exists. /// If no override exists, returns `nil`. /// diff --git a/WordPress/Classes/ViewRelated/Me/App Settings/DebugFeatureFlagsView.swift b/WordPress/Classes/ViewRelated/Me/App Settings/DebugFeatureFlagsView.swift new file mode 100644 index 000000000000..da39df12e583 --- /dev/null +++ b/WordPress/Classes/ViewRelated/Me/App Settings/DebugFeatureFlagsView.swift @@ -0,0 +1,175 @@ +import SwiftUI + +struct DebugFeatureFlagsView: View { + @StateObject private var viewModel = DebugFeatureFlagsViewModel() + + var body: some View { + List { + sections + } + .tint(Color(UIColor.jetpackGreen)) + .listStyle(.grouped) + .searchable(text: $viewModel.filterTerm) + .navigationTitle(navigationTitle) + .navigationBarTitleDisplayMode(.inline) + .apply(addToolbarTitleMenu) + .toolbar { + ToolbarItem(placement: .navigationBarTrailing) { + Menu(content: { + Button("Enable All Flags", action: viewModel.enableAllFlags) + Button("Reset All Flags", role: .destructive, action: viewModel.reset) + }, label: { + Image(systemName: "ellipsis.circle") + }) + } + } + } + + @ViewBuilder + private var sections: some View { + let remoteFlags = viewModel.getRemoteFeatureFlags() + if !remoteFlags.isEmpty { + Section("Remote Feature Flags") { + ForEach(remoteFlags, id: \.self) { flag in + makeToggle(flag.description, isOn: viewModel.binding(for: flag), isOverriden: viewModel.isOverriden(flag)) + } + } + } + + let localFlags = viewModel.getLocalFeatureFlags() + if !localFlags.isEmpty { + Section("Local Feature Flags") { + ForEach(localFlags, id: \.self) { flag in + makeToggle(flag.description, isOn: viewModel.binding(for: flag), isOverriden: viewModel.isOverriden(flag)) + } + } + } + } + + private func makeToggle(_ title: String, isOn: Binding, isOverriden: Bool) -> some View { + Toggle(isOn: isOn) { + VStack(alignment: .leading) { + Text(title) + if isOverriden { + Text("Overriden") + .font(.subheadline) + .foregroundColor(.secondary) + } + } + } + } + + @ViewBuilder + func addToolbarTitleMenu(_ view: T) -> some View { + if #available(iOS 16, *) { + view.toolbarTitleMenu { + Picker("Filter", selection: $viewModel.filter) { + Text("Feature Flags (All)").tag(DebugFeatureFlagFilter.all) + Text("Remote Feature Flags").tag(DebugFeatureFlagFilter.remote) + Text("Local Feature Flags").tag(DebugFeatureFlagFilter.local) + }.pickerStyle(.inline) + } + } else { + view + } + } + + private var navigationTitle: String { + switch viewModel.filter { + case .all: return "Feature Flags" + case .remote: return "Remote Feature Flags" + case .local: return "Local Feature Flags" + } + } +} + +private final class DebugFeatureFlagsViewModel: ObservableObject { + private let remoteStore = RemoteFeatureFlagStore() + private let overrideStore = FeatureFlagOverrideStore() + + private let allRemoteFlags = RemoteFeatureFlag.allCases.filter(\.canOverride) + private let allLocalFlags = FeatureFlag.allCases.filter(\.canOverride) + + @Published var filter: DebugFeatureFlagFilter = .all + @Published var filterTerm = "" + + // MARK: Remote Feature Flags + + func getRemoteFeatureFlags() -> [RemoteFeatureFlag] { + guard [.all, .remote].contains(filter) else { return [] } + guard !filterTerm.isEmpty else { return allRemoteFlags } + return allRemoteFlags.filter { + $0.description.localizedCaseInsensitiveContains(filterTerm) || + $0.remoteKey.contains(filterTerm) + } + } + + func binding(for flag: RemoteFeatureFlag) -> Binding { + Binding(get: { [unowned self] in + flag.enabled(using: remoteStore, overrideStore: overrideStore) + }, set: { [unowned self] in + override(flag, withValue: $0) + }) + } + + func isOverriden(_ flag: OverridableFlag) -> Bool { + overrideStore.isOverridden(flag) + } + + private func override(_ flag: OverridableFlag, withValue value: Bool) { + try? overrideStore.override(flag, withValue: value) + objectWillChange.send() + } + + // MARK: Local Feature Flags + + func getLocalFeatureFlags() -> [FeatureFlag] { + guard [.all, .local].contains(filter) else { return [] } + guard !filterTerm.isEmpty else { return allLocalFlags } + return allLocalFlags.filter { + $0.description.localizedCaseInsensitiveContains(filterTerm) + } + } + + func binding(for flag: FeatureFlag) -> Binding { + Binding(get: { + flag.enabled + }, set: { [unowned self] in + override(flag, withValue: $0) + }) + } + + // MARK: Actions + + func enableAllFlags() { + for flag in RemoteFeatureFlag.allCases where !flag.enabled() { + try? overrideStore.override(flag, withValue: true) + } + for flag in FeatureFlag.allCases where !flag.enabled { + try? overrideStore.override(flag, withValue: true) + } + objectWillChange.send() + } + + func reset() { + for flag in RemoteFeatureFlag.allCases { + overrideStore.removeOverride(for: flag) + } + for flag in FeatureFlag.allCases { + overrideStore.removeOverride(for: flag) + } + objectWillChange.send() + } +} + +private enum DebugFeatureFlagFilter: Hashable { + case all + case remote + case local +} + +private extension View { + func apply(_ closure: (Self) -> T) -> T { + closure(self) + } +} diff --git a/WordPress/Classes/ViewRelated/Me/App Settings/DebugMenuViewController.swift b/WordPress/Classes/ViewRelated/Me/App Settings/DebugMenuViewController.swift index 7d46004cb479..9981cfeaa4c2 100644 --- a/WordPress/Classes/ViewRelated/Me/App Settings/DebugMenuViewController.swift +++ b/WordPress/Classes/ViewRelated/Me/App Settings/DebugMenuViewController.swift @@ -4,8 +4,6 @@ import SwiftUI class DebugMenuViewController: UITableViewController { private var handler: ImmuTableViewHandler! - private let remoteStore = RemoteFeatureFlagStore() - private let overrideStore = FeatureFlagOverrideStore() override init(style: UITableView.Style) { super.init(style: style) @@ -39,41 +37,25 @@ class DebugMenuViewController: UITableViewController { } private func reloadViewModel() { - let remoteFeatureFlags = RemoteFeatureFlag.allCases.filter({ $0.canOverride }) - let remoteFeatureFlagsRows: [ImmuTableRow] = remoteFeatureFlags.map({ makeRemoteFeatureFlagsRows(for: $0) }) - - let localFeatureFlags = FeatureFlag.allCases.filter({ $0.canOverride }) - let localFeatureFlagsRows: [ImmuTableRow] = localFeatureFlags.map({ makeLocalFeatureFlagsRow(for: $0) }) - handler.viewModel = ImmuTable(sections: [ - ImmuTableSection(headerText: Strings.remoteFeatureFlags, rows: remoteFeatureFlagsRows), - ImmuTableSection(headerText: Strings.localFeatureFlags, rows: localFeatureFlagsRows), + ImmuTableSection(headerText: "General", rows: generalRows), ImmuTableSection(headerText: Strings.tools, rows: toolsRows), ImmuTableSection(headerText: Strings.crashLogging, rows: crashLoggingRows), ImmuTableSection(headerText: Strings.reader, rows: readerRows), ]) } - private func makeLocalFeatureFlagsRow(for flag: FeatureFlag) -> ImmuTableRow { - let overridden: String? = overrideStore.isOverridden(flag) ? Strings.overridden : nil - - return SwitchWithSubtitleRow(title: String(describing: flag), value: flag.enabled, subtitle: overridden, onChange: { isOn in - try? self.overrideStore.override(flag, withValue: isOn) - self.reloadViewModel() - }) - } + // MARK: Tools - private func makeRemoteFeatureFlagsRows(for flag: RemoteFeatureFlag) -> ImmuTableRow { - let overridden: String? = overrideStore.isOverridden(flag) ? Strings.overridden : nil - let enabled = flag.enabled(using: remoteStore, overrideStore: overrideStore) - return SwitchWithSubtitleRow(title: String(describing: flag), value: enabled, subtitle: overridden, onChange: { isOn in - try? self.overrideStore.override(flag, withValue: isOn) - self.reloadViewModel() - }) + private var generalRows: [ImmuTableRow] { + [ + NavigationItemRow(title: "Feature Flags") { [weak self] _ in + let vc = UIHostingController(rootView: DebugFeatureFlagsView()) + self?.navigationController?.pushViewController(vc, animated: true) + } + ] } - // MARK: Tools - private var toolsRows: [ImmuTableRow] { var toolsRows = [ ButtonRow(title: Strings.quickStartForNewSiteRow, action: { [weak self] _ in @@ -196,9 +178,6 @@ class DebugMenuViewController: UITableViewController { } enum Strings { - static let overridden = NSLocalizedString("Overridden", comment: "Used to indicate a setting is overridden in debug builds of the app") - static let localFeatureFlags = NSLocalizedString("debugMenu.section.localFeatureFlags", value: "Local Feature Flags", comment: "Title of the Local Feature Flags screen used in debug builds of the app") - static let remoteFeatureFlags = NSLocalizedString("debugMenu.section.remoteFeatureFlags", value: "Remote Feature Flags", comment: "Title of the Remote Feature Flags screen used in debug builds of the app") static let tools = NSLocalizedString("Tools", comment: "Title of the Tools section of the debug screen used in debug builds of the app") static let sandboxStoreCookieSecretRow = NSLocalizedString("Use Sandbox Store", comment: "Title of a row displayed on the debug screen used to configure the sandbox store use in the App.") static let quickStartForNewSiteRow = NSLocalizedString("Enable Quick Start for New Site", comment: "Title of a row displayed on the debug screen used in debug builds of the app") diff --git a/WordPress/WordPress.xcodeproj/project.pbxproj b/WordPress/WordPress.xcodeproj/project.pbxproj index 65d8572b937c..19783c097f90 100644 --- a/WordPress/WordPress.xcodeproj/project.pbxproj +++ b/WordPress/WordPress.xcodeproj/project.pbxproj @@ -379,6 +379,8 @@ 0CD382862A4B6FCF00612173 /* DashboardBlazeCardCellViewModelTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CD382852A4B6FCE00612173 /* DashboardBlazeCardCellViewModelTest.swift */; }; 0CDEC40C2A2FAF0500BB3A91 /* DashboardBlazeCampaignsCardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CDEC40B2A2FAF0500BB3A91 /* DashboardBlazeCampaignsCardView.swift */; }; 0CDEC40D2A2FAF0500BB3A91 /* DashboardBlazeCampaignsCardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CDEC40B2A2FAF0500BB3A91 /* DashboardBlazeCampaignsCardView.swift */; }; + 0CED95602A460F4B0020F420 /* DebugFeatureFlagsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CED955F2A460F4B0020F420 /* DebugFeatureFlagsView.swift */; }; + 0CED95612A460F4B0020F420 /* DebugFeatureFlagsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CED955F2A460F4B0020F420 /* DebugFeatureFlagsView.swift */; }; 1702BBDC1CEDEA6B00766A33 /* BadgeLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1702BBDB1CEDEA6B00766A33 /* BadgeLabel.swift */; }; 1702BBE01CF3034E00766A33 /* DomainsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1702BBDF1CF3034E00766A33 /* DomainsService.swift */; }; 17039225282E6D2800F602E9 /* ViewsVisitorsLineChartCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC772B0728201F5300664C02 /* ViewsVisitorsLineChartCell.swift */; }; @@ -6095,6 +6097,7 @@ 0CD382822A4B699E00612173 /* DashboardBlazeCardCellViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DashboardBlazeCardCellViewModel.swift; sourceTree = ""; }; 0CD382852A4B6FCE00612173 /* DashboardBlazeCardCellViewModelTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DashboardBlazeCardCellViewModelTest.swift; sourceTree = ""; }; 0CDEC40B2A2FAF0500BB3A91 /* DashboardBlazeCampaignsCardView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DashboardBlazeCampaignsCardView.swift; sourceTree = ""; }; + 0CED955F2A460F4B0020F420 /* DebugFeatureFlagsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DebugFeatureFlagsView.swift; sourceTree = ""; }; 131D0EE49695795ECEDAA446 /* Pods-WordPressTest.release-alpha.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WordPressTest.release-alpha.xcconfig"; path = "../Pods/Target Support Files/Pods-WordPressTest/Pods-WordPressTest.release-alpha.xcconfig"; sourceTree = ""; }; 150B6590614A28DF9AD25491 /* Pods-Apps-Jetpack.release-alpha.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Apps-Jetpack.release-alpha.xcconfig"; path = "../Pods/Target Support Files/Pods-Apps-Jetpack/Pods-Apps-Jetpack.release-alpha.xcconfig"; sourceTree = ""; }; 152F25D5C232985E30F56CAC /* Pods-Apps-Jetpack.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Apps-Jetpack.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-Apps-Jetpack/Pods-Apps-Jetpack.debug.xcconfig"; sourceTree = ""; }; @@ -11098,6 +11101,7 @@ 3F29EB6824041F6D005313DE /* About */, FFA162301CB7031A00E2E110 /* AppSettingsViewController.swift */, 17E4CD0B238C33F300C56916 /* DebugMenuViewController.swift */, + 0CED955F2A460F4B0020F420 /* DebugFeatureFlagsView.swift */, F9B862C82478170A008B093C /* EncryptedLogTableViewController.swift */, CECEEB542823164800A28ADE /* MediaCacheSettingsViewController.swift */, 80A2154229D1177A002FE8EB /* RemoteConfigDebugViewController.swift */, @@ -21658,6 +21662,7 @@ E15644E91CE0E47C00D96E64 /* RoundedButton.swift in Sources */, 08A250FC28D9F0E200F50420 /* CommentDetailInfoViewModel.swift in Sources */, 08CC67801C49B65A00153AD7 /* MenuLocation.m in Sources */, + 0CED95602A460F4B0020F420 /* DebugFeatureFlagsView.swift in Sources */, FA73D7D6278D9E5D00DF24B3 /* BlogDashboardViewController.swift in Sources */, 4349B0AF218A477F0034118A /* RevisionsTableViewCell.swift in Sources */, 738B9A5921B85CF20005062B /* KeyboardInfo.swift in Sources */, @@ -24651,6 +24656,7 @@ FABB23282602FC2C00C8785C /* LoggingURLRedactor.swift in Sources */, FABB23292602FC2C00C8785C /* SiteStatsTableViewCells.swift in Sources */, FABB232A2602FC2C00C8785C /* SharingButton.swift in Sources */, + 0CED95612A460F4B0020F420 /* DebugFeatureFlagsView.swift in Sources */, FABB232B2602FC2C00C8785C /* PostActionSheet.swift in Sources */, FABB232C2602FC2C00C8785C /* PublicizeConnection.swift in Sources */, FABB232D2602FC2C00C8785C /* TenorPageable.swift in Sources */, From ad1e74faa933676deef527d948926c6abc31fea4 Mon Sep 17 00:00:00 2001 From: kean Date: Fri, 23 Jun 2023 18:31:36 -0400 Subject: [PATCH 19/72] Add a way to show only overriden flags --- .../App Settings/DebugFeatureFlagsView.swift | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Me/App Settings/DebugFeatureFlagsView.swift b/WordPress/Classes/ViewRelated/Me/App Settings/DebugFeatureFlagsView.swift index da39df12e583..627e6fa80c91 100644 --- a/WordPress/Classes/ViewRelated/Me/App Settings/DebugFeatureFlagsView.swift +++ b/WordPress/Classes/ViewRelated/Me/App Settings/DebugFeatureFlagsView.swift @@ -67,6 +67,7 @@ struct DebugFeatureFlagsView: View { Text("Feature Flags (All)").tag(DebugFeatureFlagFilter.all) Text("Remote Feature Flags").tag(DebugFeatureFlagFilter.remote) Text("Local Feature Flags").tag(DebugFeatureFlagFilter.local) + Text("Overriden Feature Flags").tag(DebugFeatureFlagFilter.overriden) }.pickerStyle(.inline) } } else { @@ -79,6 +80,7 @@ struct DebugFeatureFlagsView: View { case .all: return "Feature Flags" case .remote: return "Remote Feature Flags" case .local: return "Local Feature Flags" + case .overriden: return "Overriden Feature Flags" } } } @@ -96,10 +98,15 @@ private final class DebugFeatureFlagsViewModel: ObservableObject { // MARK: Remote Feature Flags func getRemoteFeatureFlags() -> [RemoteFeatureFlag] { - guard [.all, .remote].contains(filter) else { return [] } - guard !filterTerm.isEmpty else { return allRemoteFlags } - return allRemoteFlags.filter { - $0.description.localizedCaseInsensitiveContains(filterTerm) || + allRemoteFlags.filter { + switch filter { + case .all, .remote: return true + case .local: return false + case .overriden: return isOverriden($0) + } + }.filter { + guard !filterTerm.isEmpty else { return true } + return $0.description.localizedCaseInsensitiveContains(filterTerm) || $0.remoteKey.contains(filterTerm) } } @@ -124,10 +131,15 @@ private final class DebugFeatureFlagsViewModel: ObservableObject { // MARK: Local Feature Flags func getLocalFeatureFlags() -> [FeatureFlag] { - guard [.all, .local].contains(filter) else { return [] } - guard !filterTerm.isEmpty else { return allLocalFlags } - return allLocalFlags.filter { - $0.description.localizedCaseInsensitiveContains(filterTerm) + allLocalFlags.filter { + switch filter { + case .all, .local: return true + case .remote: return false + case .overriden: return isOverriden($0) + } + }.filter { + guard !filterTerm.isEmpty else { return true } + return $0.description.localizedCaseInsensitiveContains(filterTerm) } } @@ -166,6 +178,7 @@ private enum DebugFeatureFlagFilter: Hashable { case all case remote case local + case overriden } private extension View { From 7acc7be9f700e90aef45b6937bfa772bdf65a2c0 Mon Sep 17 00:00:00 2001 From: kean Date: Thu, 29 Jun 2023 16:59:05 -0400 Subject: [PATCH 20/72] Add localization --- .../Me/App Settings/DebugMenuViewController.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Me/App Settings/DebugMenuViewController.swift b/WordPress/Classes/ViewRelated/Me/App Settings/DebugMenuViewController.swift index 9981cfeaa4c2..ab786cb4c732 100644 --- a/WordPress/Classes/ViewRelated/Me/App Settings/DebugMenuViewController.swift +++ b/WordPress/Classes/ViewRelated/Me/App Settings/DebugMenuViewController.swift @@ -38,7 +38,7 @@ class DebugMenuViewController: UITableViewController { private func reloadViewModel() { handler.viewModel = ImmuTable(sections: [ - ImmuTableSection(headerText: "General", rows: generalRows), + ImmuTableSection(headerText: Strings.general, rows: generalRows), ImmuTableSection(headerText: Strings.tools, rows: toolsRows), ImmuTableSection(headerText: Strings.crashLogging, rows: crashLoggingRows), ImmuTableSection(headerText: Strings.reader, rows: readerRows), @@ -49,7 +49,7 @@ class DebugMenuViewController: UITableViewController { private var generalRows: [ImmuTableRow] { [ - NavigationItemRow(title: "Feature Flags") { [weak self] _ in + NavigationItemRow(title: Strings.featureFlags) { [weak self] _ in let vc = UIHostingController(rootView: DebugFeatureFlagsView()) self?.navigationController?.pushViewController(vc, animated: true) } @@ -191,8 +191,8 @@ class DebugMenuViewController: UITableViewController { static let readerCssTitle = NSLocalizedString("Reader CSS URL", comment: "Title of the screen that allows the user to change the Reader CSS URL for debug builds") static let readerURLPlaceholder = NSLocalizedString("Default URL", comment: "Placeholder for the reader CSS URL") static let readerURLHint = NSLocalizedString("Add a custom CSS URL here to be loaded in Reader. If you're running Calypso locally this can be something like: http://192.168.15.23:3000/calypso/reader-mobile.css", comment: "Hint for the reader CSS URL field") - static let remoteConfigTitle = NSLocalizedString("debugMenu.remoteConfig.title", - value: "Remote Config", - comment: "Remote Config debug menu title") + static let remoteConfigTitle = NSLocalizedString("debugMenu.remoteConfig.title", value: "Remote Config", comment: "Remote Config debug menu title") + static let general = NSLocalizedString("debugMenu.generalSectionTitle", value: "General", comment: "General section title") + static let featureFlags = NSLocalizedString("debugMenu.featureFlags", value: "Feature Flags", comment: "Feature flags menu item") } } From 9d606cfe68b59aa42b60e222f01a761ef0ae1216 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Thu, 6 Jul 2023 12:49:02 +0200 Subject: [PATCH 21/72] Release script: Update gutenberg-mobile ref --- Gutenberg/version.rb | 4 +- Podfile.lock | 204 +++++++++++++++++++++---------------------- 2 files changed, 104 insertions(+), 104 deletions(-) diff --git a/Gutenberg/version.rb b/Gutenberg/version.rb index 4722006d7961..4b3181cf5096 100644 --- a/Gutenberg/version.rb +++ b/Gutenberg/version.rb @@ -11,8 +11,8 @@ # # LOCAL_GUTENBERG=../my-gutenberg-fork bundle exec pod install GUTENBERG_CONFIG = { - # commit: '' - tag: 'v1.98.1' + commit: '6fe745be5342afe1c82f45e57d12a02c1b72e1de' + # tag: 'v1.98.1' } GITHUB_ORG = 'wordpress-mobile' diff --git a/Podfile.lock b/Podfile.lock index 9ba1587d52a0..d3d02b4a9ec2 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -54,7 +54,7 @@ PODS: - AppAuth/Core (~> 1.6) - GTMSessionFetcher/Core (< 3.0, >= 1.5) - GTMSessionFetcher/Core (1.7.2) - - Gutenberg (1.98.1): + - Gutenberg (1.99.0): - React (= 0.69.4) - React-CoreModules (= 0.69.4) - React-RCTImage (= 0.69.4) @@ -481,7 +481,7 @@ PODS: - React-Core - RNSVG (9.13.6): - React-Core - - RNTAztecView (1.98.1): + - RNTAztecView (1.99.0): - React-Core - WordPress-Aztec-iOS (~> 1.19.8) - SDWebImage (5.11.1): @@ -545,18 +545,18 @@ DEPENDENCIES: - AppCenter (~> 4.1) - AppCenter/Distribute (~> 4.1) - Automattic-Tracks-iOS (~> 2.2) - - boost (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/boost.podspec.json`) - - BVLinearGradient (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/BVLinearGradient.podspec.json`) + - boost (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/boost.podspec.json`) + - BVLinearGradient (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/BVLinearGradient.podspec.json`) - CocoaLumberjack/Swift (~> 3.0) - CropViewController (= 2.5.3) - Down (~> 0.6.6) - - FBLazyVector (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/FBLazyVector.podspec.json`) - - FBReactNativeSpec (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/FBReactNativeSpec/FBReactNativeSpec.podspec.json`) + - FBLazyVector (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/FBLazyVector.podspec.json`) + - FBReactNativeSpec (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/FBReactNativeSpec/FBReactNativeSpec.podspec.json`) - FSInteractiveMap (from `https://github.com/wordpress-mobile/FSInteractiveMap.git`, tag `0.2.0`) - Gifu (= 3.2.0) - - glog (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/glog.podspec.json`) + - glog (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/glog.podspec.json`) - Gridicons (~> 1.1.0) - - Gutenberg (from `https://github.com/wordpress-mobile/gutenberg-mobile.git`, tag `v1.98.1`) + - Gutenberg (from `https://github.com/wordpress-mobile/gutenberg-mobile.git`, commit `6fe745be5342afe1c82f45e57d12a02c1b72e1de`) - JTAppleCalendar (~> 8.0.2) - Kanvas (~> 1.4.4) - MediaEditor (>= 1.2.2, ~> 1.2) @@ -565,48 +565,48 @@ DEPENDENCIES: - "NSURL+IDN (~> 0.4)" - OCMock (~> 3.4.3) - OHHTTPStubs/Swift (~> 9.1.0) - - RCT-Folly (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/RCT-Folly.podspec.json`) - - RCTRequired (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/RCTRequired.podspec.json`) - - RCTTypeSafety (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/RCTTypeSafety.podspec.json`) + - RCT-Folly (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RCT-Folly.podspec.json`) + - RCTRequired (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RCTRequired.podspec.json`) + - RCTTypeSafety (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RCTTypeSafety.podspec.json`) - Reachability (= 3.2) - - React (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React.podspec.json`) - - React-bridging (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-bridging.podspec.json`) - - React-callinvoker (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-callinvoker.podspec.json`) - - React-Codegen (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-Codegen.podspec.json`) - - React-Core (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-Core.podspec.json`) - - React-CoreModules (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-CoreModules.podspec.json`) - - React-cxxreact (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-cxxreact.podspec.json`) - - React-jsi (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-jsi.podspec.json`) - - React-jsiexecutor (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-jsiexecutor.podspec.json`) - - React-jsinspector (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-jsinspector.podspec.json`) - - React-logger (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-logger.podspec.json`) - - react-native-blur (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/react-native-blur.podspec.json`) - - react-native-get-random-values (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/react-native-get-random-values.podspec.json`) - - react-native-safe-area (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/react-native-safe-area.podspec.json`) - - react-native-safe-area-context (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/react-native-safe-area-context.podspec.json`) - - react-native-slider (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/react-native-slider.podspec.json`) - - react-native-video (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/react-native-video.podspec.json`) - - react-native-webview (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/react-native-webview.podspec.json`) - - React-perflogger (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-perflogger.podspec.json`) - - React-RCTActionSheet (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-RCTActionSheet.podspec.json`) - - React-RCTAnimation (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-RCTAnimation.podspec.json`) - - React-RCTBlob (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-RCTBlob.podspec.json`) - - React-RCTImage (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-RCTImage.podspec.json`) - - React-RCTLinking (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-RCTLinking.podspec.json`) - - React-RCTNetwork (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-RCTNetwork.podspec.json`) - - React-RCTSettings (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-RCTSettings.podspec.json`) - - React-RCTText (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-RCTText.podspec.json`) - - React-RCTVibration (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-RCTVibration.podspec.json`) - - React-runtimeexecutor (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-runtimeexecutor.podspec.json`) - - ReactCommon (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/ReactCommon.podspec.json`) - - RNCClipboard (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/RNCClipboard.podspec.json`) - - RNCMaskedView (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/RNCMaskedView.podspec.json`) - - RNFastImage (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/RNFastImage.podspec.json`) - - RNGestureHandler (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/RNGestureHandler.podspec.json`) - - RNReanimated (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/RNReanimated.podspec.json`) - - RNScreens (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/RNScreens.podspec.json`) - - RNSVG (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/RNSVG.podspec.json`) - - RNTAztecView (from `https://github.com/wordpress-mobile/gutenberg-mobile.git`, tag `v1.98.1`) + - React (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React.podspec.json`) + - React-bridging (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-bridging.podspec.json`) + - React-callinvoker (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-callinvoker.podspec.json`) + - React-Codegen (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-Codegen.podspec.json`) + - React-Core (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-Core.podspec.json`) + - React-CoreModules (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-CoreModules.podspec.json`) + - React-cxxreact (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-cxxreact.podspec.json`) + - React-jsi (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-jsi.podspec.json`) + - React-jsiexecutor (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-jsiexecutor.podspec.json`) + - React-jsinspector (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-jsinspector.podspec.json`) + - React-logger (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-logger.podspec.json`) + - react-native-blur (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/react-native-blur.podspec.json`) + - react-native-get-random-values (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/react-native-get-random-values.podspec.json`) + - react-native-safe-area (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/react-native-safe-area.podspec.json`) + - react-native-safe-area-context (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/react-native-safe-area-context.podspec.json`) + - react-native-slider (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/react-native-slider.podspec.json`) + - react-native-video (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/react-native-video.podspec.json`) + - react-native-webview (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/react-native-webview.podspec.json`) + - React-perflogger (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-perflogger.podspec.json`) + - React-RCTActionSheet (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTActionSheet.podspec.json`) + - React-RCTAnimation (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTAnimation.podspec.json`) + - React-RCTBlob (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTBlob.podspec.json`) + - React-RCTImage (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTImage.podspec.json`) + - React-RCTLinking (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTLinking.podspec.json`) + - React-RCTNetwork (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTNetwork.podspec.json`) + - React-RCTSettings (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTSettings.podspec.json`) + - React-RCTText (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTText.podspec.json`) + - React-RCTVibration (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTVibration.podspec.json`) + - React-runtimeexecutor (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-runtimeexecutor.podspec.json`) + - ReactCommon (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/ReactCommon.podspec.json`) + - RNCClipboard (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RNCClipboard.podspec.json`) + - RNCMaskedView (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RNCMaskedView.podspec.json`) + - RNFastImage (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RNFastImage.podspec.json`) + - RNGestureHandler (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RNGestureHandler.podspec.json`) + - RNReanimated (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RNReanimated.podspec.json`) + - RNScreens (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RNScreens.podspec.json`) + - RNSVG (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RNSVG.podspec.json`) + - RNTAztecView (from `https://github.com/wordpress-mobile/gutenberg-mobile.git`, commit `6fe745be5342afe1c82f45e57d12a02c1b72e1de`) - Starscream (= 3.0.6) - SVProgressHUD (= 2.2.5) - SwiftLint (~> 0.50) @@ -616,7 +616,7 @@ DEPENDENCIES: - WordPressShared (~> 2.2-beta) - WordPressUI (~> 1.12.5) - WPMediaPicker (~> 1.8-beta) - - Yoga (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/Yoga.podspec.json`) + - Yoga (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/Yoga.podspec.json`) - ZendeskSupportSDK (= 5.3.0) - ZIPFoundation (~> 0.9.8) @@ -677,121 +677,121 @@ SPEC REPOS: EXTERNAL SOURCES: boost: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/boost.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/boost.podspec.json BVLinearGradient: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/BVLinearGradient.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/BVLinearGradient.podspec.json FBLazyVector: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/FBLazyVector.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/FBLazyVector.podspec.json FBReactNativeSpec: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/FBReactNativeSpec/FBReactNativeSpec.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/FBReactNativeSpec/FBReactNativeSpec.podspec.json FSInteractiveMap: :git: https://github.com/wordpress-mobile/FSInteractiveMap.git :tag: 0.2.0 glog: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/glog.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/glog.podspec.json Gutenberg: + :commit: 6fe745be5342afe1c82f45e57d12a02c1b72e1de :git: https://github.com/wordpress-mobile/gutenberg-mobile.git :submodules: true - :tag: v1.98.1 RCT-Folly: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/RCT-Folly.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RCT-Folly.podspec.json RCTRequired: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/RCTRequired.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RCTRequired.podspec.json RCTTypeSafety: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/RCTTypeSafety.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RCTTypeSafety.podspec.json React: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React.podspec.json React-bridging: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-bridging.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-bridging.podspec.json React-callinvoker: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-callinvoker.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-callinvoker.podspec.json React-Codegen: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-Codegen.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-Codegen.podspec.json React-Core: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-Core.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-Core.podspec.json React-CoreModules: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-CoreModules.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-CoreModules.podspec.json React-cxxreact: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-cxxreact.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-cxxreact.podspec.json React-jsi: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-jsi.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-jsi.podspec.json React-jsiexecutor: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-jsiexecutor.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-jsiexecutor.podspec.json React-jsinspector: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-jsinspector.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-jsinspector.podspec.json React-logger: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-logger.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-logger.podspec.json react-native-blur: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/react-native-blur.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/react-native-blur.podspec.json react-native-get-random-values: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/react-native-get-random-values.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/react-native-get-random-values.podspec.json react-native-safe-area: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/react-native-safe-area.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/react-native-safe-area.podspec.json react-native-safe-area-context: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/react-native-safe-area-context.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/react-native-safe-area-context.podspec.json react-native-slider: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/react-native-slider.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/react-native-slider.podspec.json react-native-video: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/react-native-video.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/react-native-video.podspec.json react-native-webview: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/react-native-webview.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/react-native-webview.podspec.json React-perflogger: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-perflogger.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-perflogger.podspec.json React-RCTActionSheet: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-RCTActionSheet.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTActionSheet.podspec.json React-RCTAnimation: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-RCTAnimation.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTAnimation.podspec.json React-RCTBlob: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-RCTBlob.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTBlob.podspec.json React-RCTImage: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-RCTImage.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTImage.podspec.json React-RCTLinking: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-RCTLinking.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTLinking.podspec.json React-RCTNetwork: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-RCTNetwork.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTNetwork.podspec.json React-RCTSettings: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-RCTSettings.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTSettings.podspec.json React-RCTText: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-RCTText.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTText.podspec.json React-RCTVibration: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-RCTVibration.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTVibration.podspec.json React-runtimeexecutor: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/React-runtimeexecutor.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-runtimeexecutor.podspec.json ReactCommon: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/ReactCommon.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/ReactCommon.podspec.json RNCClipboard: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/RNCClipboard.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RNCClipboard.podspec.json RNCMaskedView: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/RNCMaskedView.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RNCMaskedView.podspec.json RNFastImage: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/RNFastImage.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RNFastImage.podspec.json RNGestureHandler: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/RNGestureHandler.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RNGestureHandler.podspec.json RNReanimated: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/RNReanimated.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RNReanimated.podspec.json RNScreens: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/RNScreens.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RNScreens.podspec.json RNSVG: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/RNSVG.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RNSVG.podspec.json RNTAztecView: + :commit: 6fe745be5342afe1c82f45e57d12a02c1b72e1de :git: https://github.com/wordpress-mobile/gutenberg-mobile.git :submodules: true - :tag: v1.98.1 Yoga: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.98.1/third-party-podspecs/Yoga.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/Yoga.podspec.json CHECKOUT OPTIONS: FSInteractiveMap: :git: https://github.com/wordpress-mobile/FSInteractiveMap.git :tag: 0.2.0 Gutenberg: + :commit: 6fe745be5342afe1c82f45e57d12a02c1b72e1de :git: https://github.com/wordpress-mobile/gutenberg-mobile.git :submodules: true - :tag: v1.98.1 RNTAztecView: + :commit: 6fe745be5342afe1c82f45e57d12a02c1b72e1de :git: https://github.com/wordpress-mobile/gutenberg-mobile.git :submodules: true - :tag: v1.98.1 SPEC CHECKSUMS: Alamofire: 3ec537f71edc9804815215393ae2b1a8ea33a844 @@ -816,7 +816,7 @@ SPEC CHECKSUMS: Gridicons: 17d660b97ce4231d582101b02f8280628b141c9a GTMAppAuth: 0ff230db599948a9ad7470ca667337803b3fc4dd GTMSessionFetcher: 5595ec75acf5be50814f81e9189490412bad82ba - Gutenberg: fd4cb66c253b00ccae222d01ed3824521ed50b76 + Gutenberg: 0b6b57b7c48f79212d23c947fd6c9decb6c196c6 JTAppleCalendar: 932cadea40b1051beab10f67843451d48ba16c99 Kanvas: f932eaed3d3f47aae8aafb6c2d27c968bdd49030 libwebp: f62cb61d0a484ba548448a4bd52aabf150ff6eef @@ -867,7 +867,7 @@ SPEC CHECKSUMS: RNReanimated: b5730b32243a35f955202d807ecb43755133ac62 RNScreens: bd1f43d7dfcd435bc11d4ee5c60086717c45a113 RNSVG: 259ef12cbec2591a45fc7c5f09d7aa09e6692533 - RNTAztecView: 0cf287757e0879ea9e87e6628851c24f798ba809 + RNTAztecView: d96d1e9b317e7bfe153bcb9e82f9287862893579 SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d SDWebImageWebPCoder: 908b83b6adda48effe7667cd2b7f78c897e5111d Sentry: 927dfb29d18a14d924229a59cc2ad149f43349f2 From d8240953f5e3a8a84828c63e5fa04636b03fc1a8 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Thu, 6 Jul 2023 13:11:19 +0200 Subject: [PATCH 22/72] Update release notes --- RELEASE-NOTES.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index e782766f07c4..1460ce633839 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -5,7 +5,8 @@ * [**] [internal] Make sure synced posts are saved before calling completion block. [#20960] * [**] [internal] Fix observing Quick Start notifications. [#20997] * [**] [internal] Fixed an issue that was causing a memory leak in the domain selection flow. [#20813] - +* [*] [Jetpack-only] Block editor: Rename "Reusable blocks" to "Synced patterns", aligning with the web editor. [https://github.com/wordpress-mobile/gutenberg-mobile/pull/5885] +* [**] Block editor: Fix a crash related to Reanimated when closing the editor [https://github.com/wordpress-mobile/gutenberg-mobile/pull/5938] 22.7 ----- From 8af5da755774890c4c538d50e14c8f4f0411ed8d Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Thu, 6 Jul 2023 14:12:15 +0200 Subject: [PATCH 23/72] Update Gutenberg Mobile ref --- Gutenberg/version.rb | 2 +- Podfile.lock | 196 +++++++++++++++++++++---------------------- 2 files changed, 99 insertions(+), 99 deletions(-) diff --git a/Gutenberg/version.rb b/Gutenberg/version.rb index 4b3181cf5096..cfafa964c325 100644 --- a/Gutenberg/version.rb +++ b/Gutenberg/version.rb @@ -11,7 +11,7 @@ # # LOCAL_GUTENBERG=../my-gutenberg-fork bundle exec pod install GUTENBERG_CONFIG = { - commit: '6fe745be5342afe1c82f45e57d12a02c1b72e1de' + commit: 'f408074e0a5daefe32df47ad1e8664a622841735' # tag: 'v1.98.1' } diff --git a/Podfile.lock b/Podfile.lock index d3d02b4a9ec2..52953995c0fc 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -545,18 +545,18 @@ DEPENDENCIES: - AppCenter (~> 4.1) - AppCenter/Distribute (~> 4.1) - Automattic-Tracks-iOS (~> 2.2) - - boost (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/boost.podspec.json`) - - BVLinearGradient (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/BVLinearGradient.podspec.json`) + - boost (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/boost.podspec.json`) + - BVLinearGradient (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/BVLinearGradient.podspec.json`) - CocoaLumberjack/Swift (~> 3.0) - CropViewController (= 2.5.3) - Down (~> 0.6.6) - - FBLazyVector (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/FBLazyVector.podspec.json`) - - FBReactNativeSpec (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/FBReactNativeSpec/FBReactNativeSpec.podspec.json`) + - FBLazyVector (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/FBLazyVector.podspec.json`) + - FBReactNativeSpec (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/FBReactNativeSpec/FBReactNativeSpec.podspec.json`) - FSInteractiveMap (from `https://github.com/wordpress-mobile/FSInteractiveMap.git`, tag `0.2.0`) - Gifu (= 3.2.0) - - glog (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/glog.podspec.json`) + - glog (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/glog.podspec.json`) - Gridicons (~> 1.1.0) - - Gutenberg (from `https://github.com/wordpress-mobile/gutenberg-mobile.git`, commit `6fe745be5342afe1c82f45e57d12a02c1b72e1de`) + - Gutenberg (from `https://github.com/wordpress-mobile/gutenberg-mobile.git`, commit `f408074e0a5daefe32df47ad1e8664a622841735`) - JTAppleCalendar (~> 8.0.2) - Kanvas (~> 1.4.4) - MediaEditor (>= 1.2.2, ~> 1.2) @@ -565,48 +565,48 @@ DEPENDENCIES: - "NSURL+IDN (~> 0.4)" - OCMock (~> 3.4.3) - OHHTTPStubs/Swift (~> 9.1.0) - - RCT-Folly (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RCT-Folly.podspec.json`) - - RCTRequired (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RCTRequired.podspec.json`) - - RCTTypeSafety (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RCTTypeSafety.podspec.json`) + - RCT-Folly (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RCT-Folly.podspec.json`) + - RCTRequired (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RCTRequired.podspec.json`) + - RCTTypeSafety (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RCTTypeSafety.podspec.json`) - Reachability (= 3.2) - - React (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React.podspec.json`) - - React-bridging (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-bridging.podspec.json`) - - React-callinvoker (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-callinvoker.podspec.json`) - - React-Codegen (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-Codegen.podspec.json`) - - React-Core (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-Core.podspec.json`) - - React-CoreModules (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-CoreModules.podspec.json`) - - React-cxxreact (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-cxxreact.podspec.json`) - - React-jsi (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-jsi.podspec.json`) - - React-jsiexecutor (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-jsiexecutor.podspec.json`) - - React-jsinspector (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-jsinspector.podspec.json`) - - React-logger (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-logger.podspec.json`) - - react-native-blur (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/react-native-blur.podspec.json`) - - react-native-get-random-values (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/react-native-get-random-values.podspec.json`) - - react-native-safe-area (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/react-native-safe-area.podspec.json`) - - react-native-safe-area-context (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/react-native-safe-area-context.podspec.json`) - - react-native-slider (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/react-native-slider.podspec.json`) - - react-native-video (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/react-native-video.podspec.json`) - - react-native-webview (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/react-native-webview.podspec.json`) - - React-perflogger (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-perflogger.podspec.json`) - - React-RCTActionSheet (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTActionSheet.podspec.json`) - - React-RCTAnimation (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTAnimation.podspec.json`) - - React-RCTBlob (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTBlob.podspec.json`) - - React-RCTImage (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTImage.podspec.json`) - - React-RCTLinking (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTLinking.podspec.json`) - - React-RCTNetwork (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTNetwork.podspec.json`) - - React-RCTSettings (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTSettings.podspec.json`) - - React-RCTText (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTText.podspec.json`) - - React-RCTVibration (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTVibration.podspec.json`) - - React-runtimeexecutor (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-runtimeexecutor.podspec.json`) - - ReactCommon (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/ReactCommon.podspec.json`) - - RNCClipboard (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RNCClipboard.podspec.json`) - - RNCMaskedView (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RNCMaskedView.podspec.json`) - - RNFastImage (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RNFastImage.podspec.json`) - - RNGestureHandler (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RNGestureHandler.podspec.json`) - - RNReanimated (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RNReanimated.podspec.json`) - - RNScreens (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RNScreens.podspec.json`) - - RNSVG (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RNSVG.podspec.json`) - - RNTAztecView (from `https://github.com/wordpress-mobile/gutenberg-mobile.git`, commit `6fe745be5342afe1c82f45e57d12a02c1b72e1de`) + - React (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React.podspec.json`) + - React-bridging (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-bridging.podspec.json`) + - React-callinvoker (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-callinvoker.podspec.json`) + - React-Codegen (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-Codegen.podspec.json`) + - React-Core (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-Core.podspec.json`) + - React-CoreModules (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-CoreModules.podspec.json`) + - React-cxxreact (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-cxxreact.podspec.json`) + - React-jsi (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-jsi.podspec.json`) + - React-jsiexecutor (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-jsiexecutor.podspec.json`) + - React-jsinspector (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-jsinspector.podspec.json`) + - React-logger (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-logger.podspec.json`) + - react-native-blur (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/react-native-blur.podspec.json`) + - react-native-get-random-values (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/react-native-get-random-values.podspec.json`) + - react-native-safe-area (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/react-native-safe-area.podspec.json`) + - react-native-safe-area-context (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/react-native-safe-area-context.podspec.json`) + - react-native-slider (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/react-native-slider.podspec.json`) + - react-native-video (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/react-native-video.podspec.json`) + - react-native-webview (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/react-native-webview.podspec.json`) + - React-perflogger (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-perflogger.podspec.json`) + - React-RCTActionSheet (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTActionSheet.podspec.json`) + - React-RCTAnimation (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTAnimation.podspec.json`) + - React-RCTBlob (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTBlob.podspec.json`) + - React-RCTImage (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTImage.podspec.json`) + - React-RCTLinking (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTLinking.podspec.json`) + - React-RCTNetwork (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTNetwork.podspec.json`) + - React-RCTSettings (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTSettings.podspec.json`) + - React-RCTText (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTText.podspec.json`) + - React-RCTVibration (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTVibration.podspec.json`) + - React-runtimeexecutor (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-runtimeexecutor.podspec.json`) + - ReactCommon (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/ReactCommon.podspec.json`) + - RNCClipboard (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RNCClipboard.podspec.json`) + - RNCMaskedView (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RNCMaskedView.podspec.json`) + - RNFastImage (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RNFastImage.podspec.json`) + - RNGestureHandler (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RNGestureHandler.podspec.json`) + - RNReanimated (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RNReanimated.podspec.json`) + - RNScreens (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RNScreens.podspec.json`) + - RNSVG (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RNSVG.podspec.json`) + - RNTAztecView (from `https://github.com/wordpress-mobile/gutenberg-mobile.git`, commit `f408074e0a5daefe32df47ad1e8664a622841735`) - Starscream (= 3.0.6) - SVProgressHUD (= 2.2.5) - SwiftLint (~> 0.50) @@ -616,7 +616,7 @@ DEPENDENCIES: - WordPressShared (~> 2.2-beta) - WordPressUI (~> 1.12.5) - WPMediaPicker (~> 1.8-beta) - - Yoga (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/Yoga.podspec.json`) + - Yoga (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/Yoga.podspec.json`) - ZendeskSupportSDK (= 5.3.0) - ZIPFoundation (~> 0.9.8) @@ -677,119 +677,119 @@ SPEC REPOS: EXTERNAL SOURCES: boost: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/boost.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/boost.podspec.json BVLinearGradient: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/BVLinearGradient.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/BVLinearGradient.podspec.json FBLazyVector: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/FBLazyVector.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/FBLazyVector.podspec.json FBReactNativeSpec: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/FBReactNativeSpec/FBReactNativeSpec.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/FBReactNativeSpec/FBReactNativeSpec.podspec.json FSInteractiveMap: :git: https://github.com/wordpress-mobile/FSInteractiveMap.git :tag: 0.2.0 glog: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/glog.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/glog.podspec.json Gutenberg: - :commit: 6fe745be5342afe1c82f45e57d12a02c1b72e1de + :commit: f408074e0a5daefe32df47ad1e8664a622841735 :git: https://github.com/wordpress-mobile/gutenberg-mobile.git :submodules: true RCT-Folly: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RCT-Folly.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RCT-Folly.podspec.json RCTRequired: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RCTRequired.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RCTRequired.podspec.json RCTTypeSafety: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RCTTypeSafety.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RCTTypeSafety.podspec.json React: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React.podspec.json React-bridging: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-bridging.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-bridging.podspec.json React-callinvoker: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-callinvoker.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-callinvoker.podspec.json React-Codegen: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-Codegen.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-Codegen.podspec.json React-Core: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-Core.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-Core.podspec.json React-CoreModules: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-CoreModules.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-CoreModules.podspec.json React-cxxreact: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-cxxreact.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-cxxreact.podspec.json React-jsi: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-jsi.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-jsi.podspec.json React-jsiexecutor: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-jsiexecutor.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-jsiexecutor.podspec.json React-jsinspector: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-jsinspector.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-jsinspector.podspec.json React-logger: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-logger.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-logger.podspec.json react-native-blur: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/react-native-blur.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/react-native-blur.podspec.json react-native-get-random-values: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/react-native-get-random-values.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/react-native-get-random-values.podspec.json react-native-safe-area: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/react-native-safe-area.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/react-native-safe-area.podspec.json react-native-safe-area-context: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/react-native-safe-area-context.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/react-native-safe-area-context.podspec.json react-native-slider: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/react-native-slider.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/react-native-slider.podspec.json react-native-video: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/react-native-video.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/react-native-video.podspec.json react-native-webview: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/react-native-webview.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/react-native-webview.podspec.json React-perflogger: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-perflogger.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-perflogger.podspec.json React-RCTActionSheet: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTActionSheet.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTActionSheet.podspec.json React-RCTAnimation: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTAnimation.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTAnimation.podspec.json React-RCTBlob: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTBlob.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTBlob.podspec.json React-RCTImage: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTImage.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTImage.podspec.json React-RCTLinking: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTLinking.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTLinking.podspec.json React-RCTNetwork: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTNetwork.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTNetwork.podspec.json React-RCTSettings: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTSettings.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTSettings.podspec.json React-RCTText: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTText.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTText.podspec.json React-RCTVibration: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-RCTVibration.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTVibration.podspec.json React-runtimeexecutor: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/React-runtimeexecutor.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-runtimeexecutor.podspec.json ReactCommon: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/ReactCommon.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/ReactCommon.podspec.json RNCClipboard: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RNCClipboard.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RNCClipboard.podspec.json RNCMaskedView: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RNCMaskedView.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RNCMaskedView.podspec.json RNFastImage: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RNFastImage.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RNFastImage.podspec.json RNGestureHandler: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RNGestureHandler.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RNGestureHandler.podspec.json RNReanimated: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RNReanimated.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RNReanimated.podspec.json RNScreens: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RNScreens.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RNScreens.podspec.json RNSVG: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/RNSVG.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RNSVG.podspec.json RNTAztecView: - :commit: 6fe745be5342afe1c82f45e57d12a02c1b72e1de + :commit: f408074e0a5daefe32df47ad1e8664a622841735 :git: https://github.com/wordpress-mobile/gutenberg-mobile.git :submodules: true Yoga: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/6fe745be5342afe1c82f45e57d12a02c1b72e1de/third-party-podspecs/Yoga.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/Yoga.podspec.json CHECKOUT OPTIONS: FSInteractiveMap: :git: https://github.com/wordpress-mobile/FSInteractiveMap.git :tag: 0.2.0 Gutenberg: - :commit: 6fe745be5342afe1c82f45e57d12a02c1b72e1de + :commit: f408074e0a5daefe32df47ad1e8664a622841735 :git: https://github.com/wordpress-mobile/gutenberg-mobile.git :submodules: true RNTAztecView: - :commit: 6fe745be5342afe1c82f45e57d12a02c1b72e1de + :commit: f408074e0a5daefe32df47ad1e8664a622841735 :git: https://github.com/wordpress-mobile/gutenberg-mobile.git :submodules: true From 5bf6338c302df62cd03744a39a62b1a9c3f7be14 Mon Sep 17 00:00:00 2001 From: kean Date: Thu, 6 Jul 2023 09:10:13 -0400 Subject: [PATCH 24/72] Remove unused code --- .../Cards/Blaze/DashboardBlazeCampaignsCardView.swift | 2 -- 1 file changed, 2 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Blaze/DashboardBlazeCampaignsCardView.swift b/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Blaze/DashboardBlazeCampaignsCardView.swift index b9a235af3567..78f08de1a331 100644 --- a/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Blaze/DashboardBlazeCampaignsCardView.swift +++ b/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Blaze/DashboardBlazeCampaignsCardView.swift @@ -78,8 +78,6 @@ final class DashboardBlazeCampaignsCardView: UIView { } campaignView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(campainViewTapped))) - campaignView.isAccessibilityElement = true - campaignView.accessibilityTraits = .allowsDirectInteraction } private func showCampaignList() { From 6db9dca1c4ae42cb4f3e6fdfdb88f1522582d2e8 Mon Sep 17 00:00:00 2001 From: kean Date: Thu, 6 Jul 2023 09:13:17 -0400 Subject: [PATCH 25/72] Update unit tests --- .../Dashboard/DashboardBlazeCardCellViewModelTest.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/WordPress/WordPressTest/Dashboard/DashboardBlazeCardCellViewModelTest.swift b/WordPress/WordPressTest/Dashboard/DashboardBlazeCardCellViewModelTest.swift index 2e99d427cd08..31e543cf21ed 100644 --- a/WordPress/WordPressTest/Dashboard/DashboardBlazeCardCellViewModelTest.swift +++ b/WordPress/WordPressTest/Dashboard/DashboardBlazeCardCellViewModelTest.swift @@ -51,8 +51,8 @@ final class DashboardBlazeCardCellViewModelTest: CoreDataTestCase { switch sut.state { case .promo: XCTFail("The card should display the latest campaign") - case .campaign(let viewModel): - XCTAssertEqual(viewModel.title, "Test Post - don't approve") + case .campaign(let campaign): + XCTAssertEqual(campaign.name, "Test Post - don't approve") } } @@ -70,8 +70,8 @@ final class DashboardBlazeCardCellViewModelTest: CoreDataTestCase { switch sut.state { case .promo: XCTFail("The card should display the latest campaign") - case .campaign(let viewModel): - XCTAssertEqual(viewModel.title, "Test Post - don't approve") + case .campaign(let campaign): + XCTAssertEqual(campaign.name, "Test Post - don't approve") } } From 19e9e58e81ac4b8ecbfb79508343e8f8dfbde050 Mon Sep 17 00:00:00 2001 From: Povilas Staskus Date: Thu, 6 Jul 2023 16:57:13 +0300 Subject: [PATCH 26/72] Update Plans card presentation criteria ignoring mapped domains criteria - hasMappedDomains criteria also includes subdomais such as ".art.blog" for which we still want to show the Plans card - Show the card for those who have free dotcom plans --- .../FreeToPaidPlansDashboardCardHelper.swift | 10 +--------- ...reeToPaidPlansDashboardCardHelperTests.swift | 17 ++--------------- 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Free to Paid Plans/FreeToPaidPlansDashboardCardHelper.swift b/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Free to Paid Plans/FreeToPaidPlansDashboardCardHelper.swift index 65193f6a22b8..6f5ffdd459f4 100644 --- a/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Free to Paid Plans/FreeToPaidPlansDashboardCardHelper.swift +++ b/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Free to Paid Plans/FreeToPaidPlansDashboardCardHelper.swift @@ -12,15 +12,7 @@ import Foundation return false } - /// If this propery is empty, it indicates that domain information is not yet loaded - let hasLoadedDomains = blog.domains?.isEmpty == false - let hasMappedDomain = blog.hasMappedDomain() - let hasFreePlan = !blog.hasPaidPlan - - return blog.supports(.domains) - && hasFreePlan - && hasLoadedDomains - && !hasMappedDomain + return blog.supports(.domains) && !blog.hasPaidPlan } static func hideCard(for blog: Blog?) { diff --git a/WordPress/WordPressTest/Dashboard/FreeToPaidPlansDashboardCardHelperTests.swift b/WordPress/WordPressTest/Dashboard/FreeToPaidPlansDashboardCardHelperTests.swift index db0ae114461f..82b6bdc80c5f 100644 --- a/WordPress/WordPressTest/Dashboard/FreeToPaidPlansDashboardCardHelperTests.swift +++ b/WordPress/WordPressTest/Dashboard/FreeToPaidPlansDashboardCardHelperTests.swift @@ -28,7 +28,7 @@ final class FreeToPaidPlansDashboardCardHelperTests: CoreDataTestCase { XCTAssertFalse(result, "Card should not show for blogs without a free plan") } - func testShouldNotShowCardWithMappedDomain() { + func testShouldShowCardWithMappedDomain() { let blog = BlogBuilder(mainContext) .with(supportsDomains: true) .with(domainCount: 1, of: .wpCom) @@ -39,20 +39,7 @@ final class FreeToPaidPlansDashboardCardHelperTests: CoreDataTestCase { let result = FreeToPaidPlansDashboardCardHelper.shouldShowCard(for: blog, isJetpack: true, featureFlagEnabled: true) - XCTAssertFalse(result, "Card should not show for blogs with a mapped domain") - } - - func testShouldNotShowCardWhenDomainInformationIsNotLoaded() { - let blog = BlogBuilder(mainContext) - .with(supportsDomains: true) - .with(domainCount: 0, of: .wpCom) - .with(hasMappedDomain: false) - .with(hasPaidPlan: false) - .build() - - let result = FreeToPaidPlansDashboardCardHelper.shouldShowCard(for: blog, isJetpack: true, featureFlagEnabled: true) - - XCTAssertFalse(result, "Card should not show until domain information is loaded") + XCTAssertTrue(result, "Card should still be shown for blogs with a mapped domain and with a free plan") } func testShouldNotShowCardFeatureFlagDisabled() { From 4f45194f39367f9ffb1cfdc87120486e1367aea8 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Thu, 6 Jul 2023 16:03:58 +0200 Subject: [PATCH 27/72] Update release notes Adding `internal` tag to Reanimated crash entry as it's not guaranteed that would fix it. --- RELEASE-NOTES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 1460ce633839..f4db083c0afa 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -6,7 +6,7 @@ * [**] [internal] Fix observing Quick Start notifications. [#20997] * [**] [internal] Fixed an issue that was causing a memory leak in the domain selection flow. [#20813] * [*] [Jetpack-only] Block editor: Rename "Reusable blocks" to "Synced patterns", aligning with the web editor. [https://github.com/wordpress-mobile/gutenberg-mobile/pull/5885] -* [**] Block editor: Fix a crash related to Reanimated when closing the editor [https://github.com/wordpress-mobile/gutenberg-mobile/pull/5938] +* [**] [internal] Block editor: Fix a crash related to Reanimated when closing the editor [https://github.com/wordpress-mobile/gutenberg-mobile/pull/5938] 22.7 ----- From 53a7d53aa648c041c3377d16349cfbcd9ab8c577 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Thu, 6 Jul 2023 16:04:22 +0200 Subject: [PATCH 28/72] Update Gutenberg Mobile ref with tag --- Gutenberg/version.rb | 4 +- Podfile.lock | 196 +++++++++++++++++++++---------------------- 2 files changed, 100 insertions(+), 100 deletions(-) diff --git a/Gutenberg/version.rb b/Gutenberg/version.rb index cfafa964c325..567633e7b64b 100644 --- a/Gutenberg/version.rb +++ b/Gutenberg/version.rb @@ -11,8 +11,8 @@ # # LOCAL_GUTENBERG=../my-gutenberg-fork bundle exec pod install GUTENBERG_CONFIG = { - commit: 'f408074e0a5daefe32df47ad1e8664a622841735' - # tag: 'v1.98.1' + # commit: '' + tag: 'v1.99.0' } GITHUB_ORG = 'wordpress-mobile' diff --git a/Podfile.lock b/Podfile.lock index 52953995c0fc..13c21db26f3d 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -545,18 +545,18 @@ DEPENDENCIES: - AppCenter (~> 4.1) - AppCenter/Distribute (~> 4.1) - Automattic-Tracks-iOS (~> 2.2) - - boost (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/boost.podspec.json`) - - BVLinearGradient (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/BVLinearGradient.podspec.json`) + - boost (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/boost.podspec.json`) + - BVLinearGradient (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/BVLinearGradient.podspec.json`) - CocoaLumberjack/Swift (~> 3.0) - CropViewController (= 2.5.3) - Down (~> 0.6.6) - - FBLazyVector (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/FBLazyVector.podspec.json`) - - FBReactNativeSpec (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/FBReactNativeSpec/FBReactNativeSpec.podspec.json`) + - FBLazyVector (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/FBLazyVector.podspec.json`) + - FBReactNativeSpec (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/FBReactNativeSpec/FBReactNativeSpec.podspec.json`) - FSInteractiveMap (from `https://github.com/wordpress-mobile/FSInteractiveMap.git`, tag `0.2.0`) - Gifu (= 3.2.0) - - glog (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/glog.podspec.json`) + - glog (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/glog.podspec.json`) - Gridicons (~> 1.1.0) - - Gutenberg (from `https://github.com/wordpress-mobile/gutenberg-mobile.git`, commit `f408074e0a5daefe32df47ad1e8664a622841735`) + - Gutenberg (from `https://github.com/wordpress-mobile/gutenberg-mobile.git`, tag `v1.99.0`) - JTAppleCalendar (~> 8.0.2) - Kanvas (~> 1.4.4) - MediaEditor (>= 1.2.2, ~> 1.2) @@ -565,48 +565,48 @@ DEPENDENCIES: - "NSURL+IDN (~> 0.4)" - OCMock (~> 3.4.3) - OHHTTPStubs/Swift (~> 9.1.0) - - RCT-Folly (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RCT-Folly.podspec.json`) - - RCTRequired (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RCTRequired.podspec.json`) - - RCTTypeSafety (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RCTTypeSafety.podspec.json`) + - RCT-Folly (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/RCT-Folly.podspec.json`) + - RCTRequired (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/RCTRequired.podspec.json`) + - RCTTypeSafety (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/RCTTypeSafety.podspec.json`) - Reachability (= 3.2) - - React (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React.podspec.json`) - - React-bridging (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-bridging.podspec.json`) - - React-callinvoker (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-callinvoker.podspec.json`) - - React-Codegen (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-Codegen.podspec.json`) - - React-Core (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-Core.podspec.json`) - - React-CoreModules (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-CoreModules.podspec.json`) - - React-cxxreact (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-cxxreact.podspec.json`) - - React-jsi (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-jsi.podspec.json`) - - React-jsiexecutor (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-jsiexecutor.podspec.json`) - - React-jsinspector (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-jsinspector.podspec.json`) - - React-logger (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-logger.podspec.json`) - - react-native-blur (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/react-native-blur.podspec.json`) - - react-native-get-random-values (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/react-native-get-random-values.podspec.json`) - - react-native-safe-area (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/react-native-safe-area.podspec.json`) - - react-native-safe-area-context (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/react-native-safe-area-context.podspec.json`) - - react-native-slider (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/react-native-slider.podspec.json`) - - react-native-video (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/react-native-video.podspec.json`) - - react-native-webview (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/react-native-webview.podspec.json`) - - React-perflogger (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-perflogger.podspec.json`) - - React-RCTActionSheet (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTActionSheet.podspec.json`) - - React-RCTAnimation (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTAnimation.podspec.json`) - - React-RCTBlob (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTBlob.podspec.json`) - - React-RCTImage (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTImage.podspec.json`) - - React-RCTLinking (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTLinking.podspec.json`) - - React-RCTNetwork (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTNetwork.podspec.json`) - - React-RCTSettings (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTSettings.podspec.json`) - - React-RCTText (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTText.podspec.json`) - - React-RCTVibration (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTVibration.podspec.json`) - - React-runtimeexecutor (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-runtimeexecutor.podspec.json`) - - ReactCommon (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/ReactCommon.podspec.json`) - - RNCClipboard (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RNCClipboard.podspec.json`) - - RNCMaskedView (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RNCMaskedView.podspec.json`) - - RNFastImage (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RNFastImage.podspec.json`) - - RNGestureHandler (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RNGestureHandler.podspec.json`) - - RNReanimated (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RNReanimated.podspec.json`) - - RNScreens (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RNScreens.podspec.json`) - - RNSVG (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RNSVG.podspec.json`) - - RNTAztecView (from `https://github.com/wordpress-mobile/gutenberg-mobile.git`, commit `f408074e0a5daefe32df47ad1e8664a622841735`) + - React (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React.podspec.json`) + - React-bridging (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-bridging.podspec.json`) + - React-callinvoker (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-callinvoker.podspec.json`) + - React-Codegen (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-Codegen.podspec.json`) + - React-Core (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-Core.podspec.json`) + - React-CoreModules (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-CoreModules.podspec.json`) + - React-cxxreact (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-cxxreact.podspec.json`) + - React-jsi (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-jsi.podspec.json`) + - React-jsiexecutor (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-jsiexecutor.podspec.json`) + - React-jsinspector (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-jsinspector.podspec.json`) + - React-logger (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-logger.podspec.json`) + - react-native-blur (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/react-native-blur.podspec.json`) + - react-native-get-random-values (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/react-native-get-random-values.podspec.json`) + - react-native-safe-area (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/react-native-safe-area.podspec.json`) + - react-native-safe-area-context (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/react-native-safe-area-context.podspec.json`) + - react-native-slider (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/react-native-slider.podspec.json`) + - react-native-video (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/react-native-video.podspec.json`) + - react-native-webview (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/react-native-webview.podspec.json`) + - React-perflogger (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-perflogger.podspec.json`) + - React-RCTActionSheet (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-RCTActionSheet.podspec.json`) + - React-RCTAnimation (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-RCTAnimation.podspec.json`) + - React-RCTBlob (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-RCTBlob.podspec.json`) + - React-RCTImage (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-RCTImage.podspec.json`) + - React-RCTLinking (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-RCTLinking.podspec.json`) + - React-RCTNetwork (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-RCTNetwork.podspec.json`) + - React-RCTSettings (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-RCTSettings.podspec.json`) + - React-RCTText (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-RCTText.podspec.json`) + - React-RCTVibration (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-RCTVibration.podspec.json`) + - React-runtimeexecutor (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-runtimeexecutor.podspec.json`) + - ReactCommon (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/ReactCommon.podspec.json`) + - RNCClipboard (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/RNCClipboard.podspec.json`) + - RNCMaskedView (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/RNCMaskedView.podspec.json`) + - RNFastImage (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/RNFastImage.podspec.json`) + - RNGestureHandler (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/RNGestureHandler.podspec.json`) + - RNReanimated (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/RNReanimated.podspec.json`) + - RNScreens (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/RNScreens.podspec.json`) + - RNSVG (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/RNSVG.podspec.json`) + - RNTAztecView (from `https://github.com/wordpress-mobile/gutenberg-mobile.git`, tag `v1.99.0`) - Starscream (= 3.0.6) - SVProgressHUD (= 2.2.5) - SwiftLint (~> 0.50) @@ -616,7 +616,7 @@ DEPENDENCIES: - WordPressShared (~> 2.2-beta) - WordPressUI (~> 1.12.5) - WPMediaPicker (~> 1.8-beta) - - Yoga (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/Yoga.podspec.json`) + - Yoga (from `https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/Yoga.podspec.json`) - ZendeskSupportSDK (= 5.3.0) - ZIPFoundation (~> 0.9.8) @@ -677,121 +677,121 @@ SPEC REPOS: EXTERNAL SOURCES: boost: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/boost.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/boost.podspec.json BVLinearGradient: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/BVLinearGradient.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/BVLinearGradient.podspec.json FBLazyVector: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/FBLazyVector.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/FBLazyVector.podspec.json FBReactNativeSpec: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/FBReactNativeSpec/FBReactNativeSpec.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/FBReactNativeSpec/FBReactNativeSpec.podspec.json FSInteractiveMap: :git: https://github.com/wordpress-mobile/FSInteractiveMap.git :tag: 0.2.0 glog: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/glog.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/glog.podspec.json Gutenberg: - :commit: f408074e0a5daefe32df47ad1e8664a622841735 :git: https://github.com/wordpress-mobile/gutenberg-mobile.git :submodules: true + :tag: v1.99.0 RCT-Folly: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RCT-Folly.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/RCT-Folly.podspec.json RCTRequired: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RCTRequired.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/RCTRequired.podspec.json RCTTypeSafety: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RCTTypeSafety.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/RCTTypeSafety.podspec.json React: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React.podspec.json React-bridging: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-bridging.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-bridging.podspec.json React-callinvoker: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-callinvoker.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-callinvoker.podspec.json React-Codegen: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-Codegen.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-Codegen.podspec.json React-Core: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-Core.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-Core.podspec.json React-CoreModules: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-CoreModules.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-CoreModules.podspec.json React-cxxreact: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-cxxreact.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-cxxreact.podspec.json React-jsi: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-jsi.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-jsi.podspec.json React-jsiexecutor: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-jsiexecutor.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-jsiexecutor.podspec.json React-jsinspector: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-jsinspector.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-jsinspector.podspec.json React-logger: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-logger.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-logger.podspec.json react-native-blur: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/react-native-blur.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/react-native-blur.podspec.json react-native-get-random-values: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/react-native-get-random-values.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/react-native-get-random-values.podspec.json react-native-safe-area: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/react-native-safe-area.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/react-native-safe-area.podspec.json react-native-safe-area-context: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/react-native-safe-area-context.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/react-native-safe-area-context.podspec.json react-native-slider: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/react-native-slider.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/react-native-slider.podspec.json react-native-video: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/react-native-video.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/react-native-video.podspec.json react-native-webview: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/react-native-webview.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/react-native-webview.podspec.json React-perflogger: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-perflogger.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-perflogger.podspec.json React-RCTActionSheet: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTActionSheet.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-RCTActionSheet.podspec.json React-RCTAnimation: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTAnimation.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-RCTAnimation.podspec.json React-RCTBlob: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTBlob.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-RCTBlob.podspec.json React-RCTImage: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTImage.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-RCTImage.podspec.json React-RCTLinking: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTLinking.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-RCTLinking.podspec.json React-RCTNetwork: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTNetwork.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-RCTNetwork.podspec.json React-RCTSettings: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTSettings.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-RCTSettings.podspec.json React-RCTText: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTText.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-RCTText.podspec.json React-RCTVibration: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-RCTVibration.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-RCTVibration.podspec.json React-runtimeexecutor: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/React-runtimeexecutor.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/React-runtimeexecutor.podspec.json ReactCommon: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/ReactCommon.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/ReactCommon.podspec.json RNCClipboard: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RNCClipboard.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/RNCClipboard.podspec.json RNCMaskedView: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RNCMaskedView.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/RNCMaskedView.podspec.json RNFastImage: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RNFastImage.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/RNFastImage.podspec.json RNGestureHandler: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RNGestureHandler.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/RNGestureHandler.podspec.json RNReanimated: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RNReanimated.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/RNReanimated.podspec.json RNScreens: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RNScreens.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/RNScreens.podspec.json RNSVG: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/RNSVG.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/RNSVG.podspec.json RNTAztecView: - :commit: f408074e0a5daefe32df47ad1e8664a622841735 :git: https://github.com/wordpress-mobile/gutenberg-mobile.git :submodules: true + :tag: v1.99.0 Yoga: - :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/f408074e0a5daefe32df47ad1e8664a622841735/third-party-podspecs/Yoga.podspec.json + :podspec: https://raw.githubusercontent.com/wordpress-mobile/gutenberg-mobile/v1.99.0/third-party-podspecs/Yoga.podspec.json CHECKOUT OPTIONS: FSInteractiveMap: :git: https://github.com/wordpress-mobile/FSInteractiveMap.git :tag: 0.2.0 Gutenberg: - :commit: f408074e0a5daefe32df47ad1e8664a622841735 :git: https://github.com/wordpress-mobile/gutenberg-mobile.git :submodules: true + :tag: v1.99.0 RNTAztecView: - :commit: f408074e0a5daefe32df47ad1e8664a622841735 :git: https://github.com/wordpress-mobile/gutenberg-mobile.git :submodules: true + :tag: v1.99.0 SPEC CHECKSUMS: Alamofire: 3ec537f71edc9804815215393ae2b1a8ea33a844 From dd4573cf7ec29527489ef1eaef4bf535dc9ff048 Mon Sep 17 00:00:00 2001 From: Chris McGraw <2454408+wargcm@users.noreply.github.com> Date: Thu, 6 Jul 2023 15:24:00 -0400 Subject: [PATCH 29/72] Update string for Instagram to match API response --- .../Jetpack/Social/JetpackSocialNoConnectionView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPress/Classes/ViewRelated/Jetpack/Social/JetpackSocialNoConnectionView.swift b/WordPress/Classes/ViewRelated/Jetpack/Social/JetpackSocialNoConnectionView.swift index 2c2f6fa6303a..ed954d7c49d0 100644 --- a/WordPress/Classes/ViewRelated/Jetpack/Social/JetpackSocialNoConnectionView.swift +++ b/WordPress/Classes/ViewRelated/Jetpack/Social/JetpackSocialNoConnectionView.swift @@ -84,7 +84,7 @@ class JetpackSocialNoConnectionViewModel: ObservableObject { case twitter case tumblr case linkedin - case instagram + case instagram = "instagram-business" case mastodon case unknown From 03c166c688c0fb634f7e0b1fc620611b55ac69fa Mon Sep 17 00:00:00 2001 From: Chris McGraw <2454408+wargcm@users.noreply.github.com> Date: Thu, 6 Jul 2023 15:28:22 -0400 Subject: [PATCH 30/72] Split `configureShareCellForIndexPath` into multiple functions --- .../Post/PostSettingsViewController.m | 79 +++++++++++-------- 1 file changed, 48 insertions(+), 31 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Post/PostSettingsViewController.m b/WordPress/Classes/ViewRelated/Post/PostSettingsViewController.m index 2455b7f05a4d..4660be87b398 100644 --- a/WordPress/Classes/ViewRelated/Post/PostSettingsViewController.m +++ b/WordPress/Classes/ViewRelated/Post/PostSettingsViewController.m @@ -875,6 +875,49 @@ - (nullable NSURL *)urlForFeaturedImage { return featuredURL; } +- (UITableViewCell *)configureSocialCellForIndexPath:(NSIndexPath *)indexPath + connection:(PublicizeConnection *)connection + canEditSharing:(BOOL)canEditSharing + section:(NSInteger)section +{ + UITableViewCell *cell = [self getWPTableViewImageAndAccessoryCell]; + UIImage *image = [WPStyleGuide iconForService: connection.service]; + [cell.imageView setImage:image]; + if (canEditSharing) { + cell.imageView.tintColor = [WPStyleGuide tintColorForConnectedService: connection.service]; + } + cell.textLabel.text = connection.externalDisplay; + cell.textLabel.enabled = canEditSharing; + if (connection.isBroken) { + cell.accessoryView = section == PostSettingsSectionShare ? + [WPStyleGuide sharingCellWarningAccessoryImageView] : + [WPStyleGuide sharingCellErrorAccessoryImageView]; + } else { + UISwitch *switchAccessory = [[UISwitch alloc] initWithFrame:CGRectZero]; + // This interaction is handled at a cell level + switchAccessory.userInteractionEnabled = NO; + switchAccessory.on = ![self.post publicizeConnectionDisabledForKeyringID:connection.keyringConnectionID]; + switchAccessory.enabled = canEditSharing; + cell.accessoryView = switchAccessory; + } + cell.selectionStyle = UITableViewCellSelectionStyleNone; + cell.tag = PostSettingsRowShareConnection; + cell.accessibilityIdentifier = [NSString stringWithFormat:@"%@ %@", connection.service, connection.externalDisplay]; + return cell; +} + +- (UITableViewCell *)configureDisclosureCellWithSharing:(BOOL)canEditSharing +{ + UITableViewCell *cell = [self getWPTableViewDisclosureCell]; + cell.textLabel.text = NSLocalizedString(@"Message", @"Label for the share message field on the post settings."); + cell.textLabel.enabled = canEditSharing; + cell.detailTextLabel.text = self.post.publicizeMessage ? self.post.publicizeMessage : self.post.titleForDisplay; + cell.detailTextLabel.enabled = canEditSharing; + cell.tag = PostSettingsRowShareMessage; + cell.accessibilityIdentifier = @"Customize the message"; + return cell; +} + - (UITableViewCell *)configureShareCellForIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell; @@ -883,38 +926,12 @@ - (UITableViewCell *)configureShareCellForIndexPath:(NSIndexPath *)indexPath NSArray *connections = sec == PostSettingsSectionShare ? self.publicizeConnections : self.unsupportedConnections; if (indexPath.row < connections.count) { - cell = [self getWPTableViewImageAndAccessoryCell]; - PublicizeConnection *connection = connections[indexPath.row]; - UIImage *image = [WPStyleGuide iconForService: connection.service]; - [cell.imageView setImage:image]; - if (canEditSharing) { - cell.imageView.tintColor = [WPStyleGuide tintColorForConnectedService: connection.service]; - } - cell.textLabel.text = connection.externalDisplay; - cell.textLabel.enabled = canEditSharing; - if (connection.isBroken) { - cell.accessoryView = sec == PostSettingsSectionShare ? - [WPStyleGuide sharingCellWarningAccessoryImageView] : - [WPStyleGuide sharingCellErrorAccessoryImageView]; - } else { - UISwitch *switchAccessory = [[UISwitch alloc] initWithFrame:CGRectZero]; - // This interaction is handled at a cell level - switchAccessory.userInteractionEnabled = NO; - switchAccessory.on = ![self.post publicizeConnectionDisabledForKeyringID:connection.keyringConnectionID]; - switchAccessory.enabled = canEditSharing; - cell.accessoryView = switchAccessory; - } - cell.selectionStyle = UITableViewCellSelectionStyleNone; - cell.tag = PostSettingsRowShareConnection; - cell.accessibilityIdentifier = [NSString stringWithFormat:@"%@ %@", connection.service, connection.externalDisplay]; + cell = [self configureSocialCellForIndexPath:indexPath + connection:connections[indexPath.row] + canEditSharing:canEditSharing + section:sec]; } else { - cell = [self getWPTableViewDisclosureCell]; - cell.textLabel.text = NSLocalizedString(@"Message", @"Label for the share message field on the post settings."); - cell.textLabel.enabled = canEditSharing; - cell.detailTextLabel.text = self.post.publicizeMessage ? self.post.publicizeMessage : self.post.titleForDisplay; - cell.detailTextLabel.enabled = canEditSharing; - cell.tag = PostSettingsRowShareMessage; - cell.accessibilityIdentifier = @"Customize the message"; + cell = [self configureDisclosureCellWithSharing:canEditSharing]; } cell.userInteractionEnabled = canEditSharing; return cell; From 14da3efe961bc5f1b1ed51d9db56c260841a13c9 Mon Sep 17 00:00:00 2001 From: kean Date: Thu, 6 Jul 2023 15:47:44 -0400 Subject: [PATCH 31/72] Fix deprecation warnings --- .../ActionSheetViewController.swift | 47 ++++++++++--------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/WordPress/Classes/ViewRelated/System/Action Sheet/ActionSheetViewController.swift b/WordPress/Classes/ViewRelated/System/Action Sheet/ActionSheetViewController.swift index 246ce62f37ab..15562d1b6fab 100644 --- a/WordPress/Classes/ViewRelated/System/Action Sheet/ActionSheetViewController.swift +++ b/WordPress/Classes/ViewRelated/System/Action Sheet/ActionSheetViewController.swift @@ -33,8 +33,8 @@ class ActionSheetViewController: UIViewController { enum Button { static let height: CGFloat = 54 - static let contentInsets: UIEdgeInsets = UIEdgeInsets(top: 0, left: 18, bottom: 0, right: 35) - static let titleInsets: UIEdgeInsets = UIEdgeInsets(top: 0, left: 16, bottom: 0, right: 0) + static let contentInsets = NSDirectionalEdgeInsets(top: 0, leading: 18, bottom: 0, trailing: 35) + static let imagePadding: CGFloat = 16 static let imageTintColor: UIColor = .neutral(.shade30) static let font: UIFont = .preferredFont(forTextStyle: .callout) static let textColor: UIColor = .text @@ -147,27 +147,32 @@ class ActionSheetViewController: UIViewController { updateScrollViewHeight() } - private func createButton(_ handler: @escaping () -> Void) -> UIButton { - let button = UIButton(type: .custom, primaryAction: UIAction(handler: { _ in handler() })) - button.titleLabel?.font = Constants.Button.font - button.setTitleColor(Constants.Button.textColor, for: .normal) - button.imageView?.tintColor = Constants.Button.imageTintColor - button.setBackgroundImage(UIImage(color: .divider), for: .highlighted) - button.titleEdgeInsets = Constants.Button.titleInsets - button.naturalContentHorizontalAlignment = .leading - button.contentEdgeInsets = Constants.Button.contentInsets - button.translatesAutoresizingMaskIntoConstraints = false - button.flipInsetsForRightToLeftLayoutDirection() - button.titleLabel?.adjustsFontForContentSizeCategory = true - return button - } - private func button(_ info: ActionSheetButton) -> UIButton { - let button = createButton(info.action) - - button.setTitle(info.title, for: .normal) - button.setImage(info.image, for: .normal) + let button = UIButton(type: .system, primaryAction: UIAction(handler: { _ in info.action() })) + + button.configuration = { + var configuration = UIButton.Configuration.plain() + configuration.attributedTitle = { + var string = AttributedString(info.title) + string.font = Constants.Button.font + string.foregroundColor = Constants.Button.textColor + return string + }() + configuration.image = info.image + configuration.imageColorTransformer = UIConfigurationColorTransformer { _ in + Constants.Button.imageTintColor + } + configuration.imagePadding = Constants.Button.imagePadding + configuration.contentInsets = Constants.Button.contentInsets + configuration.background.cornerRadius = 0 + return configuration + }() + button.configurationUpdateHandler = { button in + button.configuration?.background.backgroundColor = button.isHighlighted ? .divider : .clear + } + button.contentHorizontalAlignment = .leading button.accessibilityIdentifier = info.identifier + button.translatesAutoresizingMaskIntoConstraints = false if let badge = info.badge { button.addSubview(badge) From 38517cf8723239a1d9a91f594e940ec6933dd2af Mon Sep 17 00:00:00 2001 From: Chris McGraw <2454408+wargcm@users.noreply.github.com> Date: Thu, 6 Jul 2023 16:17:45 -0400 Subject: [PATCH 32/72] Update social icons on the post settings screen --- .../Blog/WPStyleGuide+Sharing.swift | 8 +++++++ .../JetpackSocialNoConnectionView.swift | 21 +------------------ .../Post/PostSettingsViewController.m | 10 +++++++-- .../Contents.json | 0 .../icon-instagram.svg | 0 5 files changed, 17 insertions(+), 22 deletions(-) rename WordPress/Jetpack/AppImages.xcassets/Social/{icon-instagram.imageset => icon-instagram-business.imageset}/Contents.json (100%) rename WordPress/Jetpack/AppImages.xcassets/Social/{icon-instagram.imageset => icon-instagram-business.imageset}/icon-instagram.svg (100%) diff --git a/WordPress/Classes/ViewRelated/Blog/WPStyleGuide+Sharing.swift b/WordPress/Classes/ViewRelated/Blog/WPStyleGuide+Sharing.swift index 86d845df4d09..b5a780414504 100644 --- a/WordPress/Classes/ViewRelated/Blog/WPStyleGuide+Sharing.swift +++ b/WordPress/Classes/ViewRelated/Blog/WPStyleGuide+Sharing.swift @@ -69,6 +69,14 @@ extension WPStyleGuide { return image!.withRenderingMode(.alwaysTemplate) } + @objc public class func socialIcon(for service: NSString) -> UIImage { + guard FeatureFlag.jetpackSocial.enabled else { + return iconForService(service) + } + + return UIImage(named: "icon-\(service)") ?? iconForService(service) + } + /// Get's the tint color to use for the specified service when it is connected. /// diff --git a/WordPress/Classes/ViewRelated/Jetpack/Social/JetpackSocialNoConnectionView.swift b/WordPress/Classes/ViewRelated/Jetpack/Social/JetpackSocialNoConnectionView.swift index ed954d7c49d0..b604d0804cf0 100644 --- a/WordPress/Classes/ViewRelated/Jetpack/Social/JetpackSocialNoConnectionView.swift +++ b/WordPress/Classes/ViewRelated/Jetpack/Social/JetpackSocialNoConnectionView.swift @@ -87,25 +87,6 @@ class JetpackSocialNoConnectionViewModel: ObservableObject { case instagram = "instagram-business" case mastodon case unknown - - var image: UIImage? { - switch self { - case .facebook: - return UIImage(named: "icon-facebook") - case .twitter: - return UIImage(named: "icon-twitter") - case .tumblr: - return UIImage(named: "icon-tumblr") - case .linkedin: - return UIImage(named: "icon-linkedin") - case .instagram: - return UIImage(named: "icon-instagram") - case .mastodon: - return UIImage(named: "icon-mastodon") - case .unknown: - return UIImage(named: "social-default")?.withRenderingMode(.alwaysTemplate) - } - } } private func updateIcons(_ services: [PublicizeService]) { @@ -113,7 +94,7 @@ class JetpackSocialNoConnectionViewModel: ObservableObject { var downloadTasks: [(url: URL, index: Int)] = [] for (index, service) in services.enumerated() { let serviceType = JetpackSocialService(rawValue: service.serviceID) ?? .unknown - let icon = serviceType.image ?? UIImage() + let icon = WPStyleGuide.socialIcon(for: service.serviceID as NSString) icons.append(icon) if serviceType == .unknown { diff --git a/WordPress/Classes/ViewRelated/Post/PostSettingsViewController.m b/WordPress/Classes/ViewRelated/Post/PostSettingsViewController.m index 4660be87b398..f2527725dc2f 100644 --- a/WordPress/Classes/ViewRelated/Post/PostSettingsViewController.m +++ b/WordPress/Classes/ViewRelated/Post/PostSettingsViewController.m @@ -880,10 +880,16 @@ - (UITableViewCell *)configureSocialCellForIndexPath:(NSIndexPath *)indexPath canEditSharing:(BOOL)canEditSharing section:(NSInteger)section { + BOOL isJetpackSocialEnabled = [Feature enabled:FeatureFlagJetpackSocial]; UITableViewCell *cell = [self getWPTableViewImageAndAccessoryCell]; - UIImage *image = [WPStyleGuide iconForService: connection.service]; + UIImage *image = [WPStyleGuide socialIconFor:connection.service]; + if (isJetpackSocialEnabled) { + image = [image resizedImageWithContentMode:UIViewContentModeScaleAspectFill + bounds:CGSizeMake(28.0, 28.0) + interpolationQuality:kCGInterpolationDefault]; + } [cell.imageView setImage:image]; - if (canEditSharing) { + if (canEditSharing && !isJetpackSocialEnabled) { cell.imageView.tintColor = [WPStyleGuide tintColorForConnectedService: connection.service]; } cell.textLabel.text = connection.externalDisplay; diff --git a/WordPress/Jetpack/AppImages.xcassets/Social/icon-instagram.imageset/Contents.json b/WordPress/Jetpack/AppImages.xcassets/Social/icon-instagram-business.imageset/Contents.json similarity index 100% rename from WordPress/Jetpack/AppImages.xcassets/Social/icon-instagram.imageset/Contents.json rename to WordPress/Jetpack/AppImages.xcassets/Social/icon-instagram-business.imageset/Contents.json diff --git a/WordPress/Jetpack/AppImages.xcassets/Social/icon-instagram.imageset/icon-instagram.svg b/WordPress/Jetpack/AppImages.xcassets/Social/icon-instagram-business.imageset/icon-instagram.svg similarity index 100% rename from WordPress/Jetpack/AppImages.xcassets/Social/icon-instagram.imageset/icon-instagram.svg rename to WordPress/Jetpack/AppImages.xcassets/Social/icon-instagram-business.imageset/icon-instagram.svg From d31f77c85f613234a78bba924b9d3a321ea56735 Mon Sep 17 00:00:00 2001 From: kean Date: Thu, 6 Jul 2023 16:28:17 -0400 Subject: [PATCH 33/72] Fix WPTableViewHandler warnings --- .../Controllers/NotificationsViewController.swift | 6 ++++-- .../ViewRelated/Post/AbstractPostListViewController.swift | 2 +- .../Post/Revisions/RevisionsTableViewController.swift | 2 +- .../Reader/Manage/ReaderTagsTableViewModel.swift | 2 +- .../Reader/ReaderCardsStreamViewController.swift | 2 +- .../Reader/ReaderFollowedSitesViewController.swift | 2 +- .../Reader/ReaderSearchSuggestionsViewController.swift | 2 +- .../ViewRelated/Reader/ReaderStreamViewController.swift | 2 +- WordPress/WordPressTest/PostListTableViewHandlerTests.swift | 2 +- 9 files changed, 12 insertions(+), 10 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Notifications/Controllers/NotificationsViewController.swift b/WordPress/Classes/ViewRelated/Notifications/Controllers/NotificationsViewController.swift index 5b769ed57fc7..ac451be152ef 100644 --- a/WordPress/Classes/ViewRelated/Notifications/Controllers/NotificationsViewController.swift +++ b/WordPress/Classes/ViewRelated/Notifications/Controllers/NotificationsViewController.swift @@ -1373,7 +1373,7 @@ extension NotificationsViewController: WPTableViewHandlerDelegate { return ContextManager.sharedInstance().mainContext } - func fetchRequest() -> NSFetchRequest { + func fetchRequest() -> NSFetchRequest? { let request = NSFetchRequest(entityName: entityName()) request.sortDescriptors = [NSSortDescriptor(key: Filter.sortKey, ascending: false)] request.predicate = predicateForFetchRequest() @@ -1817,7 +1817,9 @@ extension NotificationsViewController: WPSplitViewControllerDetailProvider { private func fetchFirstNotification() -> Notification? { let context = managedObjectContext() - let fetchRequest = self.fetchRequest() + guard let fetchRequest = self.fetchRequest() else { + return nil + } fetchRequest.fetchLimit = 1 if let results = try? context.fetch(fetchRequest) as? [Notification] { diff --git a/WordPress/Classes/ViewRelated/Post/AbstractPostListViewController.swift b/WordPress/Classes/ViewRelated/Post/AbstractPostListViewController.swift index 5a8c7d549669..d1eb6df8f35d 100644 --- a/WordPress/Classes/ViewRelated/Post/AbstractPostListViewController.swift +++ b/WordPress/Classes/ViewRelated/Post/AbstractPostListViewController.swift @@ -434,7 +434,7 @@ class AbstractPostListViewController: UIViewController, return ContextManager.sharedInstance().mainContext } - func fetchRequest() -> NSFetchRequest { + func fetchRequest() -> NSFetchRequest? { let fetchRequest = NSFetchRequest(entityName: entityName()) fetchRequest.predicate = predicateForFetchRequest() fetchRequest.sortDescriptors = sortDescriptorsForFetchRequest() diff --git a/WordPress/Classes/ViewRelated/Post/Revisions/RevisionsTableViewController.swift b/WordPress/Classes/ViewRelated/Post/Revisions/RevisionsTableViewController.swift index 83f96b3ee6bc..4a87ad95ad75 100644 --- a/WordPress/Classes/ViewRelated/Post/Revisions/RevisionsTableViewController.swift +++ b/WordPress/Classes/ViewRelated/Post/Revisions/RevisionsTableViewController.swift @@ -173,7 +173,7 @@ extension RevisionsTableViewController: WPTableViewHandlerDelegate { return ContextManager.sharedInstance().mainContext } - func fetchRequest() -> NSFetchRequest { + func fetchRequest() -> NSFetchRequest? { guard let postId = post?.postID, let siteId = post?.blog.dotComID else { preconditionFailure("Expected a postId or a siteId") } diff --git a/WordPress/Classes/ViewRelated/Reader/Manage/ReaderTagsTableViewModel.swift b/WordPress/Classes/ViewRelated/Reader/Manage/ReaderTagsTableViewModel.swift index 811f6f7b958b..b47e448c9ae6 100644 --- a/WordPress/Classes/ViewRelated/Reader/Manage/ReaderTagsTableViewModel.swift +++ b/WordPress/Classes/ViewRelated/Reader/Manage/ReaderTagsTableViewModel.swift @@ -27,7 +27,7 @@ extension ReaderTagsTableViewModel: WPTableViewHandlerDelegate { return context } - func fetchRequest() -> NSFetchRequest { + func fetchRequest() -> NSFetchRequest? { return ReaderTagTopic.tagsFetchRequest } diff --git a/WordPress/Classes/ViewRelated/Reader/ReaderCardsStreamViewController.swift b/WordPress/Classes/ViewRelated/Reader/ReaderCardsStreamViewController.swift index 151348ea572a..d408e6f715e6 100644 --- a/WordPress/Classes/ViewRelated/Reader/ReaderCardsStreamViewController.swift +++ b/WordPress/Classes/ViewRelated/Reader/ReaderCardsStreamViewController.swift @@ -175,7 +175,7 @@ class ReaderCardsStreamViewController: ReaderStreamViewController { // MARK: - TableViewHandler - override func fetchRequest() -> NSFetchRequest { + override func fetchRequest() -> NSFetchRequest? { let fetchRequest = NSFetchRequest(entityName: ReaderCard.classNameWithoutNamespaces()) fetchRequest.sortDescriptors = sortDescriptorsForFetchRequest(ascending: true) return fetchRequest diff --git a/WordPress/Classes/ViewRelated/Reader/ReaderFollowedSitesViewController.swift b/WordPress/Classes/ViewRelated/Reader/ReaderFollowedSitesViewController.swift index c97a5963bdc6..7bacde97f10e 100644 --- a/WordPress/Classes/ViewRelated/Reader/ReaderFollowedSitesViewController.swift +++ b/WordPress/Classes/ViewRelated/Reader/ReaderFollowedSitesViewController.swift @@ -393,7 +393,7 @@ extension ReaderFollowedSitesViewController: WPTableViewHandlerDelegate { } - func fetchRequest() -> NSFetchRequest { + func fetchRequest() -> NSFetchRequest? { let fetchRequest = NSFetchRequest(entityName: "ReaderSiteTopic") fetchRequest.predicate = NSPredicate(format: "following = YES") diff --git a/WordPress/Classes/ViewRelated/Reader/ReaderSearchSuggestionsViewController.swift b/WordPress/Classes/ViewRelated/Reader/ReaderSearchSuggestionsViewController.swift index c8483a61d375..f4dec4489ba2 100644 --- a/WordPress/Classes/ViewRelated/Reader/ReaderSearchSuggestionsViewController.swift +++ b/WordPress/Classes/ViewRelated/Reader/ReaderSearchSuggestionsViewController.swift @@ -176,7 +176,7 @@ extension ReaderSearchSuggestionsViewController: WPTableViewHandlerDelegate { } - func fetchRequest() -> NSFetchRequest { + func fetchRequest() -> NSFetchRequest? { let request = NSFetchRequest(entityName: "ReaderSearchSuggestion") request.predicate = predicateForFetchRequest() request.sortDescriptors = [NSSortDescriptor(key: "date", ascending: false)] diff --git a/WordPress/Classes/ViewRelated/Reader/ReaderStreamViewController.swift b/WordPress/Classes/ViewRelated/Reader/ReaderStreamViewController.swift index 94b5ecbaa75a..fa55dfab257f 100644 --- a/WordPress/Classes/ViewRelated/Reader/ReaderStreamViewController.swift +++ b/WordPress/Classes/ViewRelated/Reader/ReaderStreamViewController.swift @@ -1494,7 +1494,7 @@ extension ReaderStreamViewController: WPTableViewHandlerDelegate { } - func fetchRequest() -> NSFetchRequest { + func fetchRequest() -> NSFetchRequest? { let fetchRequest = NSFetchRequest(entityName: ReaderPost.classNameWithoutNamespaces()) fetchRequest.predicate = predicateForFetchRequest() fetchRequest.sortDescriptors = sortDescriptorsForFetchRequest() diff --git a/WordPress/WordPressTest/PostListTableViewHandlerTests.swift b/WordPress/WordPressTest/PostListTableViewHandlerTests.swift index b5a08b61a5cd..90d812ebd94f 100644 --- a/WordPress/WordPressTest/PostListTableViewHandlerTests.swift +++ b/WordPress/WordPressTest/PostListTableViewHandlerTests.swift @@ -22,7 +22,7 @@ class PostListHandlerMock: NSObject, WPTableViewHandlerDelegate { return setUpInMemoryManagedObjectContext() } - func fetchRequest() -> NSFetchRequest { + func fetchRequest() -> NSFetchRequest? { let a = NSFetchRequest(entityName: String(describing: Post.self)) a.sortDescriptors = [NSSortDescriptor(key: BasePost.statusKeyPath, ascending: true)] return a From 0e902de3655ec71e85070868ceb4c72767f1e3b4 Mon Sep 17 00:00:00 2001 From: Chris McGraw <2454408+wargcm@users.noreply.github.com> Date: Thu, 6 Jul 2023 17:01:15 -0400 Subject: [PATCH 34/72] Open social purchase link on subscribe now tap --- .../PostSettingsViewController+JetpackSocial.swift | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Post/PostSettingsViewController+JetpackSocial.swift b/WordPress/Classes/ViewRelated/Post/PostSettingsViewController+JetpackSocial.swift index f72fc1e1f7a1..9d360d61ec96 100644 --- a/WordPress/Classes/ViewRelated/Post/PostSettingsViewController+JetpackSocial.swift +++ b/WordPress/Classes/ViewRelated/Post/PostSettingsViewController+JetpackSocial.swift @@ -44,9 +44,17 @@ extension PostSettingsViewController { } @objc func createRemainingSharesView() -> UIView { - let viewModel = JetpackSocialRemainingSharesViewModel { - // TODO - print("Subscribe tap") + let viewModel = JetpackSocialRemainingSharesViewModel { [weak self] in + guard let blog = self?.apost.blog, + let hostname = blog.hostname, + let url = URL(string: "https://wordpress.com/checkout/\(hostname)/jetpack_social_basic_yearly") else { + return + } + let webViewController = WebViewControllerFactory.controller(url: url, + blog: blog, + source: "post_settings_remaining_shares_subscribe_now") + let navigationController = UINavigationController(rootViewController: webViewController) + self?.present(navigationController, animated: true) } let hostController = UIHostingController(rootView: JetpackSocialSettingsRemainingSharesView(viewModel: viewModel)) hostController.view.translatesAutoresizingMaskIntoConstraints = false From 5fbb2b5ab2c6d80086873ac4e33e269ca9c0c5da Mon Sep 17 00:00:00 2001 From: Chris McGraw <2454408+wargcm@users.noreply.github.com> Date: Thu, 6 Jul 2023 18:08:14 -0400 Subject: [PATCH 35/72] Update display rules and values for the remaining shares view --- ...ackSocialSettingsRemainingSharesView.swift | 6 +-- ...SettingsViewController+JetpackSocial.swift | 44 ++++++++++++++----- 2 files changed, 35 insertions(+), 15 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Jetpack/Social/JetpackSocialSettingsRemainingSharesView.swift b/WordPress/Classes/ViewRelated/Jetpack/Social/JetpackSocialSettingsRemainingSharesView.swift index 5ae47080ef46..5abedd1a851f 100644 --- a/WordPress/Classes/ViewRelated/Jetpack/Social/JetpackSocialSettingsRemainingSharesView.swift +++ b/WordPress/Classes/ViewRelated/Jetpack/Social/JetpackSocialSettingsRemainingSharesView.swift @@ -59,9 +59,9 @@ struct JetpackSocialRemainingSharesViewModel { let displayWarning: Bool let onSubscribeTap: () -> Void - init(remaining: Int = 27, - limit: Int = 30, - displayWarning: Bool = false, + init(remaining: Int, + limit: Int, + displayWarning: Bool, onSubscribeTap: @escaping () -> Void) { self.remaining = remaining self.limit = limit diff --git a/WordPress/Classes/ViewRelated/Post/PostSettingsViewController+JetpackSocial.swift b/WordPress/Classes/ViewRelated/Post/PostSettingsViewController+JetpackSocial.swift index 9d360d61ec96..e13679a84856 100644 --- a/WordPress/Classes/ViewRelated/Post/PostSettingsViewController+JetpackSocial.swift +++ b/WordPress/Classes/ViewRelated/Post/PostSettingsViewController+JetpackSocial.swift @@ -36,26 +36,31 @@ extension PostSettingsViewController { let isJetpackSocialEnabled = FeatureFlag.jetpackSocial.enabled let blogSupportsPublicize = apost.blog.supportsPublicize() let blogHasConnections = publicizeConnections.count > 0 - // TODO: Check if there's a share limit + let isSocialSharingLimited = apost.blog.isSocialSharingLimited + let blogHasPublicizeInfo = apost.blog.publicizeInfo != nil return isJetpackSocialEnabled && blogSupportsPublicize && blogHasConnections + && isSocialSharingLimited + && blogHasPublicizeInfo } + + @objc func createRemainingSharesView() -> UIView { - let viewModel = JetpackSocialRemainingSharesViewModel { [weak self] in - guard let blog = self?.apost.blog, - let hostname = blog.hostname, - let url = URL(string: "https://wordpress.com/checkout/\(hostname)/jetpack_social_basic_yearly") else { - return - } - let webViewController = WebViewControllerFactory.controller(url: url, - blog: blog, - source: "post_settings_remaining_shares_subscribe_now") - let navigationController = UINavigationController(rootViewController: webViewController) - self?.present(navigationController, animated: true) + guard let sharingLimit = apost.blog.sharingLimit else { + // This scenario *shouldn't* happen since we check that the publicize info is not nil before + // showing this view + assertionFailure("No sharing limit on the blog") + return UIView() } + + let shouldDisplayWarning = publicizeConnections.count > sharingLimit.remaining + let viewModel = JetpackSocialRemainingSharesViewModel(remaining: sharingLimit.remaining, + limit: sharingLimit.limit, + displayWarning: shouldDisplayWarning, + onSubscribeTap: onSubscribeTap()) let hostController = UIHostingController(rootView: JetpackSocialSettingsRemainingSharesView(viewModel: viewModel)) hostController.view.translatesAutoresizingMaskIntoConstraints = false hostController.view.backgroundColor = .listForeground @@ -96,6 +101,21 @@ private extension PostSettingsViewController { } } + func onSubscribeTap() -> () -> Void { + return { [weak self] in + guard let blog = self?.apost.blog, + let hostname = blog.hostname, + let url = URL(string: "https://wordpress.com/checkout/\(hostname)/jetpack_social_basic_yearly") else { + return + } + let webViewController = WebViewControllerFactory.controller(url: url, + blog: blog, + source: "post_settings_remaining_shares_subscribe_now") + let navigationController = UINavigationController(rootViewController: webViewController) + self?.present(navigationController, animated: true) + } + } + func availableServices() -> [PublicizeService] { let context = apost.managedObjectContext ?? ContextManager.shared.mainContext let services = try? PublicizeService.allPublicizeServices(in: context) From 13e4fb7ea319ad75899f7394d52bd7e7f956dd76 Mon Sep 17 00:00:00 2001 From: Tony Li Date: Fri, 7 Jul 2023 11:54:18 +1200 Subject: [PATCH 36/72] Move liked users query to a static function --- .../Services/CommentService+Likes.swift | 37 +++---------------- .../Classes/Services/LikeUserHelpers.swift | 36 ++++++++++++++---- .../Classes/Services/PostService+Likes.swift | 3 +- .../Likes/LikesListController.swift | 4 +- 4 files changed, 38 insertions(+), 42 deletions(-) diff --git a/WordPress/Classes/Services/CommentService+Likes.swift b/WordPress/Classes/Services/CommentService+Likes.swift index fa2d761440c2..188a623805ea 100644 --- a/WordPress/Classes/Services/CommentService+Likes.swift +++ b/WordPress/Classes/Services/CommentService+Likes.swift @@ -40,9 +40,10 @@ extension CommentService { commentID: commentID, siteID: siteID, purgeExisting: purgeExisting) { - let users = self.likeUsersFor(commentID: commentID, siteID: siteID) + assert(Thread.isMainThread) + + let users = LikeUserHelper.likeUsersFor(commentID: commentID, siteID: siteID, in: self.coreDataStack.mainContext) success(users, totalLikes.intValue, count) - LikeUserHelper.purgeStaleLikes() } }, failure: { error in DDLogError(String(describing: error)) @@ -50,36 +51,6 @@ extension CommentService { }) } - /** - Fetches a list of users from Core Data that liked the comment with the given IDs. - - @param commentID The ID of the comment to fetch likes for. - @param siteID The ID of the site that contains the post. - @param after Filter results to likes after this Date. Optional. - */ - func likeUsersFor(commentID: NSNumber, siteID: NSNumber, after: Date? = nil) -> [LikeUser] { - self.coreDataStack.performQuery { context in - let request = LikeUser.fetchRequest() as NSFetchRequest - - request.predicate = { - if let after = after { - // The date comparison is 'less than' because Likes are in descending order. - return NSPredicate(format: "likedSiteID = %@ AND likedCommentID = %@ AND dateLiked < %@", siteID, commentID, after as CVarArg) - } - - return NSPredicate(format: "likedSiteID = %@ AND likedCommentID = %@", siteID, commentID) - }() - - request.sortDescriptors = [NSSortDescriptor(key: "dateLiked", ascending: false)] - - if let users = try? context.fetch(request) { - return users - } - - return [LikeUser]() - } - } - } private extension CommentService { @@ -106,6 +77,8 @@ private extension CommentService { if purgeExisting { self.deleteExistingUsersFor(commentID: commentID, siteID: siteID, from: derivedContext, likesToKeep: likers) } + + LikeUserHelper.purgeStaleLikes(fromContext: derivedContext) }, completion: onComplete, on: .main) } diff --git a/WordPress/Classes/Services/LikeUserHelpers.swift b/WordPress/Classes/Services/LikeUserHelpers.swift index b96f0df1c2fc..8c3f0b21ba92 100644 --- a/WordPress/Classes/Services/LikeUserHelpers.swift +++ b/WordPress/Classes/Services/LikeUserHelpers.swift @@ -39,6 +39,34 @@ import CoreData return try? context.fetch(request).first } + /** + Fetches a list of users from Core Data that liked the comment with the given IDs. + + @param commentID The ID of the comment to fetch likes for. + @param siteID The ID of the site that contains the post. + @param after Filter results to likes after this Date. Optional. + */ + class func likeUsersFor(commentID: NSNumber, siteID: NSNumber, after: Date? = nil, in context: NSManagedObjectContext) -> [LikeUser] { + let request = LikeUser.fetchRequest() as NSFetchRequest + + request.predicate = { + if let after = after { + // The date comparison is 'less than' because Likes are in descending order. + return NSPredicate(format: "likedSiteID = %@ AND likedCommentID = %@ AND dateLiked < %@", siteID, commentID, after as CVarArg) + } + + return NSPredicate(format: "likedSiteID = %@ AND likedCommentID = %@", siteID, commentID) + }() + + request.sortDescriptors = [NSSortDescriptor(key: "dateLiked", ascending: false)] + + if let users = try? context.fetch(request) { + return users + } + + return [LikeUser]() + } + private class func updatePreferredBlog(for user: LikeUser, with remoteUser: RemoteLikeUser, context: NSManagedObjectContext) { guard let remotePreferredBlog = remoteUser.preferredBlog else { if let existingPreferredBlog = user.preferredBlog { @@ -58,14 +86,8 @@ import CoreData preferredBlog.user = user } - class func purgeStaleLikes() { - ContextManager.shared.performAndSave { - purgeStaleLikes(fromContext: $0) - } - } - // Delete all LikeUsers that were last fetched at least 7 days ago. - private class func purgeStaleLikes(fromContext context: NSManagedObjectContext) { + class func purgeStaleLikes(fromContext context: NSManagedObjectContext) { guard let staleDate = Calendar.current.date(byAdding: .day, value: -7, to: Date()) else { DDLogError("Error creating date to purge stale Likes.") return diff --git a/WordPress/Classes/Services/PostService+Likes.swift b/WordPress/Classes/Services/PostService+Likes.swift index fccfda6d5cbd..97cb37375d40 100644 --- a/WordPress/Classes/Services/PostService+Likes.swift +++ b/WordPress/Classes/Services/PostService+Likes.swift @@ -42,7 +42,6 @@ extension PostService { purgeExisting: purgeExisting) { let users = self.likeUsersFor(postID: postID, siteID: siteID) success(users, totalLikes.intValue, count) - LikeUserHelper.purgeStaleLikes() } }, failure: { error in DDLogError(String(describing: error)) @@ -104,6 +103,8 @@ private extension PostService { if purgeExisting { self.deleteExistingUsersFor(postID: postID, siteID: siteID, from: derivedContext, likesToKeep: likers) } + + LikeUserHelper.purgeStaleLikes(fromContext: derivedContext) }, completion: onComplete, on: .main) } diff --git a/WordPress/Classes/ViewRelated/Likes/LikesListController.swift b/WordPress/Classes/ViewRelated/Likes/LikesListController.swift index 5f0b99ea7b09..b4a8bcfb400b 100644 --- a/WordPress/Classes/ViewRelated/Likes/LikesListController.swift +++ b/WordPress/Classes/ViewRelated/Likes/LikesListController.swift @@ -231,7 +231,7 @@ class LikesListController: NSObject { case .post(let postID): likingUsers = postService.likeUsersFor(postID: postID, siteID: siteID) case .comment(let commentID): - likingUsers = commentService.likeUsersFor(commentID: commentID, siteID: siteID) + likingUsers = LikeUserHelper.likeUsersFor(commentID: commentID, siteID: siteID, in: ContextManager.shared.mainContext) } } @@ -283,7 +283,7 @@ class LikesListController: NSObject { case .post(let postID): fetchedUsers = postService.likeUsersFor(postID: postID, siteID: siteID, after: modifiedDate) case .comment(let commentID): - fetchedUsers = commentService.likeUsersFor(commentID: commentID, siteID: siteID, after: modifiedDate) + fetchedUsers = LikeUserHelper.likeUsersFor(commentID: commentID, siteID: siteID, after: modifiedDate, in: ContextManager.shared.mainContext) } excludeUserIDs = fetchedUsers.map { NSNumber(value: $0.userID) } From dfc2007f199e01b3c2beb3f4fb7216f5ce2ac58f Mon Sep 17 00:00:00 2001 From: Tony Li Date: Fri, 7 Jul 2023 14:02:39 +1200 Subject: [PATCH 37/72] Replace Blog argument with URL --- .../Utility/Editor/GutenbergSettings.swift | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/WordPress/Classes/Utility/Editor/GutenbergSettings.swift b/WordPress/Classes/Utility/Editor/GutenbergSettings.swift index c15048e33866..bfac423a6b1e 100644 --- a/WordPress/Classes/Utility/Editor/GutenbergSettings.swift +++ b/WordPress/Classes/Utility/Editor/GutenbergSettings.swift @@ -4,19 +4,19 @@ class GutenbergSettings { // MARK: - Enabled Editors Keys enum Key { static let appWideEnabled = "kUserDefaultsGutenbergEditorEnabled" - static func enabledOnce(for blog: Blog) -> String { - let url = urlStringFrom(blog) + static func enabledOnce(forBlogURL url: String?) -> String { + let url = urlString(fromBlogURL: url) return "com.wordpress.gutenberg-autoenabled-" + url } - static func showPhase2Dialog(for blog: Blog) -> String { - let url = urlStringFrom(blog) + static func showPhase2Dialog(forBlogURL url: String?) -> String { + let url = urlString(fromBlogURL: url) return "kShowGutenbergPhase2Dialog-" + url } static let focalPointPickerTooltipShown = "kGutenbergFocalPointPickerTooltipShown" static let blockTypeImpressions = "kBlockTypeImpressions" - private static func urlStringFrom(_ blog: Blog) -> String { - return (blog.url ?? "") + private static func urlString(fromBlogURL url: String?) -> String { + return (url ?? "") // New sites will add a slash at the end of URL. // This is removed when the URL is refreshed from remote. // Removing trailing '/' in case there is one for consistency. @@ -61,7 +61,7 @@ class GutenbergSettings { softSetGutenbergEnabled(isEnabled, for: blog, source: source) if isEnabled { - database.set(true, forKey: Key.enabledOnce(for: blog)) + database.set(true, forKey: Key.enabledOnce(forBlogURL: blog.url)) } } @@ -86,7 +86,7 @@ class GutenbergSettings { allBlogs.forEach { blog in if blog.editor == .aztec { setShowPhase2Dialog(true, for: blog) - database.set(true, forKey: Key.enabledOnce(for: blog)) + database.set(true, forKey: Key.enabledOnce(forBlogURL: blog.url)) } } let editorSettingsService = EditorSettingsService(coreDataStack: coreDataStack) @@ -96,11 +96,11 @@ class GutenbergSettings { } func shouldPresentInformativeDialog(for blog: Blog) -> Bool { - return database.bool(forKey: Key.showPhase2Dialog(for: blog)) + return database.bool(forKey: Key.showPhase2Dialog(forBlogURL: blog.url)) } func setShowPhase2Dialog(_ showDialog: Bool, for blog: Blog) { - database.set(showDialog, forKey: Key.showPhase2Dialog(for: blog)) + database.set(showDialog, forKey: Key.showPhase2Dialog(forBlogURL: blog.url)) } /// Sets gutenberg enabled without registering the enabled action ("enabledOnce") @@ -153,7 +153,7 @@ class GutenbergSettings { /// True if gutenberg editor has been enabled at least once on the given blog func wasGutenbergEnabledOnce(for blog: Blog) -> Bool { - return database.object(forKey: Key.enabledOnce(for: blog)) != nil + return database.object(forKey: Key.enabledOnce(forBlogURL: blog.url)) != nil } /// True if gutenberg should be autoenabled for the blog hosting the given post. @@ -162,7 +162,7 @@ class GutenbergSettings { } func willShowDialog(for blog: Blog) { - database.set(true, forKey: Key.enabledOnce(for: blog)) + database.set(true, forKey: Key.enabledOnce(forBlogURL: blog.url)) } /// True if it should show the tooltip for the focal point picker @@ -208,7 +208,7 @@ class GutenbergSettings { } func getDefaultEditor(for blog: Blog) -> MobileEditor { - database.set(true, forKey: Key.enabledOnce(for: blog)) + database.set(true, forKey: Key.enabledOnce(forBlogURL: blog.url)) return .gutenberg } } From 288c26e736187f87e958e3738cb9655075b5c798 Mon Sep 17 00:00:00 2001 From: Tony Li Date: Fri, 7 Jul 2023 14:50:09 +1200 Subject: [PATCH 38/72] Return blog urls from performQuery call --- .../Utility/Editor/GutenbergSettings.swift | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/WordPress/Classes/Utility/Editor/GutenbergSettings.swift b/WordPress/Classes/Utility/Editor/GutenbergSettings.swift index bfac423a6b1e..228083e8eae9 100644 --- a/WordPress/Classes/Utility/Editor/GutenbergSettings.swift +++ b/WordPress/Classes/Utility/Editor/GutenbergSettings.swift @@ -82,12 +82,16 @@ class GutenbergSettings { } private func setGutenbergEnabledForAllSites() { - let allBlogs = coreDataStack.performQuery({ (try? BlogQuery().blogs(in: $0)) ?? [] }) - allBlogs.forEach { blog in - if blog.editor == .aztec { - setShowPhase2Dialog(true, for: blog) - database.set(true, forKey: Key.enabledOnce(forBlogURL: blog.url)) - } + let blogURLs: [String?] = coreDataStack.performQuery { context in + guard let blogs = try? BlogQuery().blogs(in: context) else { return [] } + + return blogs + .filter { $0.editor == .aztec } + .map { $0.url } + } + blogURLs.forEach { blogURL in + setShowPhase2Dialog(true, forBlogURL: blogURL) + database.set(true, forKey: Key.enabledOnce(forBlogURL: blogURL)) } let editorSettingsService = EditorSettingsService(coreDataStack: coreDataStack) editorSettingsService.migrateGlobalSettingToRemote(isGutenbergEnabled: true, overrideRemote: true, onSuccess: { @@ -103,6 +107,10 @@ class GutenbergSettings { database.set(showDialog, forKey: Key.showPhase2Dialog(forBlogURL: blog.url)) } + func setShowPhase2Dialog(_ showDialog: Bool, forBlogURL url: String?) { + database.set(showDialog, forKey: Key.showPhase2Dialog(forBlogURL: url)) + } + /// Sets gutenberg enabled without registering the enabled action ("enabledOnce") /// Use this to set gutenberg and still show the auto-enabled dialog. /// From ba40bd21d0d85557ad8e95ca60a45d763ce58385 Mon Sep 17 00:00:00 2001 From: Tony Li Date: Fri, 7 Jul 2023 15:37:19 +1200 Subject: [PATCH 39/72] Add tests for fetching liked user --- .../WordPressTest/LikeUserHelperTests.swift | 48 +++++++++++++++++-- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/WordPress/WordPressTest/LikeUserHelperTests.swift b/WordPress/WordPressTest/LikeUserHelperTests.swift index f5a789a5cf47..cf23bc79c4e6 100644 --- a/WordPress/WordPressTest/LikeUserHelperTests.swift +++ b/WordPress/WordPressTest/LikeUserHelperTests.swift @@ -3,15 +3,21 @@ import XCTest class LikeUserHelperTests: CoreDataTestCase { - func createTestRemoteUserDictionary(withPreferredBlog hasPreferredBlog: Bool) -> [String: Any] { + var siteID: NSNumber = 20 + + func createTestRemoteUserDictionary( + withPreferredBlog hasPreferredBlog: Bool, + siteID: Int? = nil, + year: Int = 2021 + ) -> [String: Any] { var remoteUserDictionary: [String: Any] = [ - "ID": 15, + "ID": Int.random(in: 0...Int.max), "login": "testlogin", "name": "testname", - "site_ID": 20, + "site_ID": siteID ?? self.siteID.intValue, "avatar_URL": "wordpress.org/test2", "bio": "testbio", - "date_liked": "2021-11-24T04:02:42+0000", + "date_liked": "\(year)-11-24T04:02:42+0000", ] if hasPreferredBlog { @@ -77,4 +83,38 @@ class LikeUserHelperTests: CoreDataTestCase { waitForExpectations(timeout: 5) } + + func testFetchingLikedUser() { + XCTAssertEqual(mainContext.countObjects(ofType: LikeUser.self), 0) + + let commentID: NSNumber = 1 + let otherCommentID: NSNumber = 2 + // Insert likes with a recent date + for _ in 1...10 { + let dict = createTestRemoteUserDictionary(withPreferredBlog: false, year: 2010) + let user = RemoteLikeUser(dictionary: dict, commentID: commentID, siteID: siteID) + _ = LikeUserHelper.createOrUpdateFrom(remoteUser: user, context: mainContext) + } + // Insert likes with an older data + for _ in 1...5 { + let dict = createTestRemoteUserDictionary(withPreferredBlog: false, year: 1990) + let user = RemoteLikeUser(dictionary: dict, commentID: commentID, siteID: siteID) + _ = LikeUserHelper.createOrUpdateFrom(remoteUser: user, context: mainContext) + } + // Insert likes on another comment + for _ in 1...3 { + let dict = createTestRemoteUserDictionary(withPreferredBlog: false) + let user = RemoteLikeUser(dictionary: dict, commentID: otherCommentID, siteID: siteID) + _ = LikeUserHelper.createOrUpdateFrom(remoteUser: user, context: mainContext) + } + + // There are 18 like saved in the database in total + XCTAssertEqual(mainContext.countObjects(ofType: LikeUser.self), 18) + + // There are 15 likes on the comment with `commentID` + XCTAssertEqual(LikeUserHelper.likeUsersFor(commentID: commentID, siteID: siteID, in: mainContext).count, 15) + + // There are 10 likes since 2001 + XCTAssertEqual(LikeUserHelper.likeUsersFor(commentID: commentID, siteID: siteID, after: Date(timeIntervalSinceReferenceDate: 0), in: mainContext).count, 10) + } } From d7dd9582fd4c8a8976eab5129bf0cc65925f2b20 Mon Sep 17 00:00:00 2001 From: Alex Grebenyuk Date: Thu, 6 Jul 2023 23:51:13 -0400 Subject: [PATCH 40/72] Update ActionSheetViewController.swift --- .../System/Action Sheet/ActionSheetViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPress/Classes/ViewRelated/System/Action Sheet/ActionSheetViewController.swift b/WordPress/Classes/ViewRelated/System/Action Sheet/ActionSheetViewController.swift index 15562d1b6fab..0ec101e40121 100644 --- a/WordPress/Classes/ViewRelated/System/Action Sheet/ActionSheetViewController.swift +++ b/WordPress/Classes/ViewRelated/System/Action Sheet/ActionSheetViewController.swift @@ -33,7 +33,7 @@ class ActionSheetViewController: UIViewController { enum Button { static let height: CGFloat = 54 - static let contentInsets = NSDirectionalEdgeInsets(top: 0, leading: 18, bottom: 0, trailing: 35) + static let contentInsets = NSDirectionalEdgeInsets(top: 0, leading: 18, bottom: 0, trailing: 35) static let imagePadding: CGFloat = 16 static let imageTintColor: UIColor = .neutral(.shade30) static let font: UIFont = .preferredFont(forTextStyle: .callout) From d8c080a047eb6b428ad1feaedc85563364efc49b Mon Sep 17 00:00:00 2001 From: Tony Li Date: Fri, 7 Jul 2023 16:09:10 +1200 Subject: [PATCH 41/72] Update a test assertion --- WordPress/WordPressTest/LikeUserHelperTests.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/WordPress/WordPressTest/LikeUserHelperTests.swift b/WordPress/WordPressTest/LikeUserHelperTests.swift index cf23bc79c4e6..322484593c63 100644 --- a/WordPress/WordPressTest/LikeUserHelperTests.swift +++ b/WordPress/WordPressTest/LikeUserHelperTests.swift @@ -114,7 +114,8 @@ class LikeUserHelperTests: CoreDataTestCase { // There are 15 likes on the comment with `commentID` XCTAssertEqual(LikeUserHelper.likeUsersFor(commentID: commentID, siteID: siteID, in: mainContext).count, 15) - // There are 10 likes since 2001 - XCTAssertEqual(LikeUserHelper.likeUsersFor(commentID: commentID, siteID: siteID, after: Date(timeIntervalSinceReferenceDate: 0), in: mainContext).count, 10) + // There are 10 likes since 2001 and 5 likes before. + // How the `after` argument should behave might be confusing. See https://github.com/wordpress-mobile/WordPress-iOS/pull/21028#issuecomment-1624661943 + XCTAssertEqual(LikeUserHelper.likeUsersFor(commentID: commentID, siteID: siteID, after: Date(timeIntervalSinceReferenceDate: 0), in: mainContext).count, 5) } } From f307f480659b33af961b54704945373e3f807f56 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Mon, 5 Jun 2023 15:29:44 +1000 Subject: [PATCH 42/72] Add `WPAccount` fixture utility This is part of an effort to make `AccountSettingsServiceTests.testUpdateFailure()` less flaky in CI. --- WordPress/WordPress.xcodeproj/project.pbxproj | 24 +++++----- .../WordPressTest/AccountServiceTests.swift | 33 +++----------- .../AccountSettingsServiceTests.swift | 6 +-- WordPress/WordPressTest/BlogTests.swift | 4 +- .../WordPressTest/ContextManagerTests.swift | 44 +++++-------------- .../WordPressTest/PeopleServiceTests.swift | 4 +- .../WordPressTest/WPAccount+Fixture.swift | 20 +++++++++ 7 files changed, 54 insertions(+), 81 deletions(-) create mode 100644 WordPress/WordPressTest/WPAccount+Fixture.swift diff --git a/WordPress/WordPress.xcodeproj/project.pbxproj b/WordPress/WordPress.xcodeproj/project.pbxproj index 6cfebe3c1810..abf3845cd057 100644 --- a/WordPress/WordPress.xcodeproj/project.pbxproj +++ b/WordPress/WordPress.xcodeproj/project.pbxproj @@ -862,6 +862,7 @@ 3F73BE5F24EB3B4400BE99FF /* WhatIsNewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F73BE5E24EB3B4400BE99FF /* WhatIsNewView.swift */; }; 3F751D462491A93D0008A2B1 /* ZendeskUtilsTests+Plans.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F751D452491A93D0008A2B1 /* ZendeskUtilsTests+Plans.swift */; }; 3F758FD524F6FB4900BBA2FC /* AnnouncementsStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F758FD424F6FB4900BBA2FC /* AnnouncementsStore.swift */; }; + 3F759FBA2A2DA93B0039A845 /* WPAccount+Fixture.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F759FB92A2DA93B0039A845 /* WPAccount+Fixture.swift */; }; 3F762E9326784A950088CD45 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F762E9226784A950088CD45 /* Logger.swift */; }; 3F762E9526784B540088CD45 /* WireMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F762E9426784B540088CD45 /* WireMock.swift */; }; 3F762E9726784BED0088CD45 /* FancyAlertComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F762E9626784BED0088CD45 /* FancyAlertComponent.swift */; }; @@ -6560,6 +6561,7 @@ 3F73BE5E24EB3B4400BE99FF /* WhatIsNewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WhatIsNewView.swift; sourceTree = ""; }; 3F751D452491A93D0008A2B1 /* ZendeskUtilsTests+Plans.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ZendeskUtilsTests+Plans.swift"; sourceTree = ""; }; 3F758FD424F6FB4900BBA2FC /* AnnouncementsStore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnnouncementsStore.swift; sourceTree = ""; }; + 3F759FB92A2DA93B0039A845 /* WPAccount+Fixture.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "WPAccount+Fixture.swift"; sourceTree = ""; }; 3F762E9226784A950088CD45 /* Logger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Logger.swift; sourceTree = ""; }; 3F762E9426784B540088CD45 /* WireMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WireMock.swift; sourceTree = ""; }; 3F762E9626784BED0088CD45 /* FancyAlertComponent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FancyAlertComponent.swift; sourceTree = ""; }; @@ -12374,26 +12376,27 @@ 5D7A577D1AFBFD7C0097C028 /* Models */ = { isa = PBXGroup; children = ( - F1B1E7A224098FA100549E2A /* BlogTests.swift */, + E6A2158F1D1065F200DE5270 /* AbstractPostTest.swift */, + 8B8C814C2318073300A0E620 /* BasePostTests.swift */, 246D0A0225E97D5D0028B83F /* Blog+ObjcTests.m */, + FEE48EFE2A4C9855008A48E0 /* Blog+PublicizeTests.swift */, 4AD5657128E543A30054C676 /* BlogQueryTests.swift */, + B55F1AA11C107CE200FD04D4 /* BlogSettingsDiscussionTests.swift */, + F1B1E7A224098FA100549E2A /* BlogTests.swift */, + 24A2948225D602710000A51E /* BlogTimeZoneTests.m */, D848CC1620FF38EA00A9038F /* FormattableCommentRangeTests.swift */, + 0879FC151E9301DD00E1EFC8 /* MediaTests.swift */, + C38C5D8027F61D2C002F517E /* MenuItemTests.swift */, D848CC1420FF33FC00A9038F /* NotificationContentRangeTests.swift */, + D826D67E211D21C700A5D8FE /* NullMockUserDefaults.swift */, + 5960967E1CF7959300848496 /* PostTests.swift */, 8BBBEBB124B8F8C0005E358E /* ReaderCardTests.swift */, E6B9B8A91B94E1FE0001B92F /* ReaderPostTest.m */, - B55F1AA11C107CE200FD04D4 /* BlogSettingsDiscussionTests.swift */, - E6A2158F1D1065F200DE5270 /* AbstractPostTest.swift */, - 5960967E1CF7959300848496 /* PostTests.swift */, - 0879FC151E9301DD00E1EFC8 /* MediaTests.swift */, - D826D67E211D21C700A5D8FE /* NullMockUserDefaults.swift */, - 8B8C814C2318073300A0E620 /* BasePostTests.swift */, - 24A2948225D602710000A51E /* BlogTimeZoneTests.m */, 24C69A8A2612421900312D9A /* UserSettingsTests.swift */, 24C69AC12612467C00312D9A /* UserSettingsTestsObjc.m */, + 3F759FB92A2DA93B0039A845 /* WPAccount+Fixture.swift */, 2481B1E7260D4EAC00AE59DB /* WPAccount+LookupTests.swift */, 2481B20B260D8FED00AE59DB /* WPAccount+ObjCLookupTests.m */, - C38C5D8027F61D2C002F517E /* MenuItemTests.swift */, - FEE48EFE2A4C9855008A48E0 /* Blog+PublicizeTests.swift */, ); name = Models; sourceTree = ""; @@ -23630,6 +23633,7 @@ F17A2A2023BFBD84001E96AC /* UIView+ExistingConstraints.swift in Sources */, 9A9D34FD23607CCC00BC95A3 /* AsyncOperationTests.swift in Sources */, B5552D821CD1061F00B26DF6 /* StringExtensionsTests.swift in Sources */, + 3F759FBA2A2DA93B0039A845 /* WPAccount+Fixture.swift in Sources */, 8B821F3C240020E2006B697E /* PostServiceUploadingListTests.swift in Sources */, 73178C3521BEE9AC00E37C9A /* TitleSubtitleHeaderTests.swift in Sources */, 08AAD6A11CBEA610002B2418 /* MenusServiceTests.m in Sources */, diff --git a/WordPress/WordPressTest/AccountServiceTests.swift b/WordPress/WordPressTest/AccountServiceTests.swift index d41409d8f705..ba0abe17782c 100644 --- a/WordPress/WordPressTest/AccountServiceTests.swift +++ b/WordPress/WordPressTest/AccountServiceTests.swift @@ -147,24 +147,10 @@ class AccountServiceTests: CoreDataTestCase { func testMergeMultipleDuplicateAccounts() throws { let context = contextManager.mainContext - let account1 = WPAccount(context: context) - account1.userID = 1 - account1.username = "username" - account1.authToken = "authToken" - account1.uuid = UUID().uuidString - - let account2 = WPAccount(context: context) - account2.userID = 1 - account2.username = "username" - account2.authToken = "authToken" - account2.uuid = UUID().uuidString - - let account3 = WPAccount(context: context) - account3.userID = 1 - account3.username = "username" - account3.authToken = "authToken" - account3.uuid = UUID().uuidString + let account1 = WPAccount.fixture(context: context, userID: 1) + let account2 = WPAccount.fixture(context: context, userID: 1) + let account3 = WPAccount.fixture(context: context, userID: 1) account1.addBlogs(createMockBlogs(withIDs: [1, 2, 3, 4, 5, 6], in: context)) account2.addBlogs(createMockBlogs(withIDs: [1, 2, 3], in: context)) @@ -240,17 +226,8 @@ class AccountServiceTests: CoreDataTestCase { } func testPurgeAccount() throws { - let account1 = WPAccount(context: mainContext) - account1.userID = 1 - account1.username = "username" - account1.authToken = "authToken" - account1.uuid = UUID().uuidString - - let account2 = WPAccount(context: mainContext) - account2.userID = 1 - account2.username = "username" - account2.authToken = "authToken" - account2.uuid = UUID().uuidString + let account1 = WPAccount.fixture(context: mainContext, userID: 1) + let account2 = WPAccount.fixture(context: mainContext, userID: 2) contextManager.saveContextAndWait(mainContext) try XCTAssertEqual(mainContext.count(for: WPAccount.fetchRequest()), 2) diff --git a/WordPress/WordPressTest/AccountSettingsServiceTests.swift b/WordPress/WordPressTest/AccountSettingsServiceTests.swift index b365eb39fa6d..6f4dbccdcae5 100644 --- a/WordPress/WordPressTest/AccountSettingsServiceTests.swift +++ b/WordPress/WordPressTest/AccountSettingsServiceTests.swift @@ -8,11 +8,7 @@ class AccountSettingsServiceTests: CoreDataTestCase { private var service: AccountSettingsService! override func setUp() { - let account = WPAccount(context: mainContext) - account.username = "test" - account.authToken = "token" - account.userID = 1 - account.uuid = UUID().uuidString + let account = WPAccount.fixture(context: mainContext) let settings = ManagedAccountSettings(context: mainContext) settings.account = account diff --git a/WordPress/WordPressTest/BlogTests.swift b/WordPress/WordPressTest/BlogTests.swift index c5048fdc2f80..b50b72a9f566 100644 --- a/WordPress/WordPressTest/BlogTests.swift +++ b/WordPress/WordPressTest/BlogTests.swift @@ -199,9 +199,7 @@ final class BlogTests: CoreDataTestCase { // Create an account with duplicated blogs let xmlrpc = "https://xmlrpc.test.wordpress.com" let account = try await contextManager.performAndSave { context in - let account = WPAccount(context: context) - account.username = "username" - account.authToken = "authToken" + let account = WPAccount.fixture(context: context) account.blogs = Set( (1...10).map { _ in let blog = BlogBuilder(context).build() diff --git a/WordPress/WordPressTest/ContextManagerTests.swift b/WordPress/WordPressTest/ContextManagerTests.swift index 5a9f0f16a3f6..c9268ab92fcb 100644 --- a/WordPress/WordPressTest/ContextManagerTests.swift +++ b/WordPress/WordPressTest/ContextManagerTests.swift @@ -146,9 +146,7 @@ class ContextManagerTests: XCTestCase { let derivedContext = contextManager.newDerivedContext() derivedContext.perform { - let account = WPAccount(context: derivedContext) - account.userID = 1 - account.username = "First User" + _ = WPAccount.fixture(context: derivedContext, userID: 1, username: "First User") contextManager.saveContextAndWait(derivedContext) } @@ -165,9 +163,7 @@ class ContextManagerTests: XCTestCase { // Save another user waitUntil { done in derivedContext.perform { - let account = WPAccount(context: derivedContext) - account.userID = 2 - account.username = "Second account" + _ = WPAccount.fixture(context: derivedContext, userID: 2) contextManager.saveContextAndWait(derivedContext) done() } @@ -193,17 +189,13 @@ class ContextManagerTests: XCTestCase { XCTAssertEqual(numberOfAccounts(), 0) try await contextManager.performAndSave { context in - let account = WPAccount(context: context) - account.userID = 1 - account.username = "First User" + _ = WPAccount.fixture(context: context, userID: 1) } XCTAssertEqual(numberOfAccounts(), 1) do { try await contextManager.performAndSave { context in - let account = WPAccount(context: context) - account.userID = 100 - account.username = "Unknown User" + _ = WPAccount.fixture(context: context, userID: 100) throw NSError(domain: "save", code: 1) } XCTFail("The above call should throw") @@ -221,9 +213,7 @@ class ContextManagerTests: XCTestCase { // > "In non-async functions, and closures without any await expression, the compiler selects the non-async overload" let sync: () -> Void = { contextManager.performAndSave { context in - let account = WPAccount(context: context) - account.userID = 2 - account.username = "Second User" + _ = WPAccount.fixture(context: context, userID: 2) } } sync() @@ -245,14 +235,10 @@ class ContextManagerTests: XCTestCase { ] contextManager.performAndSave({ - let account = WPAccount(context: $0) - account.userID = 1 - account.username = "First User" + _ = WPAccount.fixture(context: $0, userID: 1, username: "First User") contextManager.performAndSave { - let account = WPAccount(context: $0) - account.userID = 2 - account.username = "Second User" + _ = WPAccount.fixture(context: $0, userID: 2, username: "Second User") } saveOperations[1].fulfill() @@ -279,14 +265,10 @@ class ContextManagerTests: XCTestCase { ] contextManager.performAndSave({ - let account = WPAccount(context: $0) - account.userID = 1 - account.username = "First User" + _ = WPAccount.fixture(context: $0, userID: 1, username: "First User") contextManager.performAndSave({ - let account = WPAccount(context: $0) - account.userID = 2 - account.username = "Second User" + _ = WPAccount.fixture(context: $0, userID: 2, username: "Second User") }, completion: { saveOperations[1].fulfill() }, on: .main) @@ -380,9 +362,7 @@ class ContextManagerTests: XCTestCase { // First, insert an account into the database. let contextManager = ContextManager.forTesting() contextManager.performAndSave { context in - let account = WPAccount(context: context) - account.userID = 1 - account.username = "First User" + _ = WPAccount.fixture(context: context, userID: 1, username: "First User") } // Fetch the account in the main context @@ -441,8 +421,8 @@ class ContextManagerTests: XCTestCase { private func createOrUpdateAccount(username: String, newToken: String, in context: NSManagedObjectContext) throws { var account = try WPAccount.lookup(withUsername: username, in: context) if account == nil { - account = WPAccount(context: context) - account?.username = username + // Will this make tests fail because of the default userID in the fixture? + account = WPAccount.fixture(context: context, username: username) } account?.authToken = newToken } diff --git a/WordPress/WordPressTest/PeopleServiceTests.swift b/WordPress/WordPressTest/PeopleServiceTests.swift index 128a27306586..48d46b3bee5c 100644 --- a/WordPress/WordPressTest/PeopleServiceTests.swift +++ b/WordPress/WordPressTest/PeopleServiceTests.swift @@ -18,9 +18,7 @@ class PeopleServiceTests: CoreDataTestCase { } contextManager.performAndSave { context in - let account = WPAccount(context: context) - account.username = "username" - account.authToken = "token" + let account = WPAccount.fixture(context: context) let blog = Blog(context: context) blog.dotComID = NSNumber(value: self.siteID) diff --git a/WordPress/WordPressTest/WPAccount+Fixture.swift b/WordPress/WordPressTest/WPAccount+Fixture.swift new file mode 100644 index 000000000000..c56b8c08df0e --- /dev/null +++ b/WordPress/WordPressTest/WPAccount+Fixture.swift @@ -0,0 +1,20 @@ +/// Centralized utility to generate preconfigured WPAccount instances +extension WPAccount { + + static func fixture( + context: NSManagedObjectContext, + // Using a constant UUID by default to keep the tests deterministic. + // There's nothing special in the value itself. It's just a UUID() value copied over. + uuid: UUID = UUID(uuidString: "D0D0298F-D7EF-4F32-A1F8-DDDBB8ADB8DF")!, + userID: Int = 1, + username: String = "username", + authToken: String = "authToken" + ) -> WPAccount { + let account = WPAccount(context: context) + account.userID = NSNumber(value: userID) + account.username = username + account.authToken = authToken + account.uuid = uuid.uuidString + return account + } +} From aae784b80ffb33f60923f280f91288d76f9593fd Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Mon, 5 Jun 2023 16:06:50 +1000 Subject: [PATCH 43/72] Define `TestError`, an error type for tests --- WordPress/WordPress.xcodeproj/project.pbxproj | 12 ++++++++---- WordPress/WordPressTest/TestError.swift | 8 ++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 WordPress/WordPressTest/TestError.swift diff --git a/WordPress/WordPress.xcodeproj/project.pbxproj b/WordPress/WordPress.xcodeproj/project.pbxproj index abf3845cd057..0d179d7ef7dd 100644 --- a/WordPress/WordPress.xcodeproj/project.pbxproj +++ b/WordPress/WordPress.xcodeproj/project.pbxproj @@ -863,6 +863,7 @@ 3F751D462491A93D0008A2B1 /* ZendeskUtilsTests+Plans.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F751D452491A93D0008A2B1 /* ZendeskUtilsTests+Plans.swift */; }; 3F758FD524F6FB4900BBA2FC /* AnnouncementsStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F758FD424F6FB4900BBA2FC /* AnnouncementsStore.swift */; }; 3F759FBA2A2DA93B0039A845 /* WPAccount+Fixture.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F759FB92A2DA93B0039A845 /* WPAccount+Fixture.swift */; }; + 3F759FBC2A2DB2CF0039A845 /* TestError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F759FBB2A2DB2CF0039A845 /* TestError.swift */; }; 3F762E9326784A950088CD45 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F762E9226784A950088CD45 /* Logger.swift */; }; 3F762E9526784B540088CD45 /* WireMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F762E9426784B540088CD45 /* WireMock.swift */; }; 3F762E9726784BED0088CD45 /* FancyAlertComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F762E9626784BED0088CD45 /* FancyAlertComponent.swift */; }; @@ -6562,6 +6563,7 @@ 3F751D452491A93D0008A2B1 /* ZendeskUtilsTests+Plans.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ZendeskUtilsTests+Plans.swift"; sourceTree = ""; }; 3F758FD424F6FB4900BBA2FC /* AnnouncementsStore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnnouncementsStore.swift; sourceTree = ""; }; 3F759FB92A2DA93B0039A845 /* WPAccount+Fixture.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "WPAccount+Fixture.swift"; sourceTree = ""; }; + 3F759FBB2A2DB2CF0039A845 /* TestError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestError.swift; sourceTree = ""; }; 3F762E9226784A950088CD45 /* Logger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Logger.swift; sourceTree = ""; }; 3F762E9426784B540088CD45 /* WireMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WireMock.swift; sourceTree = ""; }; 3F762E9626784BED0088CD45 /* FancyAlertComponent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FancyAlertComponent.swift; sourceTree = ""; }; @@ -12212,13 +12214,14 @@ 59B48B601B99E0B0008EBB84 /* TestUtilities */ = { isa = PBXGroup; children = ( - 59B48B611B99E132008EBB84 /* JSONObject.swift */, - E157D5DF1C690A6C00F04FB9 /* ImmuTableTestUtils.swift */, - 570BFD8F2282418A007859A8 /* PostBuilder.swift */, + 2481B1D4260D4E8B00AE59DB /* AccountBuilder.swift */, 57B71D4D230DB5F200789A68 /* BlogBuilder.swift */, + E157D5DF1C690A6C00F04FB9 /* ImmuTableTestUtils.swift */, + 59B48B611B99E132008EBB84 /* JSONObject.swift */, F11023A223186BCA00C4E84A /* MediaBuilder.swift */, 57889AB723589DF100DAE56D /* PageBuilder.swift */, - 2481B1D4260D4E8B00AE59DB /* AccountBuilder.swift */, + 570BFD8F2282418A007859A8 /* PostBuilder.swift */, + 3F759FBB2A2DB2CF0039A845 /* TestError.swift */, ); name = TestUtilities; sourceTree = ""; @@ -23528,6 +23531,7 @@ FF9A6E7121F9361700D36D14 /* MediaUploadHashTests.swift in Sources */, B532ACCF1DC3AB8E00FFFA57 /* NotificationSyncMediatorTests.swift in Sources */, 7E4A772F20F7FDF8001C706D /* ActivityLogTestData.swift in Sources */, + 3F759FBC2A2DB2CF0039A845 /* TestError.swift in Sources */, 40E7FEC82211EEC00032834E /* LastPostStatsRecordValueTests.swift in Sources */, 57240224234E5BE200227067 /* PostServiceSelfHostedTests.swift in Sources */, B59D40A61DB522DF003D2D79 /* NSAttributedStringTests.swift in Sources */, diff --git a/WordPress/WordPressTest/TestError.swift b/WordPress/WordPressTest/TestError.swift new file mode 100644 index 000000000000..417e1b1162d7 --- /dev/null +++ b/WordPress/WordPressTest/TestError.swift @@ -0,0 +1,8 @@ +struct TestError: Error { + + let id: Int + + init(id: Int = 1) { + self.id = id + } +} From 0d947e77815b47e54720031b44c1dc8e1853b6fe Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Mon, 5 Jun 2023 16:24:47 +1000 Subject: [PATCH 44/72] Use a test double over HTTP stub in `testUpdateFailure` --- WordPress/WordPress.xcodeproj/project.pbxproj | 4 + .../AccountSettingsRemoteInterfaceStub.swift | 77 +++++++++++++++++ .../AccountSettingsServiceTests.swift | 82 ++++++++++++------- 3 files changed, 134 insertions(+), 29 deletions(-) create mode 100644 WordPress/WordPressTest/AccountSettingsRemoteInterfaceStub.swift diff --git a/WordPress/WordPress.xcodeproj/project.pbxproj b/WordPress/WordPress.xcodeproj/project.pbxproj index 0d179d7ef7dd..1437352faa27 100644 --- a/WordPress/WordPress.xcodeproj/project.pbxproj +++ b/WordPress/WordPress.xcodeproj/project.pbxproj @@ -864,6 +864,7 @@ 3F758FD524F6FB4900BBA2FC /* AnnouncementsStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F758FD424F6FB4900BBA2FC /* AnnouncementsStore.swift */; }; 3F759FBA2A2DA93B0039A845 /* WPAccount+Fixture.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F759FB92A2DA93B0039A845 /* WPAccount+Fixture.swift */; }; 3F759FBC2A2DB2CF0039A845 /* TestError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F759FBB2A2DB2CF0039A845 /* TestError.swift */; }; + 3F759FBE2A2DB3280039A845 /* AccountSettingsRemoteInterfaceStub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F759FBD2A2DB3280039A845 /* AccountSettingsRemoteInterfaceStub.swift */; }; 3F762E9326784A950088CD45 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F762E9226784A950088CD45 /* Logger.swift */; }; 3F762E9526784B540088CD45 /* WireMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F762E9426784B540088CD45 /* WireMock.swift */; }; 3F762E9726784BED0088CD45 /* FancyAlertComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F762E9626784BED0088CD45 /* FancyAlertComponent.swift */; }; @@ -6564,6 +6565,7 @@ 3F758FD424F6FB4900BBA2FC /* AnnouncementsStore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnnouncementsStore.swift; sourceTree = ""; }; 3F759FB92A2DA93B0039A845 /* WPAccount+Fixture.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "WPAccount+Fixture.swift"; sourceTree = ""; }; 3F759FBB2A2DB2CF0039A845 /* TestError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestError.swift; sourceTree = ""; }; + 3F759FBD2A2DB3280039A845 /* AccountSettingsRemoteInterfaceStub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountSettingsRemoteInterfaceStub.swift; sourceTree = ""; }; 3F762E9226784A950088CD45 /* Logger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Logger.swift; sourceTree = ""; }; 3F762E9426784B540088CD45 /* WireMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WireMock.swift; sourceTree = ""; }; 3F762E9626784BED0088CD45 /* FancyAlertComponent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FancyAlertComponent.swift; sourceTree = ""; }; @@ -15387,6 +15389,7 @@ children = ( 9363113E19FA996700B0C739 /* AccountServiceTests.swift */, 4A9948E129714EF1006282A9 /* AccountSettingsServiceTests.swift */, + 3F759FBD2A2DB3280039A845 /* AccountSettingsRemoteInterfaceStub.swift */, F1F083F5241FFE930056D3B1 /* AtomicAuthenticationServiceTests.swift */, 46F58500262605930010A723 /* BlockEditorSettingsServiceTests.swift */, FEA312832987FB0100FFD405 /* BlogJetpackTests.swift */, @@ -23519,6 +23522,7 @@ 7E987F58210811CC00CAFB88 /* NotificationContentRouterTests.swift in Sources */, E1C9AA561C10427100732665 /* MathTest.swift in Sources */, 93A379EC19FFBF7900415023 /* KeychainTest.m in Sources */, + 3F759FBE2A2DB3280039A845 /* AccountSettingsRemoteInterfaceStub.swift in Sources */, F1BB660C274E704D00A319BE /* LikeUserHelperTests.swift in Sources */, 436D5655212209D600CEAA33 /* RegisterDomainDetailsServiceProxyMock.swift in Sources */, F1450CF92437EEBB00A28BFE /* MediaRequestAuthenticatorTests.swift in Sources */, diff --git a/WordPress/WordPressTest/AccountSettingsRemoteInterfaceStub.swift b/WordPress/WordPressTest/AccountSettingsRemoteInterfaceStub.swift new file mode 100644 index 000000000000..59cd089c1887 --- /dev/null +++ b/WordPress/WordPressTest/AccountSettingsRemoteInterfaceStub.swift @@ -0,0 +1,77 @@ +@testable import WordPress +import WordPressKit + +class AccountSettingsRemoteInterfaceStub: AccountSettingsRemoteInterface { + + let updateSettingResult: Result<(), Error> + let getSettingsResult: Result + let changeUsernameShouldSucceed: Bool + let suggestUsernamesResult: [String] + let updatePasswordResult: Result<(), Error> + let closeAccountResult: Result<(), Error> + + init( + updateSettingResult: Result = .success(()), + // Defaulting to failure to avoid having to create AccountSettings here, because it required an NSManagedContext + getSettingsResult: Result = .failure(TestError()), + changeUsernameShouldSucceed: Bool = true, + suggestUsernamesResult: [String] = [], + updatePasswordResult: Result = .success(()), + closeAccountResult: Result = .success(()) + ) { + self.updateSettingResult = updateSettingResult + self.getSettingsResult = getSettingsResult + self.changeUsernameShouldSucceed = changeUsernameShouldSucceed + self.suggestUsernamesResult = suggestUsernamesResult + self.updatePasswordResult = updatePasswordResult + self.closeAccountResult = closeAccountResult + } + + func updateSetting(_ change: AccountSettingsChange, success: @escaping () -> Void, failure: @escaping (Error) -> Void) { + switch updateSettingResult { + case .success: + success() + case .failure(let error): + failure(error) + } + } + + func getSettings(success: @escaping (WordPressKit.AccountSettings) -> Void, failure: @escaping (Error) -> Void) { + switch getSettingsResult { + case .success(let settings): + success(settings) + case .failure(let error): + failure(error) + } + } + + func changeUsername(to username: String, success: @escaping () -> Void, failure: @escaping () -> Void) { + if changeUsernameShouldSucceed { + success() + } else { + failure() + } + } + + func suggestUsernames(base: String, finished: @escaping ([String]) -> Void) { + finished(suggestUsernamesResult) + } + + func updatePassword(_ password: String, success: @escaping () -> Void, failure: @escaping (Error) -> Void) { + switch updatePasswordResult { + case .success: + success() + case .failure(let error): + failure(error) + } + } + + func closeAccount(success: @escaping () -> Void, failure: @escaping (Error) -> Void) { + switch closeAccountResult { + case .success: + success() + case .failure(let error): + failure(error) + } + } +} diff --git a/WordPress/WordPressTest/AccountSettingsServiceTests.swift b/WordPress/WordPressTest/AccountSettingsServiceTests.swift index 6f4dbccdcae5..427963a3ff25 100644 --- a/WordPress/WordPressTest/AccountSettingsServiceTests.swift +++ b/WordPress/WordPressTest/AccountSettingsServiceTests.swift @@ -9,20 +9,9 @@ class AccountSettingsServiceTests: CoreDataTestCase { override func setUp() { let account = WPAccount.fixture(context: mainContext) - - let settings = ManagedAccountSettings(context: mainContext) - settings.account = account - settings.username = "Username" - settings.displayName = "Display Name" - settings.primarySiteID = 1 - settings.aboutMe = "" - settings.email = "test@email.com" - settings.firstName = "Test" - settings.lastName = "User" - settings.language = "en" - settings.webAddress = "https://test.wordpress.com" - + _ = makeManagedAccountSettings(context: mainContext, account: account) contextManager.saveContextAndWait(mainContext) + service = makeService(contextManager: contextManager, account: account) service = AccountSettingsService( userID: account.userID.intValue, @@ -31,18 +20,6 @@ class AccountSettingsServiceTests: CoreDataTestCase { ) } - private func managedAccountSettings() -> ManagedAccountSettings? { - contextManager.performQuery { context in - let request = NSFetchRequest(entityName: ManagedAccountSettings.entityName()) - request.predicate = NSPredicate(format: "account.userID = %d", self.service.userID) - request.fetchLimit = 1 - guard let results = (try? context.fetch(request)) as? [ManagedAccountSettings] else { - return nil - } - return results.first - } - } - func testUpdateSuccess() throws { stub(condition: isPath("/rest/v1.1/me/settings")) { _ in HTTPStubsResponse(jsonObject: [String: Any](), statusCode: 200, headers: nil) @@ -57,15 +34,21 @@ class AccountSettingsServiceTests: CoreDataTestCase { } func testUpdateFailure() throws { - stub(condition: isPath("/rest/v1.1/me/settings")) { _ in - HTTPStubsResponse(jsonObject: [String: Any](), statusCode: 500, headers: nil) - } + // We've seen some flakiness in CI on this test, and therefore are using a stub object rather than stubbing the HTTP requests. + // Since this approach bypasses the entire network stack, the hope is that it'll result in a more robust test. + let service = AccountSettingsService( + userID: 1, + remote: AccountSettingsRemoteInterfaceStub(updateSettingResult: .failure(TestError())), + coreDataStack: contextManager + ) + waitUntil { done in - self.service.saveChange(.firstName("Updated"), finished: { success in + service.saveChange(.firstName("Updated"), finished: { success in expect(success).to(beFalse()) done() }) } + expect(self.managedAccountSettings()?.firstName).to(equal("Test")) } @@ -96,3 +79,44 @@ class AccountSettingsServiceTests: CoreDataTestCase { wait(for: [notCrash], timeout: 0.5) } } + +extension AccountSettingsServiceTests { + + private func makeManagedAccountSettings( + context: NSManagedObjectContext, + account: WPAccount + ) -> ManagedAccountSettings { + let settings = ManagedAccountSettings(context: context) + settings.account = account + settings.username = "Username" + settings.displayName = "Display Name" + settings.primarySiteID = 1 + settings.aboutMe = "" + settings.email = "test@email.com" + settings.firstName = "Test" + settings.lastName = "User" + settings.language = "en" + settings.webAddress = "https://test.wordpress.com" + return settings + } + + private func makeService(contextManager: ContextManager, account: WPAccount) -> AccountSettingsService { + AccountSettingsService( + userID: account.userID.intValue, + remote: AccountSettingsRemote(wordPressComRestApi: account.wordPressComRestApi), + coreDataStack: contextManager + ) + } + + private func managedAccountSettings() -> ManagedAccountSettings? { + contextManager.performQuery { context in + let request = NSFetchRequest(entityName: ManagedAccountSettings.entityName()) + request.predicate = NSPredicate(format: "account.userID = %d", self.service.userID) + request.fetchLimit = 1 + guard let results = (try? context.fetch(request)) as? [ManagedAccountSettings] else { + return nil + } + return results.first + } + } +} From d244fdcfa5a4b8b2ee343fd9b5eb6b281d2af648 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Mon, 5 Jun 2023 20:21:04 +1000 Subject: [PATCH 45/72] Use a test double over HTTP stubs in `testUpdateSuccess` --- .../AccountSettingsServiceTests.swift | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/WordPress/WordPressTest/AccountSettingsServiceTests.swift b/WordPress/WordPressTest/AccountSettingsServiceTests.swift index 427963a3ff25..0681613fed44 100644 --- a/WordPress/WordPressTest/AccountSettingsServiceTests.swift +++ b/WordPress/WordPressTest/AccountSettingsServiceTests.swift @@ -21,15 +21,24 @@ class AccountSettingsServiceTests: CoreDataTestCase { } func testUpdateSuccess() throws { - stub(condition: isPath("/rest/v1.1/me/settings")) { _ in - HTTPStubsResponse(jsonObject: [String: Any](), statusCode: 200, headers: nil) - } + // We've seen some flakiness in CI on this test, and therefore are using a stub object rather than stubbing the HTTP requests. + // Since this approach bypasses the entire network stack, the hope is that it'll result in a more robust test. + // + // This is the second test in this class edited this way. + // If we'll need to update a third, we shall also take the time to update the rest of the tests. + let service = AccountSettingsService( + userID: 1, + remote: AccountSettingsRemoteInterfaceStub(updateSettingResult: .success(())), + coreDataStack: contextManager + ) + waitUntil { done in - self.service.saveChange(.firstName("Updated"), finished: { success in + service.saveChange(.firstName("Updated"), finished: { success in expect(success).to(beTrue()) done() }) } + expect(self.managedAccountSettings()?.firstName).to(equal("Updated")) } From 9d1438796025abaf34972c93d0dc72ae03879763 Mon Sep 17 00:00:00 2001 From: jos <17252150+jostnes@users.noreply.github.com> Date: Fri, 7 Jul 2023 12:00:39 +0700 Subject: [PATCH 46/72] use default timeout value on screen init --- WordPress/UITestsFoundation/Screens/ActionSheetComponent.swift | 3 +-- WordPress/UITestsFoundation/Screens/ActivityLogScreen.swift | 3 +-- WordPress/UITestsFoundation/Screens/CommentsScreen.swift | 3 +-- WordPress/UITestsFoundation/Screens/DomainsScreen.swift | 3 +-- .../UITestsFoundation/Screens/DomainsSuggestionsScreen.swift | 3 +-- .../UITestsFoundation/Screens/Editor/AztecEditorScreen.swift | 3 +-- .../UITestsFoundation/Screens/Editor/BlockEditorScreen.swift | 3 +-- .../UITestsFoundation/Screens/Editor/ChooseLayoutScreen.swift | 3 +-- .../Screens/Editor/EditorNoticeComponent.swift | 3 +-- .../UITestsFoundation/Screens/Editor/EditorPostSettings.swift | 3 +-- .../Screens/Editor/EditorPublishEpilogueScreen.swift | 3 +-- .../Editor/EditorSettingsComponents/CategoriesComponent.swift | 3 +-- .../Editor/EditorSettingsComponents/TagsComponent.swift | 3 +-- .../UITestsFoundation/Screens/Editor/FeaturedImageScreen.swift | 3 +-- .../Screens/Jetpack/JetpackBackupOptionsScreen.swift | 3 +-- .../Screens/Jetpack/JetpackBackupScreen.swift | 3 +-- .../UITestsFoundation/Screens/Jetpack/JetpackScanScreen.swift | 3 +-- .../Screens/Login/FeatureIntroductionScreen.swift | 3 +-- .../UITestsFoundation/Screens/Login/LinkOrPasswordScreen.swift | 3 +-- .../Screens/Login/LoginCheckMagicLinkScreen.swift | 3 +-- .../UITestsFoundation/Screens/Login/LoginEmailScreen.swift | 3 +-- .../UITestsFoundation/Screens/Login/LoginEpilogueScreen.swift | 2 +- .../UITestsFoundation/Screens/Login/LoginPasswordScreen.swift | 3 +-- .../Screens/Login/LoginSiteAddressScreen.swift | 3 +-- .../Screens/Login/LoginUsernamePasswordScreen.swift | 3 +-- .../Screens/Login/OnboardingQuestionsPromptScreen.swift | 3 +-- .../Screens/Login/QuickStartPromptScreen.swift | 3 +-- .../Screens/Login/Unified/GetStartedScreen.swift | 3 +-- .../Screens/Login/Unified/PasswordScreen.swift | 3 +-- .../Screens/Login/Unified/PrologueScreen.swift | 3 +-- WordPress/UITestsFoundation/Screens/Login/WelcomeScreen.swift | 3 +-- .../Screens/Login/WelcomeScreenLoginComponent.swift | 3 +-- WordPress/UITestsFoundation/Screens/Me/ContactUsScreen.swift | 3 +-- WordPress/UITestsFoundation/Screens/Me/SupportScreen.swift | 3 +-- WordPress/UITestsFoundation/Screens/MeTabScreen.swift | 3 +-- .../Screens/Media/MediaPickerAlbumListScreen.swift | 3 +-- .../Screens/Media/MediaPickerAlbumScreen.swift | 3 +-- WordPress/UITestsFoundation/Screens/MediaScreen.swift | 3 +-- WordPress/UITestsFoundation/Screens/MySiteScreen.swift | 3 +-- WordPress/UITestsFoundation/Screens/MySitesScreen.swift | 3 +-- WordPress/UITestsFoundation/Screens/NotificationsScreen.swift | 3 +-- WordPress/UITestsFoundation/Screens/PagesScreen.swift | 3 +-- WordPress/UITestsFoundation/Screens/PeopleScreen.swift | 3 +-- WordPress/UITestsFoundation/Screens/PlanSelectionScreen.swift | 3 +-- WordPress/UITestsFoundation/Screens/PostsScreen.swift | 3 +-- WordPress/UITestsFoundation/Screens/ReaderScreen.swift | 3 +-- .../Screens/Signup/SignupCheckMagicLinkScreen.swift | 3 +-- .../UITestsFoundation/Screens/Signup/SignupEmailScreen.swift | 3 +-- .../Screens/Signup/SignupEpilogueScreen.swift | 3 +-- .../Screens/Signup/WelcomeScreenSignupComponent.swift | 3 +-- WordPress/UITestsFoundation/Screens/SiteIntentScreen.swift | 3 +-- WordPress/UITestsFoundation/Screens/SiteSettingsScreen.swift | 3 +-- WordPress/UITestsFoundation/Screens/StatsScreen.swift | 3 +-- WordPress/UITestsFoundation/Screens/TabNavComponent.swift | 3 +-- 54 files changed, 54 insertions(+), 107 deletions(-) diff --git a/WordPress/UITestsFoundation/Screens/ActionSheetComponent.swift b/WordPress/UITestsFoundation/Screens/ActionSheetComponent.swift index 3f2bb2ce082a..d9675b8dac68 100644 --- a/WordPress/UITestsFoundation/Screens/ActionSheetComponent.swift +++ b/WordPress/UITestsFoundation/Screens/ActionSheetComponent.swift @@ -18,8 +18,7 @@ public class ActionSheetComponent: ScreenObject { public init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [Self.getBlogPostButton, Self.getSitePageButton], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/ActivityLogScreen.swift b/WordPress/UITestsFoundation/Screens/ActivityLogScreen.swift index f7d13c501c19..604702eac863 100644 --- a/WordPress/UITestsFoundation/Screens/ActivityLogScreen.swift +++ b/WordPress/UITestsFoundation/Screens/ActivityLogScreen.swift @@ -20,8 +20,7 @@ public class ActivityLogScreen: ScreenObject { try super.init( expectedElementGetters: [ dateRangeButtonGetter, activityTypeButtonGetter ], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/CommentsScreen.swift b/WordPress/UITestsFoundation/Screens/CommentsScreen.swift index a56aa97cda52..da892230e8b4 100644 --- a/WordPress/UITestsFoundation/Screens/CommentsScreen.swift +++ b/WordPress/UITestsFoundation/Screens/CommentsScreen.swift @@ -29,8 +29,7 @@ public class CommentsScreen: ScreenObject { navigationBarTitleGetter, replyFieldGetter ], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/DomainsScreen.swift b/WordPress/UITestsFoundation/Screens/DomainsScreen.swift index f604112f60b3..0227cdfff314 100644 --- a/WordPress/UITestsFoundation/Screens/DomainsScreen.swift +++ b/WordPress/UITestsFoundation/Screens/DomainsScreen.swift @@ -15,8 +15,7 @@ public class DomainsScreen: ScreenObject { try super.init( expectedElementGetters: [ siteDomainsNavbarHeaderGetter ], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/DomainsSuggestionsScreen.swift b/WordPress/UITestsFoundation/Screens/DomainsSuggestionsScreen.swift index b9de5528d52b..eedb233add83 100644 --- a/WordPress/UITestsFoundation/Screens/DomainsSuggestionsScreen.swift +++ b/WordPress/UITestsFoundation/Screens/DomainsSuggestionsScreen.swift @@ -12,8 +12,7 @@ public class DomainsSuggestionsScreen: ScreenObject { public init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [ siteDomainsNavbarHeaderGetter ], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Editor/AztecEditorScreen.swift b/WordPress/UITestsFoundation/Screens/Editor/AztecEditorScreen.swift index ea9281f7b287..9d9f467fb947 100644 --- a/WordPress/UITestsFoundation/Screens/Editor/AztecEditorScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Editor/AztecEditorScreen.swift @@ -49,8 +49,7 @@ public class AztecEditorScreen: ScreenObject { try super.init( expectedElementGetters: [ textViewGetter(textField) ], - app: app, - waitTimeout: 7 + app: app ) showOptionsStrip() diff --git a/WordPress/UITestsFoundation/Screens/Editor/BlockEditorScreen.swift b/WordPress/UITestsFoundation/Screens/Editor/BlockEditorScreen.swift index e1808fe8ba66..fbb2d566ca6f 100644 --- a/WordPress/UITestsFoundation/Screens/Editor/BlockEditorScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Editor/BlockEditorScreen.swift @@ -36,8 +36,7 @@ public class BlockEditorScreen: ScreenObject { // expect to encase the screen. try super.init( expectedElementGetters: [ editorCloseButtonGetter, addBlockButtonGetter ], - app: app, - waitTimeout: 10 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Editor/ChooseLayoutScreen.swift b/WordPress/UITestsFoundation/Screens/Editor/ChooseLayoutScreen.swift index 82efcabbe5f7..3c871a6b8f4f 100644 --- a/WordPress/UITestsFoundation/Screens/Editor/ChooseLayoutScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Editor/ChooseLayoutScreen.swift @@ -10,8 +10,7 @@ public class ChooseLayoutScreen: ScreenObject { init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [closeButtonGetter], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Editor/EditorNoticeComponent.swift b/WordPress/UITestsFoundation/Screens/Editor/EditorNoticeComponent.swift index fa697fbc05bb..21d96321b673 100644 --- a/WordPress/UITestsFoundation/Screens/Editor/EditorNoticeComponent.swift +++ b/WordPress/UITestsFoundation/Screens/Editor/EditorNoticeComponent.swift @@ -19,8 +19,7 @@ public class EditorNoticeComponent: ScreenObject { try super.init( expectedElementGetters: [ noticeTitleGetter, noticeActionGetter ], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Editor/EditorPostSettings.swift b/WordPress/UITestsFoundation/Screens/Editor/EditorPostSettings.swift index 82fad5c1b2a2..0ab2e404d0f4 100644 --- a/WordPress/UITestsFoundation/Screens/Editor/EditorPostSettings.swift +++ b/WordPress/UITestsFoundation/Screens/Editor/EditorPostSettings.swift @@ -15,8 +15,7 @@ public class EditorPostSettings: ScreenObject { init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [ { $0.tables["SettingsTable"] } ], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Editor/EditorPublishEpilogueScreen.swift b/WordPress/UITestsFoundation/Screens/Editor/EditorPublishEpilogueScreen.swift index 498889a66639..b8540f16bac7 100644 --- a/WordPress/UITestsFoundation/Screens/Editor/EditorPublishEpilogueScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Editor/EditorPublishEpilogueScreen.swift @@ -22,8 +22,7 @@ public class EditorPublishEpilogueScreen: ScreenObject { try super.init( expectedElementGetters: [ getDoneButton, getViewButton, publishedPostStatusGetter ], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Editor/EditorSettingsComponents/CategoriesComponent.swift b/WordPress/UITestsFoundation/Screens/Editor/EditorSettingsComponents/CategoriesComponent.swift index e85876fe2a2f..81a4785ff1d4 100644 --- a/WordPress/UITestsFoundation/Screens/Editor/EditorSettingsComponents/CategoriesComponent.swift +++ b/WordPress/UITestsFoundation/Screens/Editor/EditorSettingsComponents/CategoriesComponent.swift @@ -6,8 +6,7 @@ public class CategoriesComponent: ScreenObject { init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [ { $0.tables["CategoriesList"] } ], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Editor/EditorSettingsComponents/TagsComponent.swift b/WordPress/UITestsFoundation/Screens/Editor/EditorSettingsComponents/TagsComponent.swift index a1971d7c459a..70d1dce5d570 100644 --- a/WordPress/UITestsFoundation/Screens/Editor/EditorSettingsComponents/TagsComponent.swift +++ b/WordPress/UITestsFoundation/Screens/Editor/EditorSettingsComponents/TagsComponent.swift @@ -9,8 +9,7 @@ public class TagsComponent: ScreenObject { init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [ { $0.textViews["add-tags"] } ], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Editor/FeaturedImageScreen.swift b/WordPress/UITestsFoundation/Screens/Editor/FeaturedImageScreen.swift index 85fa28be4af4..25b53ae7eaed 100644 --- a/WordPress/UITestsFoundation/Screens/Editor/FeaturedImageScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Editor/FeaturedImageScreen.swift @@ -9,8 +9,7 @@ public class FeaturedImageScreen: ScreenObject { public init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [ { $0.navigationBars.buttons["Remove Featured Image"] } ], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Jetpack/JetpackBackupOptionsScreen.swift b/WordPress/UITestsFoundation/Screens/Jetpack/JetpackBackupOptionsScreen.swift index 8f70944b0ad5..e58c7e2b39c4 100644 --- a/WordPress/UITestsFoundation/Screens/Jetpack/JetpackBackupOptionsScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Jetpack/JetpackBackupOptionsScreen.swift @@ -6,8 +6,7 @@ public class JetpackBackupOptionsScreen: ScreenObject { public init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [ { $0.otherElements.firstMatch } ], - app: app, - waitTimeout: 7 + app: app ) } } diff --git a/WordPress/UITestsFoundation/Screens/Jetpack/JetpackBackupScreen.swift b/WordPress/UITestsFoundation/Screens/Jetpack/JetpackBackupScreen.swift index 9d76d50092a4..999f5daae144 100644 --- a/WordPress/UITestsFoundation/Screens/Jetpack/JetpackBackupScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Jetpack/JetpackBackupScreen.swift @@ -13,8 +13,7 @@ public class JetpackBackupScreen: ScreenObject { public init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [ellipsisButtonGetter], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Jetpack/JetpackScanScreen.swift b/WordPress/UITestsFoundation/Screens/Jetpack/JetpackScanScreen.swift index c7f4ffc71168..e8163214592d 100644 --- a/WordPress/UITestsFoundation/Screens/Jetpack/JetpackScanScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Jetpack/JetpackScanScreen.swift @@ -6,8 +6,7 @@ public class JetpackScanScreen: ScreenObject { public init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [ { $0.otherElements.firstMatch } ], - app: app, - waitTimeout: 7 + app: app ) } } diff --git a/WordPress/UITestsFoundation/Screens/Login/FeatureIntroductionScreen.swift b/WordPress/UITestsFoundation/Screens/Login/FeatureIntroductionScreen.swift index 286aec0b8ac7..cc24651c330d 100644 --- a/WordPress/UITestsFoundation/Screens/Login/FeatureIntroductionScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Login/FeatureIntroductionScreen.swift @@ -11,8 +11,7 @@ public class FeatureIntroductionScreen: ScreenObject { public init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [closeButtonGetter], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Login/LinkOrPasswordScreen.swift b/WordPress/UITestsFoundation/Screens/Login/LinkOrPasswordScreen.swift index 112c4874552b..047fc58dbfa1 100644 --- a/WordPress/UITestsFoundation/Screens/Login/LinkOrPasswordScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Login/LinkOrPasswordScreen.swift @@ -15,8 +15,7 @@ public class LinkOrPasswordScreen: ScreenObject { init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [passwordOptionGetter, linkButtonGetter], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Login/LoginCheckMagicLinkScreen.swift b/WordPress/UITestsFoundation/Screens/Login/LoginCheckMagicLinkScreen.swift index bef86bbdd037..b139ef346caa 100644 --- a/WordPress/UITestsFoundation/Screens/Login/LoginCheckMagicLinkScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Login/LoginCheckMagicLinkScreen.swift @@ -14,8 +14,7 @@ public class LoginCheckMagicLinkScreen: ScreenObject { // swiftlint:disable:next opening_brace { $0.buttons["Open Mail Button"] } ], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Login/LoginEmailScreen.swift b/WordPress/UITestsFoundation/Screens/Login/LoginEmailScreen.swift index 6cda9eb87a1b..0891e67a5501 100644 --- a/WordPress/UITestsFoundation/Screens/Login/LoginEmailScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Login/LoginEmailScreen.swift @@ -19,8 +19,7 @@ public class LoginEmailScreen: ScreenObject { init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [emailTextFieldGetter, nextButtonGetter], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Login/LoginEpilogueScreen.swift b/WordPress/UITestsFoundation/Screens/Login/LoginEpilogueScreen.swift index bc604324c582..84d5c51a3ddc 100644 --- a/WordPress/UITestsFoundation/Screens/Login/LoginEpilogueScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Login/LoginEpilogueScreen.swift @@ -13,7 +13,7 @@ public class LoginEpilogueScreen: ScreenObject { try super.init( expectedElementGetters: [loginEpilogueTableGetter], app: app, - waitTimeout: 60 + waitTimeout: 65 ) } diff --git a/WordPress/UITestsFoundation/Screens/Login/LoginPasswordScreen.swift b/WordPress/UITestsFoundation/Screens/Login/LoginPasswordScreen.swift index 6efe5deee507..925beaae4f39 100644 --- a/WordPress/UITestsFoundation/Screens/Login/LoginPasswordScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Login/LoginPasswordScreen.swift @@ -12,8 +12,7 @@ class LoginPasswordScreen: ScreenObject { init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [passwordTextFieldGetter], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Login/LoginSiteAddressScreen.swift b/WordPress/UITestsFoundation/Screens/Login/LoginSiteAddressScreen.swift index badf06ea22bb..fb26648ded3d 100644 --- a/WordPress/UITestsFoundation/Screens/Login/LoginSiteAddressScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Login/LoginSiteAddressScreen.swift @@ -26,8 +26,7 @@ public class LoginSiteAddressScreen: ScreenObject { init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [siteAddressTextFieldGetter], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Login/LoginUsernamePasswordScreen.swift b/WordPress/UITestsFoundation/Screens/Login/LoginUsernamePasswordScreen.swift index cf09c4119dbb..e4cad8fc1423 100644 --- a/WordPress/UITestsFoundation/Screens/Login/LoginUsernamePasswordScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Login/LoginUsernamePasswordScreen.swift @@ -44,8 +44,7 @@ public class LoginUsernamePasswordScreen: ScreenObject { usernameTextFieldGetter, passwordTextFieldGetter ], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Login/OnboardingQuestionsPromptScreen.swift b/WordPress/UITestsFoundation/Screens/Login/OnboardingQuestionsPromptScreen.swift index 2040762b4965..e635424686a8 100644 --- a/WordPress/UITestsFoundation/Screens/Login/OnboardingQuestionsPromptScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Login/OnboardingQuestionsPromptScreen.swift @@ -11,8 +11,7 @@ public class OnboardingQuestionsPromptScreen: ScreenObject { public init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [skipButtonGetter], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Login/QuickStartPromptScreen.swift b/WordPress/UITestsFoundation/Screens/Login/QuickStartPromptScreen.swift index df95937f0914..7030d33819a0 100644 --- a/WordPress/UITestsFoundation/Screens/Login/QuickStartPromptScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Login/QuickStartPromptScreen.swift @@ -12,8 +12,7 @@ public class QuickStartPromptScreen: ScreenObject { public init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [noThanksButtonGetter], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Login/Unified/GetStartedScreen.swift b/WordPress/UITestsFoundation/Screens/Login/Unified/GetStartedScreen.swift index 5dfd2c9cbd96..9ca50cf44f44 100644 --- a/WordPress/UITestsFoundation/Screens/Login/Unified/GetStartedScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Login/Unified/GetStartedScreen.swift @@ -38,8 +38,7 @@ public class GetStartedScreen: ScreenObject { emailTextFieldGetter, helpButtonGetter ], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Login/Unified/PasswordScreen.swift b/WordPress/UITestsFoundation/Screens/Login/Unified/PasswordScreen.swift index 72391366b384..acfb9af7c8d1 100644 --- a/WordPress/UITestsFoundation/Screens/Login/Unified/PasswordScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Login/Unified/PasswordScreen.swift @@ -22,8 +22,7 @@ public class PasswordScreen: ScreenObject { public init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [ passwordTextFieldGetter, continueButtonGetter ], - app: app, - waitTimeout: 10 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Login/Unified/PrologueScreen.swift b/WordPress/UITestsFoundation/Screens/Login/Unified/PrologueScreen.swift index 0ce3bbe70e84..0553f0f62187 100644 --- a/WordPress/UITestsFoundation/Screens/Login/Unified/PrologueScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Login/Unified/PrologueScreen.swift @@ -17,8 +17,7 @@ public class PrologueScreen: ScreenObject { public init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [continueButtonGetter, siteAddressButtonGetter], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Login/WelcomeScreen.swift b/WordPress/UITestsFoundation/Screens/Login/WelcomeScreen.swift index ef5359088ae4..89b7a16bb708 100644 --- a/WordPress/UITestsFoundation/Screens/Login/WelcomeScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Login/WelcomeScreen.swift @@ -19,8 +19,7 @@ public class WelcomeScreen: ScreenObject { public init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [logInButtonGetter, signupButtonGetter], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Login/WelcomeScreenLoginComponent.swift b/WordPress/UITestsFoundation/Screens/Login/WelcomeScreenLoginComponent.swift index 90b8adc111e4..fb4b2b8510cf 100644 --- a/WordPress/UITestsFoundation/Screens/Login/WelcomeScreenLoginComponent.swift +++ b/WordPress/UITestsFoundation/Screens/Login/WelcomeScreenLoginComponent.swift @@ -15,8 +15,7 @@ public class WelcomeScreenLoginComponent: ScreenObject { init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [emailLoginButtonGetter, siteAddressButtonGetter], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Me/ContactUsScreen.swift b/WordPress/UITestsFoundation/Screens/Me/ContactUsScreen.swift index 8c6532cd9789..d72765b6fa03 100644 --- a/WordPress/UITestsFoundation/Screens/Me/ContactUsScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Me/ContactUsScreen.swift @@ -34,8 +34,7 @@ public class ContactUsScreen: ScreenObject { closeButtonGetter, attachButtonGetter, ], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Me/SupportScreen.swift b/WordPress/UITestsFoundation/Screens/Me/SupportScreen.swift index 96c415b73623..2a5f47896790 100644 --- a/WordPress/UITestsFoundation/Screens/Me/SupportScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Me/SupportScreen.swift @@ -39,8 +39,7 @@ public class SupportScreen: ScreenObject { { $0.cells["activity-logs-button"] } // swiftlint:enable opening_brace ], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/MeTabScreen.swift b/WordPress/UITestsFoundation/Screens/MeTabScreen.swift index 5e1d0a5e6309..e0381e8f4788 100644 --- a/WordPress/UITestsFoundation/Screens/MeTabScreen.swift +++ b/WordPress/UITestsFoundation/Screens/MeTabScreen.swift @@ -20,8 +20,7 @@ public class MeTabScreen: ScreenObject { try super.init( expectedElementGetter: { $0.cells["appSettings"] }, - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Media/MediaPickerAlbumListScreen.swift b/WordPress/UITestsFoundation/Screens/Media/MediaPickerAlbumListScreen.swift index 4b9ed8d1b3bf..78cc4ea51377 100644 --- a/WordPress/UITestsFoundation/Screens/Media/MediaPickerAlbumListScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Media/MediaPickerAlbumListScreen.swift @@ -10,8 +10,7 @@ public class MediaPickerAlbumListScreen: ScreenObject { public init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetter: albumListGetter, - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Media/MediaPickerAlbumScreen.swift b/WordPress/UITestsFoundation/Screens/Media/MediaPickerAlbumScreen.swift index 8f4f73d97de6..133381f8689b 100644 --- a/WordPress/UITestsFoundation/Screens/Media/MediaPickerAlbumScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Media/MediaPickerAlbumScreen.swift @@ -9,8 +9,7 @@ public class MediaPickerAlbumScreen: ScreenObject { public init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [mediaCollectionGetter], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/MediaScreen.swift b/WordPress/UITestsFoundation/Screens/MediaScreen.swift index 7e6bc5a7e9a6..771bf1f50c12 100644 --- a/WordPress/UITestsFoundation/Screens/MediaScreen.swift +++ b/WordPress/UITestsFoundation/Screens/MediaScreen.swift @@ -6,8 +6,7 @@ public class MediaScreen: ScreenObject { public init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [ { $0.collectionViews["MediaCollection"] } ], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/MySiteScreen.swift b/WordPress/UITestsFoundation/Screens/MySiteScreen.swift index 3dec24a98350..6178c4e7cae8 100644 --- a/WordPress/UITestsFoundation/Screens/MySiteScreen.swift +++ b/WordPress/UITestsFoundation/Screens/MySiteScreen.swift @@ -128,8 +128,7 @@ public class MySiteScreen: ScreenObject { mediaButtonGetter, createButtonGetter ], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/MySitesScreen.swift b/WordPress/UITestsFoundation/Screens/MySitesScreen.swift index 3400d18d604d..f04bf90a0627 100644 --- a/WordPress/UITestsFoundation/Screens/MySitesScreen.swift +++ b/WordPress/UITestsFoundation/Screens/MySitesScreen.swift @@ -24,8 +24,7 @@ public class MySitesScreen: ScreenObject { cancelButtonGetter, plusButtonGetter ], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/NotificationsScreen.swift b/WordPress/UITestsFoundation/Screens/NotificationsScreen.swift index d32f47c3926c..ad7699648e2c 100644 --- a/WordPress/UITestsFoundation/Screens/NotificationsScreen.swift +++ b/WordPress/UITestsFoundation/Screens/NotificationsScreen.swift @@ -6,8 +6,7 @@ public class NotificationsScreen: ScreenObject { init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [ { $0.tables["Notifications Table"] } ], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/PagesScreen.swift b/WordPress/UITestsFoundation/Screens/PagesScreen.swift index 607e6cb68118..020b04fddcd8 100644 --- a/WordPress/UITestsFoundation/Screens/PagesScreen.swift +++ b/WordPress/UITestsFoundation/Screens/PagesScreen.swift @@ -15,8 +15,7 @@ public class PagesScreen: ScreenObject { try super.init( expectedElementGetters: [ pagesTableGetter ], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/PeopleScreen.swift b/WordPress/UITestsFoundation/Screens/PeopleScreen.swift index 2c4c3feec618..378c44a7cb3a 100644 --- a/WordPress/UITestsFoundation/Screens/PeopleScreen.swift +++ b/WordPress/UITestsFoundation/Screens/PeopleScreen.swift @@ -17,8 +17,7 @@ public class PeopleScreen: ScreenObject { filterButtonGetter("followers"), filterButtonGetter("email") ], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/PlanSelectionScreen.swift b/WordPress/UITestsFoundation/Screens/PlanSelectionScreen.swift index c7f25de4f311..66d59d41658a 100644 --- a/WordPress/UITestsFoundation/Screens/PlanSelectionScreen.swift +++ b/WordPress/UITestsFoundation/Screens/PlanSelectionScreen.swift @@ -9,8 +9,7 @@ public class PlanSelectionScreen: ScreenObject { public init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [ webViewGetter ], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/PostsScreen.swift b/WordPress/UITestsFoundation/Screens/PostsScreen.swift index 91e4aa7f60ec..a74d99b906bd 100644 --- a/WordPress/UITestsFoundation/Screens/PostsScreen.swift +++ b/WordPress/UITestsFoundation/Screens/PostsScreen.swift @@ -13,8 +13,7 @@ public class PostsScreen: ScreenObject { init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [ { $0.tables["PostsTable"] } ], - app: app, - waitTimeout: 7 + app: app ) showOnly(.published) } diff --git a/WordPress/UITestsFoundation/Screens/ReaderScreen.swift b/WordPress/UITestsFoundation/Screens/ReaderScreen.swift index 7a8e88b4670e..3262e451c5e0 100644 --- a/WordPress/UITestsFoundation/Screens/ReaderScreen.swift +++ b/WordPress/UITestsFoundation/Screens/ReaderScreen.swift @@ -16,8 +16,7 @@ public class ReaderScreen: ScreenObject { { $0.tables["Reader"] }, discoverButtonGetter ], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Signup/SignupCheckMagicLinkScreen.swift b/WordPress/UITestsFoundation/Screens/Signup/SignupCheckMagicLinkScreen.swift index 5f1c5e354e7b..4f5e23593c74 100644 --- a/WordPress/UITestsFoundation/Screens/Signup/SignupCheckMagicLinkScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Signup/SignupCheckMagicLinkScreen.swift @@ -7,8 +7,7 @@ public class SignupCheckMagicLinkScreen: ScreenObject { try super.init( // swiftlint:disable:next opening_brace expectedElementGetters: [{ $0.buttons["Open Mail Button"] }], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Signup/SignupEmailScreen.swift b/WordPress/UITestsFoundation/Screens/Signup/SignupEmailScreen.swift index 96300e13f8a5..3d164b737497 100644 --- a/WordPress/UITestsFoundation/Screens/Signup/SignupEmailScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Signup/SignupEmailScreen.swift @@ -19,8 +19,7 @@ public class SignupEmailScreen: ScreenObject { init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [emailTextFieldGetter, nextButtonGetter], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Signup/SignupEpilogueScreen.swift b/WordPress/UITestsFoundation/Screens/Signup/SignupEpilogueScreen.swift index 8da53c217c21..a73de050180c 100644 --- a/WordPress/UITestsFoundation/Screens/Signup/SignupEpilogueScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Signup/SignupEpilogueScreen.swift @@ -6,8 +6,7 @@ public class SignupEpilogueScreen: ScreenObject { init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [ { $0.staticTexts["New Account Header"] } ], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/Signup/WelcomeScreenSignupComponent.swift b/WordPress/UITestsFoundation/Screens/Signup/WelcomeScreenSignupComponent.swift index ff23b0cd0dc9..7f9a73546a38 100644 --- a/WordPress/UITestsFoundation/Screens/Signup/WelcomeScreenSignupComponent.swift +++ b/WordPress/UITestsFoundation/Screens/Signup/WelcomeScreenSignupComponent.swift @@ -14,8 +14,7 @@ public class WelcomeScreenSignupComponent: ScreenObject { init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [emailSignupButtonGetter], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/SiteIntentScreen.swift b/WordPress/UITestsFoundation/Screens/SiteIntentScreen.swift index 36036dd0aad0..6fe6aac44eb5 100644 --- a/WordPress/UITestsFoundation/Screens/SiteIntentScreen.swift +++ b/WordPress/UITestsFoundation/Screens/SiteIntentScreen.swift @@ -14,8 +14,7 @@ public class SiteIntentScreen: ScreenObject { { $0.tables["Site Intent Table"] }, cancelButtonGetter ], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/SiteSettingsScreen.swift b/WordPress/UITestsFoundation/Screens/SiteSettingsScreen.swift index 04f2fa1752c2..66b8e84fd0f1 100644 --- a/WordPress/UITestsFoundation/Screens/SiteSettingsScreen.swift +++ b/WordPress/UITestsFoundation/Screens/SiteSettingsScreen.swift @@ -16,8 +16,7 @@ public class SiteSettingsScreen: ScreenObject { public init(app: XCUIApplication = XCUIApplication()) throws { try super.init( expectedElementGetters: [blockEditorToggleGetter], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/StatsScreen.swift b/WordPress/UITestsFoundation/Screens/StatsScreen.swift index 48b6aa3b6c7c..909287fbac4b 100644 --- a/WordPress/UITestsFoundation/Screens/StatsScreen.swift +++ b/WordPress/UITestsFoundation/Screens/StatsScreen.swift @@ -19,8 +19,7 @@ public class StatsScreen: ScreenObject { try super.init( // swiftlint:disable:next opening_brace expectedElementGetters: [{ $0.otherElements.firstMatch }], - app: app, - waitTimeout: 7 + app: app ) } diff --git a/WordPress/UITestsFoundation/Screens/TabNavComponent.swift b/WordPress/UITestsFoundation/Screens/TabNavComponent.swift index c4c627d0f901..00e05583f4a6 100644 --- a/WordPress/UITestsFoundation/Screens/TabNavComponent.swift +++ b/WordPress/UITestsFoundation/Screens/TabNavComponent.swift @@ -30,8 +30,7 @@ public class TabNavComponent: ScreenObject { readerTabButtonGetter, notificationsTabButtonGetter ], - app: app, - waitTimeout: 7 + app: app ) } From d47ca80f41c53d396431f7d25f6faeb13a0ee632 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Fri, 7 Jul 2023 15:54:01 +1000 Subject: [PATCH 47/72] Fix a minor typo in the tests --- WordPress/WordPressTest/LikeUserHelperTests.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPress/WordPressTest/LikeUserHelperTests.swift b/WordPress/WordPressTest/LikeUserHelperTests.swift index 322484593c63..dedd508a8f1a 100644 --- a/WordPress/WordPressTest/LikeUserHelperTests.swift +++ b/WordPress/WordPressTest/LikeUserHelperTests.swift @@ -95,7 +95,7 @@ class LikeUserHelperTests: CoreDataTestCase { let user = RemoteLikeUser(dictionary: dict, commentID: commentID, siteID: siteID) _ = LikeUserHelper.createOrUpdateFrom(remoteUser: user, context: mainContext) } - // Insert likes with an older data + // Insert likes with an older date for _ in 1...5 { let dict = createTestRemoteUserDictionary(withPreferredBlog: false, year: 1990) let user = RemoteLikeUser(dictionary: dict, commentID: commentID, siteID: siteID) From 2a9545aa6819e7b8940f1ee1e6c70aae87767ada Mon Sep 17 00:00:00 2001 From: jos <17252150+jostnes@users.noreply.github.com> Date: Fri, 7 Jul 2023 13:02:06 +0700 Subject: [PATCH 48/72] update timeout for save password and login epilogue screen --- .../UITestsFoundation/Screens/Login/LoginEpilogueScreen.swift | 2 +- WordPress/UITestsFoundation/XCUIApplication+SavePassword.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WordPress/UITestsFoundation/Screens/Login/LoginEpilogueScreen.swift b/WordPress/UITestsFoundation/Screens/Login/LoginEpilogueScreen.swift index 84d5c51a3ddc..92d52d0f4d38 100644 --- a/WordPress/UITestsFoundation/Screens/Login/LoginEpilogueScreen.swift +++ b/WordPress/UITestsFoundation/Screens/Login/LoginEpilogueScreen.swift @@ -13,7 +13,7 @@ public class LoginEpilogueScreen: ScreenObject { try super.init( expectedElementGetters: [loginEpilogueTableGetter], app: app, - waitTimeout: 65 + waitTimeout: 70 ) } diff --git a/WordPress/UITestsFoundation/XCUIApplication+SavePassword.swift b/WordPress/UITestsFoundation/XCUIApplication+SavePassword.swift index 8edf6e440b7b..dac04c35873d 100644 --- a/WordPress/UITestsFoundation/XCUIApplication+SavePassword.swift +++ b/WordPress/UITestsFoundation/XCUIApplication+SavePassword.swift @@ -6,7 +6,7 @@ extension XCUIApplication { // This method encapsulates the logic to dimiss the prompt. func dismissSavePasswordPrompt() { XCTContext.runActivity(named: "Dismiss save password prompt if needed.") { _ in - guard buttons["Save Password"].waitForExistence(timeout: 5) else { return } + guard buttons["Save Password"].waitForExistence(timeout: 10) else { return } // There should be no need to wait for this button to exist since it's part of the same // alert where "Save Password" is. From dee45b8aee38cd3abe92656a8852e4a83dd19e37 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Fri, 7 Jul 2023 16:08:36 +1000 Subject: [PATCH 49/72] =?UTF-8?q?Update=20app=20translations=20=E2=80=93?= =?UTF-8?q?=20`Localizable.strings`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WordPress/Resources/id.lproj/Localizable.strings | 5 ++++- WordPress/Resources/ro.lproj/Localizable.strings | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/WordPress/Resources/id.lproj/Localizable.strings b/WordPress/Resources/id.lproj/Localizable.strings index b57ee70158fa..200041fc6e3a 100644 --- a/WordPress/Resources/id.lproj/Localizable.strings +++ b/WordPress/Resources/id.lproj/Localizable.strings @@ -1,4 +1,4 @@ -/* Translation-Revision-Date: 2023-06-27 09:54:29+0000 */ +/* Translation-Revision-Date: 2023-06-30 15:06:09+0000 */ /* Plural-Forms: nplurals=2; plural=n > 1; */ /* Generator: GlotPress/4.0.0-alpha.4 */ /* Language: id */ @@ -9728,6 +9728,9 @@ translators: %s: Select control option value e.g: \"Auto, 25%\". */ /* Short status description */ "blazeCampaign.status.rejected" = "Ditolak"; +/* Short status description */ +"blazeCampaign.status.scheduled" = "Terjadwal"; + /* Title for budget stats view */ "blazeCampaigns.budget" = "Anggaran:"; diff --git a/WordPress/Resources/ro.lproj/Localizable.strings b/WordPress/Resources/ro.lproj/Localizable.strings index d8ed769b33d1..28720b3d26f6 100644 --- a/WordPress/Resources/ro.lproj/Localizable.strings +++ b/WordPress/Resources/ro.lproj/Localizable.strings @@ -1,4 +1,4 @@ -/* Translation-Revision-Date: 2023-06-26 13:11:37+0000 */ +/* Translation-Revision-Date: 2023-07-02 16:09:18+0000 */ /* Plural-Forms: nplurals=3; plural=(n == 1) ? 0 : ((n == 0 || n % 100 >= 2 && n % 100 <= 19) ? 1 : 2); */ /* Generator: GlotPress/4.0.0-alpha.4 */ /* Language: ro */ @@ -2314,7 +2314,7 @@ translators: Block name. %s: The localized block name */ /* Label for selecting the default post format Title for screen to select a default post format for a blog */ -"Default Post Format" = "Format articol implicit"; +"Default Post Format" = "Format implicit pentru articole"; /* Placeholder for the reader CSS URL */ "Default URL" = "URL implicit"; From 482e809102c0360d430c589c0e5a560a44725f6c Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Fri, 7 Jul 2023 16:10:23 +1000 Subject: [PATCH 50/72] Update WordPress metadata translations --- fastlane/metadata/ar-SA/release_notes.txt | 6 ++++++ fastlane/metadata/de-DE/release_notes.txt | 6 ++++++ fastlane/metadata/default/release_notes.txt | 11 +++++------ fastlane/metadata/es-ES/release_notes.txt | 6 ++++++ fastlane/metadata/fr-FR/release_notes.txt | 6 ++++++ fastlane/metadata/he/release_notes.txt | 6 ++++++ fastlane/metadata/id/release_notes.txt | 6 ++++++ fastlane/metadata/it/release_notes.txt | 6 ++++++ fastlane/metadata/ja/release_notes.txt | 6 ++++++ fastlane/metadata/ko/release_notes.txt | 6 ++++++ fastlane/metadata/nl-NL/release_notes.txt | 6 ++++++ fastlane/metadata/ru/release_notes.txt | 6 ++++++ fastlane/metadata/sv/release_notes.txt | 6 ++++++ fastlane/metadata/tr/release_notes.txt | 6 ++++++ fastlane/metadata/zh-Hans/release_notes.txt | 6 ++++++ fastlane/metadata/zh-Hant/release_notes.txt | 6 ++++++ 16 files changed, 95 insertions(+), 6 deletions(-) create mode 100644 fastlane/metadata/ar-SA/release_notes.txt create mode 100644 fastlane/metadata/de-DE/release_notes.txt create mode 100644 fastlane/metadata/es-ES/release_notes.txt create mode 100644 fastlane/metadata/fr-FR/release_notes.txt create mode 100644 fastlane/metadata/he/release_notes.txt create mode 100644 fastlane/metadata/id/release_notes.txt create mode 100644 fastlane/metadata/it/release_notes.txt create mode 100644 fastlane/metadata/ja/release_notes.txt create mode 100644 fastlane/metadata/ko/release_notes.txt create mode 100644 fastlane/metadata/nl-NL/release_notes.txt create mode 100644 fastlane/metadata/ru/release_notes.txt create mode 100644 fastlane/metadata/sv/release_notes.txt create mode 100644 fastlane/metadata/tr/release_notes.txt create mode 100644 fastlane/metadata/zh-Hans/release_notes.txt create mode 100644 fastlane/metadata/zh-Hant/release_notes.txt diff --git a/fastlane/metadata/ar-SA/release_notes.txt b/fastlane/metadata/ar-SA/release_notes.txt new file mode 100644 index 000000000000..165c71a28dd5 --- /dev/null +++ b/fastlane/metadata/ar-SA/release_notes.txt @@ -0,0 +1,6 @@ +أصلحنا مشكلة في بطاقة "العمل على مسودة تدوينة" في الشاشة الرئيسية. لن يتعطل التطبيق بعد الآن عند الوصول إلى المسودات في أثناء الوجود في منتصف عملية الرفع. + +قمنا بحل مشكلتين في محرر المكوّنات. + +- ناحية المين، تعرض مكوّنات الصور الآن نسبة العرض إلى الارتفاع الصحيحة، سواء أكانت الصورة تحتوي على عرض وارتفاع محدَدين أم لا. +- عندما تكتب نصًا، سيظل مرضع المؤشر في المكان المفترض أن يكون فيه؛ ولن يتحرك. تحلَّ بالهدوء وواصل الكتابة. diff --git a/fastlane/metadata/de-DE/release_notes.txt b/fastlane/metadata/de-DE/release_notes.txt new file mode 100644 index 000000000000..6738dbabed4e --- /dev/null +++ b/fastlane/metadata/de-DE/release_notes.txt @@ -0,0 +1,6 @@ +Wir haben ein Problem mit der Karte „An einem Beitragsentwurf arbeiten“ der Startseite behoben. Die App stürzt nun nicht mehr ab, wenn du auf Entwürfe zugreifst, während sie hochgeladen werden. + +Außerdem haben wir einige Probleme im Block-Editor behoben. + +- Bei Bildblöcken wird jetzt das richtige Bildformat angezeigt, egal ob Höhe und Breite des Bildes definiert sind oder nicht. +- Beim Diktieren bleibt der Cursor an der gewünschten Stelle und springt nicht mehr herum. So kannst du ganz in Ruhe weiterdiktieren. diff --git a/fastlane/metadata/default/release_notes.txt b/fastlane/metadata/default/release_notes.txt index 637ca793c29c..3c0fb643df2b 100644 --- a/fastlane/metadata/default/release_notes.txt +++ b/fastlane/metadata/default/release_notes.txt @@ -1,7 +1,6 @@ -* [**] [internal] Blaze: Switch to using new canBlaze property to determine Blaze eligiblity. [#20916] -* [**] Fixed crash issue when accessing drafts that are mid-upload from the Home 'Work on a Draft Post' card. [#20872] -* [**] [internal] Make sure media-related features function correctly. [#20889], [20887] -* [*] [internal] Posts list: Disable action bar/menu button when a post is being uploaded [#20885] -* [*] Block editor: Image block - Fix issue where in some cases the image doesn't display the right aspect ratio [https://github.com/wordpress-mobile/gutenberg-mobile/pull/5869] -* [*] Block editor: Fix cursor positioning when dictating text on iOS [https://github.com/WordPress/gutenberg/issues/51227] +We fixed an issue with the home screen’s “Work on a draft post” card. The app will no longer crash when you access drafts while they’re in the middle of uploading. +We also solved a couple of problems in the block editor. + +- Right on—image blocks now display the correct aspect ratio, whether or not the image has a set width and height. +- When you’re dictating text, the cursor’s position will stay where it’s supposed to—no more jumping around. Keep calm and dictate on. diff --git a/fastlane/metadata/es-ES/release_notes.txt b/fastlane/metadata/es-ES/release_notes.txt new file mode 100644 index 000000000000..7601ed233ddd --- /dev/null +++ b/fastlane/metadata/es-ES/release_notes.txt @@ -0,0 +1,6 @@ +Hemos corregido un problema que se producía en la tarjeta “Trabajar en un borrador de entrada” de la pantalla de inicio. La aplicación ya no se bloqueará si accedes a los borradores mientras se cargan. + +También hemos resuelto un par de problemas en el editor de bloques. + +- Ahora, los bloques de imagen muestran la relación de aspecto correcta, tanto si la imagen tiene una anchura y una altura determinadas como si no. +- Al dictar un texto, la posición del cursor se mantendrá en su sitio y no se producirán saltos. De esta manera, podrás dictar con tranquilidad. diff --git a/fastlane/metadata/fr-FR/release_notes.txt b/fastlane/metadata/fr-FR/release_notes.txt new file mode 100644 index 000000000000..86cc0dc7247c --- /dev/null +++ b/fastlane/metadata/fr-FR/release_notes.txt @@ -0,0 +1,6 @@ +Nous avons corrigé un problème avec la carte « Travailler sur un brouillon d’article » de l’écran d’accueil. L’application ne rencontre plus d’incident lorsque vous accédez à des brouillons en cours de chargement. + +Nous avons également résolu quelques problèmes dans l’éditeur de blocs. + +- Les blocs d’images de droite affichent désormais le bon rapport hauteur/largeur, que l’image soit ou non définie en largeur et en hauteur. +- Lorsque vous dictez du texte, la position du curseur reste à l’endroit prévu, il n’y a plus de sauts. Restez calme et continuez à dicter. diff --git a/fastlane/metadata/he/release_notes.txt b/fastlane/metadata/he/release_notes.txt new file mode 100644 index 000000000000..2646a7b35fc9 --- /dev/null +++ b/fastlane/metadata/he/release_notes.txt @@ -0,0 +1,6 @@ +תיקנו בעיה עם הכרטיס "לערוך פוסט טיוטה" שהופיע במסך הבית. האפליקציה לא קורסת עוד כאשר ניגשים לטיוטות שנמצאות בתהליך העלאה. + +בנוסף, פתרנו כמה בעיות בעורך הבלוקים. + +- ישר ולעניין – בלוקים של תמונה כעת מוצגים ביחס גובה-רוחב מתאים, לא משנה אם הרוחב והגובה של התמונה הוגדרו מראש. +- אם מכתיבים טקסט, המיקום של הסמן יישאר במקום הנכון – ולא יקפוץ ברחבי העמוד. אפשר להכתיב בשקט. diff --git a/fastlane/metadata/id/release_notes.txt b/fastlane/metadata/id/release_notes.txt new file mode 100644 index 000000000000..7b97938cba29 --- /dev/null +++ b/fastlane/metadata/id/release_notes.txt @@ -0,0 +1,6 @@ +Kami sudah membereskan masalah kartu “Buat draft pos” di layar beranda. Aplikasi kini tidak akan mengalami crash lagi ketika Anda mengakses draft saat sedang diunggah. + +Kami juga telah mengatasi beberapa masalah di editor blok. + +- Betul sekali. Blok gambar kini menampilkan rasio aspek yang tepat, terlepas dari apakah lebar dan tinggi gambar sudah ditentukan. +- Ketika Anda mendiktekan teks, kursor tetap berada di posisinya dan tidak lagi melompat-lompat. Tetaplah tenang dan teruslah mendikte. diff --git a/fastlane/metadata/it/release_notes.txt b/fastlane/metadata/it/release_notes.txt new file mode 100644 index 000000000000..696c2a845eda --- /dev/null +++ b/fastlane/metadata/it/release_notes.txt @@ -0,0 +1,6 @@ +Abbiamo risolto un problema con la scheda "Lavora su un articolo bozza" nella schermata iniziale. L'app non si arresta più in modo anomalo quando si accede alle bozze mentre sono in fase di caricamento. + +Abbiamo anche risolto un paio di problemi nell'editor a blocchi. + +- Miglioramento immediato: i blocchi di immagini ora mostrano le proporzioni corrette, indipendentemente dal fatto che l'immagine abbia o meno larghezza e altezza impostate. +- Durante la dettatura di un testo, la posizione del cursore rimarrà dove deve, non dovrai muoverti nel testo. Calma e inizia a dettare. diff --git a/fastlane/metadata/ja/release_notes.txt b/fastlane/metadata/ja/release_notes.txt new file mode 100644 index 000000000000..f7169a5a66a9 --- /dev/null +++ b/fastlane/metadata/ja/release_notes.txt @@ -0,0 +1,6 @@ +ホーム画面の「下書き投稿を作成」カードの問題を修正しました。 今後はアップロード中に下書きにアクセスしてもアプリがクラッシュすることはありません。 + +ブロックエディターの問題もいくつか解決しました。 + +- 修正完了 - 画像の幅と高さが設定されているかどうかにかかわらず、画像ブロックでは正しい縦横比が表示されるようになりました。 +- テキストを音声入力する際に、カーソルが所定の位置に留まり、飛び回ることがなくなります。 落ち着いて音声で入力することができます。 diff --git a/fastlane/metadata/ko/release_notes.txt b/fastlane/metadata/ko/release_notes.txt new file mode 100644 index 000000000000..6ccdb644a4d9 --- /dev/null +++ b/fastlane/metadata/ko/release_notes.txt @@ -0,0 +1,6 @@ +홈 화면의 "임시글로 글 작업" 카드와 관련한 문제를 해결했습니다. 이제는 임시글을 업로드하는 도중에 접근할 때 앱이 충돌하지 않습니다. + +블록 편집기의 몇 가지 문제도 해결했습니다. + +- 정말입니다. 설정된 너비와 높이가 이미지에 있는지 여부와 관계없이 이제는 이미지 블록이 올바른 화면 비율로 표시됩니다. +- 텍스트를 받아쓰기할 때 커서의 위치가 이리저리 돌아다니지 않고 유지됩니다. 계속 차분하게 받아쓰세요. diff --git a/fastlane/metadata/nl-NL/release_notes.txt b/fastlane/metadata/nl-NL/release_notes.txt new file mode 100644 index 000000000000..cffee33237c0 --- /dev/null +++ b/fastlane/metadata/nl-NL/release_notes.txt @@ -0,0 +1,6 @@ +We hebben een probleem opgelost met de kaart ‘Aan een conceptbericht werken’ op het startscherm. De app crasht niet meer wanneer je concepten opent terwijl ze nog worden geüpload. + +We hebben ook een aantal problemen opgelost met de blokeditor. + +- Geweldig, afbeeldingblokken worden nu in de juiste beeldverhouding weergegeven, of er nou wel of niet een breedte en hoogte zijn ingesteld voor het beeld. +- Wanneer je een tekst dicteert, blijft de cursor waar die zou moeten zijn en springt deze niet meer over het scherm. Blijf kalm en dicteer verder. diff --git a/fastlane/metadata/ru/release_notes.txt b/fastlane/metadata/ru/release_notes.txt new file mode 100644 index 000000000000..f48a54c1082b --- /dev/null +++ b/fastlane/metadata/ru/release_notes.txt @@ -0,0 +1,6 @@ +Исправлена проблема с карточкой "Работа над черновиком" на главном экране. Приложение больше не будет аварийно закрываться, когда вы пытаетесь открыть черновики в процессе их загрузки на сервер. + +Также решена пара проблем в редакторе блоков. + +— Блоки изображений наконец-то будут иметь верное соотношение сторон независимо от заданной ширины и высоты изображения. +— Курсор больше не скачет при диктовке текста. Вы можете спокойно продолжать диктовку, ни на что не отвлекаясь. diff --git a/fastlane/metadata/sv/release_notes.txt b/fastlane/metadata/sv/release_notes.txt new file mode 100644 index 000000000000..a5ae9b99bc1a --- /dev/null +++ b/fastlane/metadata/sv/release_notes.txt @@ -0,0 +1,6 @@ +Vi har åtgärdat ett problem med startskärmskortet "Arbeta med ett inläggsutkast". Appen kommer inte längre att krascha om du öppnar utkast medan de fortfarande håller på att laddas upp. + +Vi har även löst ett antal problem i blockredigeraren. + +- Fixat – bildblock visas nu med rätt bildförhållande, oavsett om bilden har en angiven bredd och höjd eller inte. +- När du dikterar text kommer markörens position att förbli där den ska vara – inget mer omkringhoppande. Ta det lugnt och diktera vidare. diff --git a/fastlane/metadata/tr/release_notes.txt b/fastlane/metadata/tr/release_notes.txt new file mode 100644 index 000000000000..0fae38e25b8d --- /dev/null +++ b/fastlane/metadata/tr/release_notes.txt @@ -0,0 +1,6 @@ +Ana ekranın "Bir taslak yazı üzerinde çalışın" kartıyla ilgili bir sorunu düzelttik. Yüklenmekte olan taslaklara eriştiğinizde artık uygulama kilitlenmeyecek. + +Ayrıca, blok düzenleyicisiyle ilgili birkaç problemi de giderdik. + +- Tam isabet—Görsel blokları, görsel için belirlenmiş bir genişlik ve yükseklik olsun ya da olmasın artık doğru en boy oranını gösteriyor. +- Metni dikte ederken imlecin konumu olması gerektiği yerde kalır ve sağa sola hareket etmez. Sakin olun ve dikte etmeye devam edin. diff --git a/fastlane/metadata/zh-Hans/release_notes.txt b/fastlane/metadata/zh-Hans/release_notes.txt new file mode 100644 index 000000000000..1dce585107b9 --- /dev/null +++ b/fastlane/metadata/zh-Hans/release_notes.txt @@ -0,0 +1,6 @@ +我们修复了主屏幕上“继续撰写文章草稿”卡片的问题。 访问正在上传的草稿时,应用不会再崩溃。 + +我们还解决了区块编辑器中的几个问题。 + +- 现在,无论否设置了图片宽度和高度,图片编辑器上的图片都可以显示正确的宽高比。 +- 口述文字时,光标的位置会停留在正确位置,不会再出现跳跃的情况。 保持冷静,继续口述。 diff --git a/fastlane/metadata/zh-Hant/release_notes.txt b/fastlane/metadata/zh-Hant/release_notes.txt new file mode 100644 index 000000000000..d02f16c8380f --- /dev/null +++ b/fastlane/metadata/zh-Hant/release_notes.txt @@ -0,0 +1,6 @@ +我們修正了主畫面「編輯草稿文章」資訊卡的問題。 當你存取正在上傳的草稿時,應用程式不會再當機。 + +我們也解決了區塊編輯器的幾個問題。 + +- 不論圖片是否設定寬度和高度,圖片區塊現在會以正確的長寬比顯示。 +- 聽寫文字時,游標位置會停留在應該顯示的位置,不會再跳來跳去, 讓你安心使用聽寫功能。 From cd1b009385645389c23f4ec55e64927a98f77730 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Fri, 7 Jul 2023 16:10:30 +1000 Subject: [PATCH 51/72] Update Jetpack metadata translations --- fastlane/jetpack_metadata/ar-SA/release_notes.txt | 6 ++++++ fastlane/jetpack_metadata/de-DE/release_notes.txt | 6 ++++++ fastlane/jetpack_metadata/default/release_notes.txt | 11 +++++------ fastlane/jetpack_metadata/es-ES/release_notes.txt | 6 ++++++ fastlane/jetpack_metadata/fr-FR/release_notes.txt | 6 ++++++ fastlane/jetpack_metadata/he/release_notes.txt | 6 ++++++ fastlane/jetpack_metadata/id/release_notes.txt | 6 ++++++ fastlane/jetpack_metadata/it/release_notes.txt | 6 ++++++ fastlane/jetpack_metadata/ja/release_notes.txt | 6 ++++++ fastlane/jetpack_metadata/ko/release_notes.txt | 6 ++++++ fastlane/jetpack_metadata/nl-NL/release_notes.txt | 6 ++++++ fastlane/jetpack_metadata/pt-BR/release_notes.txt | 6 ++++++ fastlane/jetpack_metadata/ru/release_notes.txt | 6 ++++++ fastlane/jetpack_metadata/sv/release_notes.txt | 6 ++++++ fastlane/jetpack_metadata/tr/release_notes.txt | 6 ++++++ fastlane/jetpack_metadata/zh-Hans/release_notes.txt | 6 ++++++ fastlane/jetpack_metadata/zh-Hant/release_notes.txt | 6 ++++++ 17 files changed, 101 insertions(+), 6 deletions(-) create mode 100644 fastlane/jetpack_metadata/ar-SA/release_notes.txt create mode 100644 fastlane/jetpack_metadata/de-DE/release_notes.txt create mode 100644 fastlane/jetpack_metadata/es-ES/release_notes.txt create mode 100644 fastlane/jetpack_metadata/fr-FR/release_notes.txt create mode 100644 fastlane/jetpack_metadata/he/release_notes.txt create mode 100644 fastlane/jetpack_metadata/id/release_notes.txt create mode 100644 fastlane/jetpack_metadata/it/release_notes.txt create mode 100644 fastlane/jetpack_metadata/ja/release_notes.txt create mode 100644 fastlane/jetpack_metadata/ko/release_notes.txt create mode 100644 fastlane/jetpack_metadata/nl-NL/release_notes.txt create mode 100644 fastlane/jetpack_metadata/pt-BR/release_notes.txt create mode 100644 fastlane/jetpack_metadata/ru/release_notes.txt create mode 100644 fastlane/jetpack_metadata/sv/release_notes.txt create mode 100644 fastlane/jetpack_metadata/tr/release_notes.txt create mode 100644 fastlane/jetpack_metadata/zh-Hans/release_notes.txt create mode 100644 fastlane/jetpack_metadata/zh-Hant/release_notes.txt diff --git a/fastlane/jetpack_metadata/ar-SA/release_notes.txt b/fastlane/jetpack_metadata/ar-SA/release_notes.txt new file mode 100644 index 000000000000..165c71a28dd5 --- /dev/null +++ b/fastlane/jetpack_metadata/ar-SA/release_notes.txt @@ -0,0 +1,6 @@ +أصلحنا مشكلة في بطاقة "العمل على مسودة تدوينة" في الشاشة الرئيسية. لن يتعطل التطبيق بعد الآن عند الوصول إلى المسودات في أثناء الوجود في منتصف عملية الرفع. + +قمنا بحل مشكلتين في محرر المكوّنات. + +- ناحية المين، تعرض مكوّنات الصور الآن نسبة العرض إلى الارتفاع الصحيحة، سواء أكانت الصورة تحتوي على عرض وارتفاع محدَدين أم لا. +- عندما تكتب نصًا، سيظل مرضع المؤشر في المكان المفترض أن يكون فيه؛ ولن يتحرك. تحلَّ بالهدوء وواصل الكتابة. diff --git a/fastlane/jetpack_metadata/de-DE/release_notes.txt b/fastlane/jetpack_metadata/de-DE/release_notes.txt new file mode 100644 index 000000000000..6738dbabed4e --- /dev/null +++ b/fastlane/jetpack_metadata/de-DE/release_notes.txt @@ -0,0 +1,6 @@ +Wir haben ein Problem mit der Karte „An einem Beitragsentwurf arbeiten“ der Startseite behoben. Die App stürzt nun nicht mehr ab, wenn du auf Entwürfe zugreifst, während sie hochgeladen werden. + +Außerdem haben wir einige Probleme im Block-Editor behoben. + +- Bei Bildblöcken wird jetzt das richtige Bildformat angezeigt, egal ob Höhe und Breite des Bildes definiert sind oder nicht. +- Beim Diktieren bleibt der Cursor an der gewünschten Stelle und springt nicht mehr herum. So kannst du ganz in Ruhe weiterdiktieren. diff --git a/fastlane/jetpack_metadata/default/release_notes.txt b/fastlane/jetpack_metadata/default/release_notes.txt index 637ca793c29c..3c0fb643df2b 100644 --- a/fastlane/jetpack_metadata/default/release_notes.txt +++ b/fastlane/jetpack_metadata/default/release_notes.txt @@ -1,7 +1,6 @@ -* [**] [internal] Blaze: Switch to using new canBlaze property to determine Blaze eligiblity. [#20916] -* [**] Fixed crash issue when accessing drafts that are mid-upload from the Home 'Work on a Draft Post' card. [#20872] -* [**] [internal] Make sure media-related features function correctly. [#20889], [20887] -* [*] [internal] Posts list: Disable action bar/menu button when a post is being uploaded [#20885] -* [*] Block editor: Image block - Fix issue where in some cases the image doesn't display the right aspect ratio [https://github.com/wordpress-mobile/gutenberg-mobile/pull/5869] -* [*] Block editor: Fix cursor positioning when dictating text on iOS [https://github.com/WordPress/gutenberg/issues/51227] +We fixed an issue with the home screen’s “Work on a draft post” card. The app will no longer crash when you access drafts while they’re in the middle of uploading. +We also solved a couple of problems in the block editor. + +- Right on—image blocks now display the correct aspect ratio, whether or not the image has a set width and height. +- When you’re dictating text, the cursor’s position will stay where it’s supposed to—no more jumping around. Keep calm and dictate on. diff --git a/fastlane/jetpack_metadata/es-ES/release_notes.txt b/fastlane/jetpack_metadata/es-ES/release_notes.txt new file mode 100644 index 000000000000..7601ed233ddd --- /dev/null +++ b/fastlane/jetpack_metadata/es-ES/release_notes.txt @@ -0,0 +1,6 @@ +Hemos corregido un problema que se producía en la tarjeta “Trabajar en un borrador de entrada” de la pantalla de inicio. La aplicación ya no se bloqueará si accedes a los borradores mientras se cargan. + +También hemos resuelto un par de problemas en el editor de bloques. + +- Ahora, los bloques de imagen muestran la relación de aspecto correcta, tanto si la imagen tiene una anchura y una altura determinadas como si no. +- Al dictar un texto, la posición del cursor se mantendrá en su sitio y no se producirán saltos. De esta manera, podrás dictar con tranquilidad. diff --git a/fastlane/jetpack_metadata/fr-FR/release_notes.txt b/fastlane/jetpack_metadata/fr-FR/release_notes.txt new file mode 100644 index 000000000000..86cc0dc7247c --- /dev/null +++ b/fastlane/jetpack_metadata/fr-FR/release_notes.txt @@ -0,0 +1,6 @@ +Nous avons corrigé un problème avec la carte « Travailler sur un brouillon d’article » de l’écran d’accueil. L’application ne rencontre plus d’incident lorsque vous accédez à des brouillons en cours de chargement. + +Nous avons également résolu quelques problèmes dans l’éditeur de blocs. + +- Les blocs d’images de droite affichent désormais le bon rapport hauteur/largeur, que l’image soit ou non définie en largeur et en hauteur. +- Lorsque vous dictez du texte, la position du curseur reste à l’endroit prévu, il n’y a plus de sauts. Restez calme et continuez à dicter. diff --git a/fastlane/jetpack_metadata/he/release_notes.txt b/fastlane/jetpack_metadata/he/release_notes.txt new file mode 100644 index 000000000000..2646a7b35fc9 --- /dev/null +++ b/fastlane/jetpack_metadata/he/release_notes.txt @@ -0,0 +1,6 @@ +תיקנו בעיה עם הכרטיס "לערוך פוסט טיוטה" שהופיע במסך הבית. האפליקציה לא קורסת עוד כאשר ניגשים לטיוטות שנמצאות בתהליך העלאה. + +בנוסף, פתרנו כמה בעיות בעורך הבלוקים. + +- ישר ולעניין – בלוקים של תמונה כעת מוצגים ביחס גובה-רוחב מתאים, לא משנה אם הרוחב והגובה של התמונה הוגדרו מראש. +- אם מכתיבים טקסט, המיקום של הסמן יישאר במקום הנכון – ולא יקפוץ ברחבי העמוד. אפשר להכתיב בשקט. diff --git a/fastlane/jetpack_metadata/id/release_notes.txt b/fastlane/jetpack_metadata/id/release_notes.txt new file mode 100644 index 000000000000..7b97938cba29 --- /dev/null +++ b/fastlane/jetpack_metadata/id/release_notes.txt @@ -0,0 +1,6 @@ +Kami sudah membereskan masalah kartu “Buat draft pos” di layar beranda. Aplikasi kini tidak akan mengalami crash lagi ketika Anda mengakses draft saat sedang diunggah. + +Kami juga telah mengatasi beberapa masalah di editor blok. + +- Betul sekali. Blok gambar kini menampilkan rasio aspek yang tepat, terlepas dari apakah lebar dan tinggi gambar sudah ditentukan. +- Ketika Anda mendiktekan teks, kursor tetap berada di posisinya dan tidak lagi melompat-lompat. Tetaplah tenang dan teruslah mendikte. diff --git a/fastlane/jetpack_metadata/it/release_notes.txt b/fastlane/jetpack_metadata/it/release_notes.txt new file mode 100644 index 000000000000..d389c5a30905 --- /dev/null +++ b/fastlane/jetpack_metadata/it/release_notes.txt @@ -0,0 +1,6 @@ +Abbiamo risolto un problema con la scheda "Lavora su un articolo bozza" nella schermata iniziale. L'app non si arresta più in modo anomalo quando si accede alle bozze mentre sono in fase di caricamento. + +Abbiamo anche risolto un paio di problemi nell'Editor a blocchi. + +- Miglioramento immediato: i blocchi di immagini ora mostrano le proporzioni corrette, indipendentemente dal fatto che l'immagine abbia o meno larghezza e altezza impostate. +- Durante la dettatura di un testo, la posizione del cursore rimarrà dove deve, non dovrai muoverti nel testo. Keep calm and dictate on. diff --git a/fastlane/jetpack_metadata/ja/release_notes.txt b/fastlane/jetpack_metadata/ja/release_notes.txt new file mode 100644 index 000000000000..f7169a5a66a9 --- /dev/null +++ b/fastlane/jetpack_metadata/ja/release_notes.txt @@ -0,0 +1,6 @@ +ホーム画面の「下書き投稿を作成」カードの問題を修正しました。 今後はアップロード中に下書きにアクセスしてもアプリがクラッシュすることはありません。 + +ブロックエディターの問題もいくつか解決しました。 + +- 修正完了 - 画像の幅と高さが設定されているかどうかにかかわらず、画像ブロックでは正しい縦横比が表示されるようになりました。 +- テキストを音声入力する際に、カーソルが所定の位置に留まり、飛び回ることがなくなります。 落ち着いて音声で入力することができます。 diff --git a/fastlane/jetpack_metadata/ko/release_notes.txt b/fastlane/jetpack_metadata/ko/release_notes.txt new file mode 100644 index 000000000000..6ccdb644a4d9 --- /dev/null +++ b/fastlane/jetpack_metadata/ko/release_notes.txt @@ -0,0 +1,6 @@ +홈 화면의 "임시글로 글 작업" 카드와 관련한 문제를 해결했습니다. 이제는 임시글을 업로드하는 도중에 접근할 때 앱이 충돌하지 않습니다. + +블록 편집기의 몇 가지 문제도 해결했습니다. + +- 정말입니다. 설정된 너비와 높이가 이미지에 있는지 여부와 관계없이 이제는 이미지 블록이 올바른 화면 비율로 표시됩니다. +- 텍스트를 받아쓰기할 때 커서의 위치가 이리저리 돌아다니지 않고 유지됩니다. 계속 차분하게 받아쓰세요. diff --git a/fastlane/jetpack_metadata/nl-NL/release_notes.txt b/fastlane/jetpack_metadata/nl-NL/release_notes.txt new file mode 100644 index 000000000000..cffee33237c0 --- /dev/null +++ b/fastlane/jetpack_metadata/nl-NL/release_notes.txt @@ -0,0 +1,6 @@ +We hebben een probleem opgelost met de kaart ‘Aan een conceptbericht werken’ op het startscherm. De app crasht niet meer wanneer je concepten opent terwijl ze nog worden geüpload. + +We hebben ook een aantal problemen opgelost met de blokeditor. + +- Geweldig, afbeeldingblokken worden nu in de juiste beeldverhouding weergegeven, of er nou wel of niet een breedte en hoogte zijn ingesteld voor het beeld. +- Wanneer je een tekst dicteert, blijft de cursor waar die zou moeten zijn en springt deze niet meer over het scherm. Blijf kalm en dicteer verder. diff --git a/fastlane/jetpack_metadata/pt-BR/release_notes.txt b/fastlane/jetpack_metadata/pt-BR/release_notes.txt new file mode 100644 index 000000000000..950261413c2e --- /dev/null +++ b/fastlane/jetpack_metadata/pt-BR/release_notes.txt @@ -0,0 +1,6 @@ +Corrigimos um problema no cartão "Trabalhar em um post em rascunho" da tela inicial. O aplicativo não vai mais travar quando você acessar os rascunhos durante o upload deles. + +Também resolvemos alguns problemas no editor de blocos. + +- Sem defeitos: agora os blocos de imagem vão exibir a proporção correta mesmo se a largura e altura da imagem não estiverem definidas. +- Quando você ditar o texto, a posição do cursor vai ficar no lugar certo e não pulando para lá e para cá. Continue a ditar, continue a ditar... diff --git a/fastlane/jetpack_metadata/ru/release_notes.txt b/fastlane/jetpack_metadata/ru/release_notes.txt new file mode 100644 index 000000000000..b0efc98c6e3d --- /dev/null +++ b/fastlane/jetpack_metadata/ru/release_notes.txt @@ -0,0 +1,6 @@ +Исправлена проблема с карточкой «Работа над черновиком» на главном экране. Приложение прекратило аварийно закрываться при попытке открыть черновики в процессе загрузки на сервер. + +Также решена пара проблем в редакторе блоков. + +— У блоков изображений сохраняется верное соотношение сторон независимо от заданной ширины и высоты изображения. +— Курсор больше не скачет при диктовке текста. Вы можете спокойно продолжать диктовать, ни на что не отвлекаясь. diff --git a/fastlane/jetpack_metadata/sv/release_notes.txt b/fastlane/jetpack_metadata/sv/release_notes.txt new file mode 100644 index 000000000000..a5ae9b99bc1a --- /dev/null +++ b/fastlane/jetpack_metadata/sv/release_notes.txt @@ -0,0 +1,6 @@ +Vi har åtgärdat ett problem med startskärmskortet "Arbeta med ett inläggsutkast". Appen kommer inte längre att krascha om du öppnar utkast medan de fortfarande håller på att laddas upp. + +Vi har även löst ett antal problem i blockredigeraren. + +- Fixat – bildblock visas nu med rätt bildförhållande, oavsett om bilden har en angiven bredd och höjd eller inte. +- När du dikterar text kommer markörens position att förbli där den ska vara – inget mer omkringhoppande. Ta det lugnt och diktera vidare. diff --git a/fastlane/jetpack_metadata/tr/release_notes.txt b/fastlane/jetpack_metadata/tr/release_notes.txt new file mode 100644 index 000000000000..0fae38e25b8d --- /dev/null +++ b/fastlane/jetpack_metadata/tr/release_notes.txt @@ -0,0 +1,6 @@ +Ana ekranın "Bir taslak yazı üzerinde çalışın" kartıyla ilgili bir sorunu düzelttik. Yüklenmekte olan taslaklara eriştiğinizde artık uygulama kilitlenmeyecek. + +Ayrıca, blok düzenleyicisiyle ilgili birkaç problemi de giderdik. + +- Tam isabet—Görsel blokları, görsel için belirlenmiş bir genişlik ve yükseklik olsun ya da olmasın artık doğru en boy oranını gösteriyor. +- Metni dikte ederken imlecin konumu olması gerektiği yerde kalır ve sağa sola hareket etmez. Sakin olun ve dikte etmeye devam edin. diff --git a/fastlane/jetpack_metadata/zh-Hans/release_notes.txt b/fastlane/jetpack_metadata/zh-Hans/release_notes.txt new file mode 100644 index 000000000000..1dce585107b9 --- /dev/null +++ b/fastlane/jetpack_metadata/zh-Hans/release_notes.txt @@ -0,0 +1,6 @@ +我们修复了主屏幕上“继续撰写文章草稿”卡片的问题。 访问正在上传的草稿时,应用不会再崩溃。 + +我们还解决了区块编辑器中的几个问题。 + +- 现在,无论否设置了图片宽度和高度,图片编辑器上的图片都可以显示正确的宽高比。 +- 口述文字时,光标的位置会停留在正确位置,不会再出现跳跃的情况。 保持冷静,继续口述。 diff --git a/fastlane/jetpack_metadata/zh-Hant/release_notes.txt b/fastlane/jetpack_metadata/zh-Hant/release_notes.txt new file mode 100644 index 000000000000..d02f16c8380f --- /dev/null +++ b/fastlane/jetpack_metadata/zh-Hant/release_notes.txt @@ -0,0 +1,6 @@ +我們修正了主畫面「編輯草稿文章」資訊卡的問題。 當你存取正在上傳的草稿時,應用程式不會再當機。 + +我們也解決了區塊編輯器的幾個問題。 + +- 不論圖片是否設定寬度和高度,圖片區塊現在會以正確的長寬比顯示。 +- 聽寫文字時,游標位置會停留在應該顯示的位置,不會再跳來跳去, 讓你安心使用聽寫功能。 From d910d4f274e68f228d40bcd94621fe30fd857a79 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Fri, 7 Jul 2023 16:10:43 +1000 Subject: [PATCH 52/72] Bump version number --- config/Version.internal.xcconfig | 2 +- config/Version.public.xcconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/Version.internal.xcconfig b/config/Version.internal.xcconfig index fa13abaf8b2c..8be7920a3779 100644 --- a/config/Version.internal.xcconfig +++ b/config/Version.internal.xcconfig @@ -1,4 +1,4 @@ VERSION_SHORT=22.7 // Internal long version example: VERSION_LONG=9.9.0.20180423 -VERSION_LONG=22.7.0.20230630 +VERSION_LONG=22.7.0.20230707 diff --git a/config/Version.public.xcconfig b/config/Version.public.xcconfig index 042eddd2a355..e4f36ae3cc00 100644 --- a/config/Version.public.xcconfig +++ b/config/Version.public.xcconfig @@ -1,4 +1,4 @@ VERSION_SHORT=22.7 // Public long version example: VERSION_LONG=9.9.0.0 -VERSION_LONG=22.7.0.1 +VERSION_LONG=22.7.0.2 From 2f0299a0d8efa0d0a7bfecfc4c052d7e3dcc71fc Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Fri, 7 Jul 2023 16:23:43 +1000 Subject: [PATCH 53/72] Make `setShowPhase2Dialog(_, for:)` call version with `forBlogURL` --- WordPress/Classes/Utility/Editor/GutenbergSettings.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPress/Classes/Utility/Editor/GutenbergSettings.swift b/WordPress/Classes/Utility/Editor/GutenbergSettings.swift index 228083e8eae9..603c2fee212b 100644 --- a/WordPress/Classes/Utility/Editor/GutenbergSettings.swift +++ b/WordPress/Classes/Utility/Editor/GutenbergSettings.swift @@ -104,7 +104,7 @@ class GutenbergSettings { } func setShowPhase2Dialog(_ showDialog: Bool, for blog: Blog) { - database.set(showDialog, forKey: Key.showPhase2Dialog(forBlogURL: blog.url)) + setShowPhase2Dialog(showDialog, forBlogURL: blog.url) } func setShowPhase2Dialog(_ showDialog: Bool, forBlogURL url: String?) { From 47e2ac827c6db943d1cadb9b8f8344370f04c631 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Fri, 7 Jul 2023 16:32:53 +1000 Subject: [PATCH 54/72] Update `GutenbergSettingsTests` after "breaking" source changes See dfc2007f199e01b3c2beb3f4fb7216f5ce2ac58f --- WordPress/WordPressTest/GutenbergSettingsTests.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WordPress/WordPressTest/GutenbergSettingsTests.swift b/WordPress/WordPressTest/GutenbergSettingsTests.swift index daf8e81d283e..c6ea339c3e3d 100644 --- a/WordPress/WordPressTest/GutenbergSettingsTests.swift +++ b/WordPress/WordPressTest/GutenbergSettingsTests.swift @@ -294,7 +294,7 @@ class GutenbergSettingsTests: CoreDataTestCase { blog.mobileEditor = editor if gutenbergEnabledFlag != nil { - let perSiteEnabledKey = GutenbergSettings.Key.enabledOnce(for: blog) + let perSiteEnabledKey = GutenbergSettings.Key.enabledOnce(forBlogURL: blog.url) database.set(true, forKey: perSiteEnabledKey) } } @@ -308,7 +308,7 @@ class GutenbergSettingsTests: CoreDataTestCase { settings.performGutenbergPhase2MigrationIfNeeded() - XCTAssertTrue(database.bool(forKey: GutenbergSettings.Key.showPhase2Dialog(for: blog))) + XCTAssertTrue(database.bool(forKey: GutenbergSettings.Key.showPhase2Dialog(forBlogURL: blog.url))) XCTAssertTrue(GutenbergRollout(database: database).isUserInRolloutGroup) } From 1e62b4868bed5f6d524e8251d6d29b3d4e737d4e Mon Sep 17 00:00:00 2001 From: jos <17252150+jostnes@users.noreply.github.com> Date: Fri, 7 Jul 2023 14:04:24 +0700 Subject: [PATCH 55/72] empty commit to rerun tests From e46e8afb312c686806f94634b5eb8dc1f57957f9 Mon Sep 17 00:00:00 2001 From: jos <17252150+jostnes@users.noreply.github.com> Date: Fri, 7 Jul 2023 14:59:52 +0700 Subject: [PATCH 56/72] empty commit to rerun tests From 9986f5a9329415e5a6bbf54e4c1d9dc3e3c7e2b5 Mon Sep 17 00:00:00 2001 From: kean Date: Fri, 7 Jul 2023 11:09:21 -0400 Subject: [PATCH 57/72] Show campaigns list from site menu --- .../BlazeCampaignsViewController.swift | 4 ++++ .../Blog Details/BlogDetailsViewController.m | 17 +++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Blaze Campaigns/BlazeCampaignsViewController.swift b/WordPress/Classes/ViewRelated/Blaze Campaigns/BlazeCampaignsViewController.swift index f442473c0d46..9fdc053487f0 100644 --- a/WordPress/Classes/ViewRelated/Blaze Campaigns/BlazeCampaignsViewController.swift +++ b/WordPress/Classes/ViewRelated/Blaze Campaigns/BlazeCampaignsViewController.swift @@ -42,6 +42,10 @@ final class BlazeCampaignsViewController: UIViewController, NoResultsViewHost, B super.init(nibName: nil, bundle: nil) } + @objc class func make(blog: Blog) -> BlazeCampaignsViewController { + BlazeCampaignsViewController(blog: blog) + } + required init?(coder: NSCoder) { // This VC is designed to be initialized programmatically. fatalError("init(coder:) has not been implemented") diff --git a/WordPress/Classes/ViewRelated/Blog/Blog Details/BlogDetailsViewController.m b/WordPress/Classes/ViewRelated/Blog/Blog Details/BlogDetailsViewController.m index 935cb8bbfded..1d7e979e9588 100644 --- a/WordPress/Classes/ViewRelated/Blog/Blog Details/BlogDetailsViewController.m +++ b/WordPress/Classes/ViewRelated/Blog/Blog Details/BlogDetailsViewController.m @@ -805,7 +805,7 @@ - (BlogDetailsRow *)blazeRow callback:^{ [weakSelf showBlaze]; }]; - blazeRow.showsSelectionState = NO; + blazeRow.showsSelectionState = [RemoteFeature enabled:RemoteFeatureFlagBlazeManageCampaigns]; return blazeRow; } @@ -1984,11 +1984,16 @@ - (void)showActivity - (void)showBlaze { [BlazeEventsTracker trackEntryPointTappedFor:BlazeSourceMenuItem]; - - [BlazeFlowCoordinator presentBlazeInViewController:self - source:BlazeSourceMenuItem - blog:self.blog - post:nil]; + + if ([RemoteFeature enabled:RemoteFeatureFlagBlazeManageCampaigns]) { + BlazeCampaignsViewController *controller = [BlazeCampaignsViewController makeWithBlog:self.blog]; + [self.presentationDelegate presentBlogDetailsViewController:controller]; + } else { + [BlazeFlowCoordinator presentBlazeInViewController:self + source:BlazeSourceMenuItem + blog:self.blog + post:nil]; + } } - (void)showScan From 2cff209997c9a87caf355df8d38daee3721a80ed Mon Sep 17 00:00:00 2001 From: kean Date: Fri, 7 Jul 2023 12:57:05 -0400 Subject: [PATCH 58/72] Remove unused code --- .../System/Floating Create Button/SheetActions.swift | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/WordPress/Classes/ViewRelated/System/Floating Create Button/SheetActions.swift b/WordPress/Classes/ViewRelated/System/Floating Create Button/SheetActions.swift index 6bbde69070af..ba7c16a2cd88 100644 --- a/WordPress/Classes/ViewRelated/System/Floating Create Button/SheetActions.swift +++ b/WordPress/Classes/ViewRelated/System/Floating Create Button/SheetActions.swift @@ -63,16 +63,4 @@ struct StoryAction: ActionSheetItem { handler() }) } - - static func newBadge(title: String) -> UIButton { - let badge = UIButton(type: .custom) - badge.translatesAutoresizingMaskIntoConstraints = false - badge.setTitle(title, for: .normal) - badge.titleLabel?.font = Constants.Badge.font - badge.contentEdgeInsets = Constants.Badge.insets - badge.layer.cornerRadius = Constants.Badge.cornerRadius - badge.isUserInteractionEnabled = false - badge.backgroundColor = Constants.Badge.backgroundColor - return badge - } } From 436ded4fc5f4189fe37949debc8f1b9301d2d240 Mon Sep 17 00:00:00 2001 From: kean Date: Fri, 7 Jul 2023 13:19:57 -0400 Subject: [PATCH 59/72] Fix UIButton deprecation warnings --- .../ViewRelated/What's New/Views/WhatIsNewView.swift | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/WordPress/Classes/ViewRelated/What's New/Views/WhatIsNewView.swift b/WordPress/Classes/ViewRelated/What's New/Views/WhatIsNewView.swift index 7308bffc3ca3..b5d757b6669f 100644 --- a/WordPress/Classes/ViewRelated/What's New/Views/WhatIsNewView.swift +++ b/WordPress/Classes/ViewRelated/What's New/Views/WhatIsNewView.swift @@ -61,9 +61,14 @@ class WhatIsNewView: UIView { private lazy var backButton: UIButton = { let button = UIButton(type: .custom) button.translatesAutoresizingMaskIntoConstraints = false - button.contentEdgeInsets = UIEdgeInsets(top: self.appearance.backButtonInset, left: self.appearance.backButtonInset, bottom: 0, right: 0) - button.setImage(UIImage.gridicon(.arrowLeft), for: .normal) + button.configuration = { + var configuration = UIButton.Configuration.plain() + configuration.contentInsets = NSDirectionalEdgeInsets(top: self.appearance.backButtonInset, leading: self.appearance.backButtonInset, bottom: 0, trailing: 0) + configuration.image = UIImage.gridicon(.arrowLeft) + return configuration + }() button.addTarget(self, action: #selector(backButtonTapped), for: .touchUpInside) + button.semanticContentAttribute = .forceLeftToRight button.accessibilityLabel = NSLocalizedString("Back", comment: "Dismiss view") button.tintColor = self.appearance.backButtonTintColor return button From 49957b098b3545260af9b6332235faeed0040093 Mon Sep 17 00:00:00 2001 From: kean Date: Fri, 7 Jul 2023 15:52:15 -0400 Subject: [PATCH 60/72] Fix skipping duplicate files warning --- WordPress/WordPress.xcodeproj/project.pbxproj | 2 -- 1 file changed, 2 deletions(-) diff --git a/WordPress/WordPress.xcodeproj/project.pbxproj b/WordPress/WordPress.xcodeproj/project.pbxproj index 1437352faa27..44334cd44c3f 100644 --- a/WordPress/WordPress.xcodeproj/project.pbxproj +++ b/WordPress/WordPress.xcodeproj/project.pbxproj @@ -803,7 +803,6 @@ 3F421DF524A3EC2B00CA9B9E /* Spotlightable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F421DF424A3EC2B00CA9B9E /* Spotlightable.swift */; }; 3F435220289B2B2B00CE19ED /* JetpackBrandingCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F43704328932F0100475B6E /* JetpackBrandingCoordinator.swift */; }; 3F435221289B2B5100CE19ED /* JetpackOverlayViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F43703E2893201400475B6E /* JetpackOverlayViewController.swift */; }; - 3F435222289B2B5A00CE19ED /* JetpackOverlayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F4370402893207C00475B6E /* JetpackOverlayView.swift */; }; 3F43602F23F31D48001DEE70 /* ScenePresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F43602E23F31D48001DEE70 /* ScenePresenter.swift */; }; 3F43603123F31E09001DEE70 /* MeScenePresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F43603023F31E09001DEE70 /* MeScenePresenter.swift */; }; 3F43603323F36515001DEE70 /* BlogListViewController+BlogDetailsFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F43603223F36515001DEE70 /* BlogListViewController+BlogDetailsFactory.swift */; }; @@ -25279,7 +25278,6 @@ 8313B9EF298B1ACD000AF26E /* SiteSettingsViewController+Blogging.swift in Sources */, 982DA9A8263B1E2F00E5743B /* CommentService+Likes.swift in Sources */, FABB24E12602FC2C00C8785C /* MediaLibraryPicker.swift in Sources */, - 3F435222289B2B5A00CE19ED /* JetpackOverlayView.swift in Sources */, 46F583D52624D0BC0010A723 /* Blog+BlockEditorSettings.swift in Sources */, FABB24E22602FC2C00C8785C /* SharingAccountViewController.swift in Sources */, FABB24E32602FC2C00C8785C /* TodayExtensionService.m in Sources */, From 769748545b2d84aa51debbcf1599e1277f771e3e Mon Sep 17 00:00:00 2001 From: Chris McGraw <2454408+wargcm@users.noreply.github.com> Date: Fri, 7 Jul 2023 16:43:01 -0400 Subject: [PATCH 61/72] Update show remaining shares view conditions --- .../Post/PostSettingsViewController+JetpackSocial.swift | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Post/PostSettingsViewController+JetpackSocial.swift b/WordPress/Classes/ViewRelated/Post/PostSettingsViewController+JetpackSocial.swift index e13679a84856..b05f336dc957 100644 --- a/WordPress/Classes/ViewRelated/Post/PostSettingsViewController+JetpackSocial.swift +++ b/WordPress/Classes/ViewRelated/Post/PostSettingsViewController+JetpackSocial.swift @@ -36,18 +36,14 @@ extension PostSettingsViewController { let isJetpackSocialEnabled = FeatureFlag.jetpackSocial.enabled let blogSupportsPublicize = apost.blog.supportsPublicize() let blogHasConnections = publicizeConnections.count > 0 - let isSocialSharingLimited = apost.blog.isSocialSharingLimited - let blogHasPublicizeInfo = apost.blog.publicizeInfo != nil + let blogHasSharingLimit = apost.blog.sharingLimit != nil return isJetpackSocialEnabled && blogSupportsPublicize && blogHasConnections - && isSocialSharingLimited - && blogHasPublicizeInfo + && blogHasSharingLimit } - - @objc func createRemainingSharesView() -> UIView { guard let sharingLimit = apost.blog.sharingLimit else { // This scenario *shouldn't* happen since we check that the publicize info is not nil before From 05d8f17ce6c2986f7dc09565a33d2e71e63b7550 Mon Sep 17 00:00:00 2001 From: Chris McGraw <2454408+wargcm@users.noreply.github.com> Date: Fri, 7 Jul 2023 18:04:53 -0400 Subject: [PATCH 62/72] Add new error for post settings sharing view --- .../Post/PostSettingsViewController+JetpackSocial.swift | 3 +++ .../Jetpack/Classes/Utility/JetpackSocialError.swift | 4 ++++ WordPress/WordPress.xcodeproj/project.pbxproj | 8 +++++++- 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 WordPress/Jetpack/Classes/Utility/JetpackSocialError.swift diff --git a/WordPress/Classes/ViewRelated/Post/PostSettingsViewController+JetpackSocial.swift b/WordPress/Classes/ViewRelated/Post/PostSettingsViewController+JetpackSocial.swift index b05f336dc957..f19daf336f67 100644 --- a/WordPress/Classes/ViewRelated/Post/PostSettingsViewController+JetpackSocial.swift +++ b/WordPress/Classes/ViewRelated/Post/PostSettingsViewController+JetpackSocial.swift @@ -1,4 +1,5 @@ import SwiftUI +import AutomatticTracks extension PostSettingsViewController { @@ -49,6 +50,8 @@ extension PostSettingsViewController { // This scenario *shouldn't* happen since we check that the publicize info is not nil before // showing this view assertionFailure("No sharing limit on the blog") + let error = JetpackSocialError.missingSharingLimit + CrashLogging.main.logError(error, userInfo: ["source": "post_settings"]) return UIView() } diff --git a/WordPress/Jetpack/Classes/Utility/JetpackSocialError.swift b/WordPress/Jetpack/Classes/Utility/JetpackSocialError.swift new file mode 100644 index 000000000000..a667b501f95d --- /dev/null +++ b/WordPress/Jetpack/Classes/Utility/JetpackSocialError.swift @@ -0,0 +1,4 @@ + +enum JetpackSocialError: Error { + case missingSharingLimit +} diff --git a/WordPress/WordPress.xcodeproj/project.pbxproj b/WordPress/WordPress.xcodeproj/project.pbxproj index 6cfebe3c1810..cdb313c3cabf 100644 --- a/WordPress/WordPress.xcodeproj/project.pbxproj +++ b/WordPress/WordPress.xcodeproj/project.pbxproj @@ -2104,6 +2104,8 @@ 83C972E1281C45AB0049E1FE /* Post+BloggingPrompts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83C972DF281C45AB0049E1FE /* Post+BloggingPrompts.swift */; }; 83DC5C462A4B769000DAA422 /* JetpackSocialSettingsRemainingSharesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83DC5C452A4B769000DAA422 /* JetpackSocialSettingsRemainingSharesView.swift */; }; 83DC5C472A4B769000DAA422 /* JetpackSocialSettingsRemainingSharesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83DC5C452A4B769000DAA422 /* JetpackSocialSettingsRemainingSharesView.swift */; }; + 83E1E5592A58B5C2000B576F /* JetpackSocialError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83E1E5582A58B5C2000B576F /* JetpackSocialError.swift */; }; + 83E1E55A2A58B5C2000B576F /* JetpackSocialError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83E1E5582A58B5C2000B576F /* JetpackSocialError.swift */; }; 83EF3D7B2937D703000AF9BF /* SharedDataIssueSolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = FED65D78293511E4008071BF /* SharedDataIssueSolver.swift */; }; 83EF3D7F2937F08C000AF9BF /* SharedDataIssueSolverTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83EF3D7C2937E969000AF9BF /* SharedDataIssueSolverTests.swift */; }; 83F3E26011275E07004CD686 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83F3E25F11275E07004CD686 /* MapKit.framework */; }; @@ -7473,6 +7475,7 @@ 83B1D036282C62620061D911 /* BloggingPromptsAttribution.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BloggingPromptsAttribution.swift; sourceTree = ""; }; 83C972DF281C45AB0049E1FE /* Post+BloggingPrompts.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Post+BloggingPrompts.swift"; sourceTree = ""; }; 83DC5C452A4B769000DAA422 /* JetpackSocialSettingsRemainingSharesView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JetpackSocialSettingsRemainingSharesView.swift; sourceTree = ""; }; + 83E1E5582A58B5C2000B576F /* JetpackSocialError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JetpackSocialError.swift; sourceTree = ""; }; 83EF3D7C2937E969000AF9BF /* SharedDataIssueSolverTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SharedDataIssueSolverTests.swift; sourceTree = ""; }; 83F3E25F11275E07004CD686 /* MapKit.framework */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; 83F3E2D211276371004CD686 /* CoreLocation.framework */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; @@ -13378,9 +13381,10 @@ 8332DD2229259ABA00802F7D /* Utility */ = { isa = PBXGroup; children = ( + F4DD58312A095210009A772D /* DataMigrationError.swift */, 8332DD2329259AE300802F7D /* DataMigrator.swift */, + 83E1E5582A58B5C2000B576F /* JetpackSocialError.swift */, FED65D78293511E4008071BF /* SharedDataIssueSolver.swift */, - F4DD58312A095210009A772D /* DataMigrationError.swift */, ); path = Utility; sourceTree = ""; @@ -22472,6 +22476,7 @@ D80BC7A22074739400614A59 /* MediaLibraryStrings.swift in Sources */, 9A09F915230C3E9700F42AB7 /* StoreFetchingStatus.swift in Sources */, F582060223A85495005159A9 /* SiteDateFormatters.swift in Sources */, + 83E1E5592A58B5C2000B576F /* JetpackSocialError.swift in Sources */, F504D44825D717F600A2764C /* PostEditor.swift in Sources */, 837B49D7283C2AE80061A657 /* BloggingPromptSettings+CoreDataClass.swift in Sources */, 98BC522A27F6259700D6E8C2 /* BloggingPromptsFeatureDescriptionView.swift in Sources */, @@ -23946,6 +23951,7 @@ 011F52BE2A15327700B04114 /* BaseDashboardDomainsCardCell.swift in Sources */, FABB211B2602FC2C00C8785C /* CredentialsService.swift in Sources */, 3F5AAC242877791900AEF5DD /* JetpackButton.swift in Sources */, + 83E1E55A2A58B5C2000B576F /* JetpackSocialError.swift in Sources */, FABB211C2602FC2C00C8785C /* EncryptedLogTableViewController.swift in Sources */, FABB211D2602FC2C00C8785C /* ActivityDateFormatting.swift in Sources */, FABB211E2602FC2C00C8785C /* UIView+Subviews.m in Sources */, From d3fe93a9677e76e71f61f926c3e98eb3e5e21a65 Mon Sep 17 00:00:00 2001 From: David Christiandy <1299411+dvdchr@users.noreply.github.com> Date: Sun, 9 Jul 2023 00:51:25 +0700 Subject: [PATCH 63/72] Refactor Jetpack Social enums to be under PublicizeService --- .../Classes/Models/PublicizeService.swift | 26 +++++++++++++++++++ .../Blog/WPStyleGuide+Sharing.swift | 1 + .../JetpackSocialNoConnectionView.swift | 13 +--------- 3 files changed, 28 insertions(+), 12 deletions(-) diff --git a/WordPress/Classes/Models/PublicizeService.swift b/WordPress/Classes/Models/PublicizeService.swift index 5dc3a35a6f6e..5f4fc89baf39 100644 --- a/WordPress/Classes/Models/PublicizeService.swift +++ b/WordPress/Classes/Models/PublicizeService.swift @@ -24,3 +24,29 @@ open class PublicizeService: NSManagedObject { status == Self.defaultStatus } } + +// MARK: - Convenience Methods + +extension PublicizeService { + + /// A convenient value-type representation for the destination sharing service. + enum ServiceName: String { + case facebook + case twitter + case tumblr + case linkedin + case instagram = "instagram-business" + case mastodon + case unknown + + /// Returns an image of the social network's icon. + /// If the icon is not available locally, + var iconImage: UIImage { + WPStyleGuide.socialIcon(for: rawValue as NSString) + } + } + + var name: ServiceName { + .init(rawValue: serviceID) ?? .unknown + } +} diff --git a/WordPress/Classes/ViewRelated/Blog/WPStyleGuide+Sharing.swift b/WordPress/Classes/ViewRelated/Blog/WPStyleGuide+Sharing.swift index b5a780414504..17027d9e3a25 100644 --- a/WordPress/Classes/ViewRelated/Blog/WPStyleGuide+Sharing.swift +++ b/WordPress/Classes/ViewRelated/Blog/WPStyleGuide+Sharing.swift @@ -106,6 +106,7 @@ extension WPStyleGuide { } } + // TODO: Remove this in favor of `PublicizeService.ServiceName` once `jetpackSocial` flag is removed. enum SharingServiceNames: String { case Facebook = "facebook" case Twitter = "twitter" diff --git a/WordPress/Classes/ViewRelated/Jetpack/Social/JetpackSocialNoConnectionView.swift b/WordPress/Classes/ViewRelated/Jetpack/Social/JetpackSocialNoConnectionView.swift index b604d0804cf0..325342326186 100644 --- a/WordPress/Classes/ViewRelated/Jetpack/Social/JetpackSocialNoConnectionView.swift +++ b/WordPress/Classes/ViewRelated/Jetpack/Social/JetpackSocialNoConnectionView.swift @@ -79,25 +79,14 @@ class JetpackSocialNoConnectionViewModel: ObservableObject { updateIcons(services) } - enum JetpackSocialService: String { - case facebook - case twitter - case tumblr - case linkedin - case instagram = "instagram-business" - case mastodon - case unknown - } - private func updateIcons(_ services: [PublicizeService]) { var icons: [UIImage] = [] var downloadTasks: [(url: URL, index: Int)] = [] for (index, service) in services.enumerated() { - let serviceType = JetpackSocialService(rawValue: service.serviceID) ?? .unknown let icon = WPStyleGuide.socialIcon(for: service.serviceID as NSString) icons.append(icon) - if serviceType == .unknown { + if service.name == .unknown { guard let iconUrl = URL(string: service.icon) else { continue } From 7bd15647c4b1f69dafd64d4c3400c9587cd85b05 Mon Sep 17 00:00:00 2001 From: David Christiandy <1299411+dvdchr@users.noreply.github.com> Date: Sun, 9 Jul 2023 15:26:23 +0700 Subject: [PATCH 64/72] Remove unused docs, update var name --- WordPress/Classes/Models/PublicizeService.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/WordPress/Classes/Models/PublicizeService.swift b/WordPress/Classes/Models/PublicizeService.swift index 5f4fc89baf39..957801209b7d 100644 --- a/WordPress/Classes/Models/PublicizeService.swift +++ b/WordPress/Classes/Models/PublicizeService.swift @@ -39,9 +39,8 @@ extension PublicizeService { case mastodon case unknown - /// Returns an image of the social network's icon. - /// If the icon is not available locally, - var iconImage: UIImage { + /// Returns the local image for the icon representing the social network. + var localIconImage: UIImage { WPStyleGuide.socialIcon(for: rawValue as NSString) } } From 66be8921cff24041a791bbf66ca7fd376e149046 Mon Sep 17 00:00:00 2001 From: David Christiandy <1299411+dvdchr@users.noreply.github.com> Date: Sun, 9 Jul 2023 23:41:32 +0700 Subject: [PATCH 65/72] Add configuration methods for social cell in prepublishing VC --- .../Models/PublicizeService+Lookup.swift | 14 +++++ ...blishingViewController+JetpackSocial.swift | 23 +++++++ .../Post/PrepublishingViewController.swift | 60 ++++++++++++------- WordPress/WordPress.xcodeproj/project.pbxproj | 6 ++ 4 files changed, 83 insertions(+), 20 deletions(-) create mode 100644 WordPress/Classes/ViewRelated/Post/PrepublishingViewController+JetpackSocial.swift diff --git a/WordPress/Classes/Models/PublicizeService+Lookup.swift b/WordPress/Classes/Models/PublicizeService+Lookup.swift index 09884c044ecc..59f09b3de4a0 100644 --- a/WordPress/Classes/Models/PublicizeService+Lookup.swift +++ b/WordPress/Classes/Models/PublicizeService+Lookup.swift @@ -27,4 +27,18 @@ extension PublicizeService { request.sortDescriptors = [sortDescriptor] return try context.fetch(request) } + + /// Returns an array of all cached `PublicizeService` objects that are supported by Jetpack Social. + /// + /// Note that services without a `status` field from the remote will be marked as supported by default. + /// + /// - Parameter context: The managed object context. + /// - Returns: An array of `PublicizeService`. The array is empty if no objects are cached. + static func allSupportedServices(in context: NSManagedObjectContext) throws -> [PublicizeService] { + let request = NSFetchRequest(entityName: PublicizeService.classNameWithoutNamespaces()) + let sortDescriptor = NSSortDescriptor(key: "order", ascending: true) + request.predicate = NSPredicate(format: "status == %@", Self.defaultStatus) + request.sortDescriptors = [sortDescriptor] + return try context.fetch(request) + } } diff --git a/WordPress/Classes/ViewRelated/Post/PrepublishingViewController+JetpackSocial.swift b/WordPress/Classes/ViewRelated/Post/PrepublishingViewController+JetpackSocial.swift new file mode 100644 index 000000000000..eb2d710dade2 --- /dev/null +++ b/WordPress/Classes/ViewRelated/Post/PrepublishingViewController+JetpackSocial.swift @@ -0,0 +1,23 @@ +extension PrepublishingViewController { + + /// Determines whether the account and the post's blog is eligible to see auto-sharing options. + var isEligibleForAutoSharing: Bool { + let postObjectID = post.objectID + let blogSupportsPublicize = coreDataStack.performQuery { context in + let post = (try? context.existingObject(with: postObjectID)) as? Post + return post?.blog.supportsPublicize() ?? false + } + + return blogSupportsPublicize && FeatureFlag.jetpackSocial.enabled + } + + func configureSocialCell(_ cell: UITableViewCell) { + // TODO: + // - Show the PrepublishingAutoSharingView. + // - Show the NoConnectionView if user has 0 connections. + // - Properly configure the view models. + let autoSharingView = UIView() + cell.contentView.addSubview(autoSharingView) + cell.pinSubviewToAllEdges(autoSharingView) + } +} diff --git a/WordPress/Classes/ViewRelated/Post/PrepublishingViewController.swift b/WordPress/Classes/ViewRelated/Post/PrepublishingViewController.swift index 60230af09e7a..49e25b58549b 100644 --- a/WordPress/Classes/ViewRelated/Post/PrepublishingViewController.swift +++ b/WordPress/Classes/ViewRelated/Post/PrepublishingViewController.swift @@ -11,15 +11,7 @@ private struct PrepublishingOption { private enum PrepublishingCellType { case value case textField - - var cellType: UITableViewCell.Type { - switch self { - case .value: - return WPTableViewCell.self - case .textField: - return WPTextFieldTableViewCell.self - } - } + case customContainer } enum PrepublishingIdentifier { @@ -28,10 +20,12 @@ enum PrepublishingIdentifier { case visibility case tags case categories + case autoSharing } class PrepublishingViewController: UITableViewController { let post: Post + let coreDataStack: CoreDataStack private lazy var publishSettingsViewModel: PublishSettingsViewModel = { return PublishSettingsViewModel(post: post) @@ -48,7 +42,23 @@ class PrepublishingViewController: UITableViewController { private let completion: (CompletionResult) -> () - private let options: [PrepublishingOption] + private let identifiers: [PrepublishingIdentifier] + + private lazy var options: [PrepublishingOption] = { + return identifiers.compactMap { identifier in + switch identifier { + case .autoSharing: + // skip the social cell if the post's blog is not eligible for auto-sharing. + guard isEligibleForAutoSharing else { + return nil + } + break + default: + break + } + return .init(identifier: identifier) + } + }() private var didTapPublish = false @@ -64,12 +74,14 @@ class PrepublishingViewController: UITableViewController { /// Determines whether the text has been first responder already. If it has, don't force it back on the user unless it's been selected by them. private var hasSelectedText: Bool = false - init(post: Post, identifiers: [PrepublishingIdentifier], completion: @escaping (CompletionResult) -> ()) { + init(post: Post, + identifiers: [PrepublishingIdentifier], + completion: @escaping (CompletionResult) -> (), + coreDataStack: CoreDataStack = ContextManager.shared) { self.post = post - self.options = identifiers.map { identifier in - return PrepublishingOption(identifier: identifier) - } + self.identifiers = identifiers self.completion = completion + self.coreDataStack = coreDataStack super.init(nibName: nil, bundle: nil) } @@ -142,10 +154,9 @@ class PrepublishingViewController: UITableViewController { } override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { - // Forced unwrap copied from this guide by Apple: - // https://developer.apple.com/documentation/uikit/views_and_controls/table_views/adding_headers_and_footers_to_table_sections - // - let header = tableView.dequeueReusableHeaderFooterView(withIdentifier: Constants.headerReuseIdentifier) as! PrepublishingHeaderView + guard let header = tableView.dequeueReusableHeaderFooterView(withIdentifier: Constants.headerReuseIdentifier) as? PrepublishingHeaderView else { + return nil + } header.delegate = self header.configure(post.blog) @@ -179,6 +190,8 @@ class PrepublishingViewController: UITableViewController { case .value: cell.accessoryType = .disclosureIndicator cell.textLabel?.text = option.title + default: + break } switch option.id { @@ -194,6 +207,8 @@ class PrepublishingViewController: UITableViewController { configureScheduleCell(cell) case .categories: configureCategoriesCell(cell) + case .autoSharing: + configureSocialCell(cell) } return cell @@ -211,13 +226,13 @@ class PrepublishingViewController: UITableViewController { return WPTableViewCell.init(style: .value1, reuseIdentifier: Constants.reuseIdentifier) } return cell + case .customContainer: + return WPTableViewCell() } } override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { switch options[indexPath.row].id { - case .title: - break case .tags: didTapTagCell() case .visibility: @@ -226,6 +241,8 @@ class PrepublishingViewController: UITableViewController { didTapSchedule(indexPath) case .categories: didTapCategoriesCell() + default: + break } } @@ -523,6 +540,9 @@ private extension PrepublishingOption { self.init(id: .visibility, title: NSLocalizedString("Visibility", comment: "Label for Visibility"), type: .value) case .tags: self.init(id: .tags, title: NSLocalizedString("Tags", comment: "Label for Tags"), type: .value) + case .autoSharing: + // TODO: Which cell to show? + self.init(id: .autoSharing, title: "Jetpack Social", type: .customContainer) } } } diff --git a/WordPress/WordPress.xcodeproj/project.pbxproj b/WordPress/WordPress.xcodeproj/project.pbxproj index 1437352faa27..127ea843aba9 100644 --- a/WordPress/WordPress.xcodeproj/project.pbxproj +++ b/WordPress/WordPress.xcodeproj/project.pbxproj @@ -5609,6 +5609,8 @@ FED77259298BC5B300C2346E /* PluginJetpackProxyService.swift in Sources */ = {isa = PBXBuildFile; fileRef = FED77257298BC5B300C2346E /* PluginJetpackProxyService.swift */; }; FEDA1AD8269D475D0038EC98 /* ListTableViewCell+Comments.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEDA1AD7269D475D0038EC98 /* ListTableViewCell+Comments.swift */; }; FEDA1AD9269D475D0038EC98 /* ListTableViewCell+Comments.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEDA1AD7269D475D0038EC98 /* ListTableViewCell+Comments.swift */; }; + FEDA8D9C2A5AA7050081314F /* PrepublishingViewController+JetpackSocial.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEDA8D9B2A5AA7050081314F /* PrepublishingViewController+JetpackSocial.swift */; }; + FEDA8D9D2A5AA7050081314F /* PrepublishingViewController+JetpackSocial.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEDA8D9B2A5AA7050081314F /* PrepublishingViewController+JetpackSocial.swift */; }; FEDDD46F26A03DE900F8942B /* ListTableViewCell+Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEDDD46E26A03DE900F8942B /* ListTableViewCell+Notifications.swift */; }; FEDDD47026A03DE900F8942B /* ListTableViewCell+Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEDDD46E26A03DE900F8942B /* ListTableViewCell+Notifications.swift */; }; FEE48EFC2A4C8312008A48E0 /* Blog+JetpackSocial.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEE48EFB2A4C8312008A48E0 /* Blog+JetpackSocial.swift */; }; @@ -9408,6 +9410,7 @@ FED65D78293511E4008071BF /* SharedDataIssueSolver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SharedDataIssueSolver.swift; sourceTree = ""; }; FED77257298BC5B300C2346E /* PluginJetpackProxyService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PluginJetpackProxyService.swift; sourceTree = ""; }; FEDA1AD7269D475D0038EC98 /* ListTableViewCell+Comments.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ListTableViewCell+Comments.swift"; sourceTree = ""; }; + FEDA8D9B2A5AA7050081314F /* PrepublishingViewController+JetpackSocial.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PrepublishingViewController+JetpackSocial.swift"; sourceTree = ""; }; FEDDD46E26A03DE900F8942B /* ListTableViewCell+Notifications.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ListTableViewCell+Notifications.swift"; sourceTree = ""; }; FEE48EFB2A4C8312008A48E0 /* Blog+JetpackSocial.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Blog+JetpackSocial.swift"; sourceTree = ""; }; FEE48EFE2A4C9855008A48E0 /* Blog+PublicizeTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Blog+PublicizeTests.swift"; sourceTree = ""; }; @@ -14803,6 +14806,7 @@ 593F26601CAB00CA00F14073 /* PostSharingController.swift */, E155EC711E9B7DCE009D7F63 /* PostTagPickerViewController.swift */, 8BAD272B241FEF3300E9D105 /* PrepublishingViewController.swift */, + FEDA8D9B2A5AA7050081314F /* PrepublishingViewController+JetpackSocial.swift */, 5DB3BA0318D0E7B600F3F3E9 /* WPPickerView.h */, 5DB3BA0418D0E7B600F3F3E9 /* WPPickerView.m */, C9F1D4B92706EEEB00BDF917 /* HomepageEditorNavigationBarManager.swift */, @@ -22076,6 +22080,7 @@ F5E032E82408D537003AF350 /* BottomSheetPresentationController.swift in Sources */, FA98A24D2832A5E9003B9233 /* NewQuickStartChecklistView.swift in Sources */, FA98B61929A3BF050071AAE8 /* DashboardBlazePromoCardView.swift in Sources */, + FEDA8D9C2A5AA7050081314F /* PrepublishingViewController+JetpackSocial.swift in Sources */, AB758D9E25EFDF9C00961C0B /* LikesListController.swift in Sources */, E1FD45E01C030B3800750F4C /* AccountSettingsService.swift in Sources */, 8BDC4C39249BA5CA00DE0A2D /* ReaderCSS.swift in Sources */, @@ -25225,6 +25230,7 @@ F4D9188729D78C9100974A71 /* BlogDetailsViewController+Strings.swift in Sources */, FABB24B82602FC2C00C8785C /* DynamicHeightCollectionView.swift in Sources */, FABB24B92602FC2C00C8785C /* RegisterDomainDetailsViewModel+RowList.swift in Sources */, + FEDA8D9D2A5AA7050081314F /* PrepublishingViewController+JetpackSocial.swift in Sources */, FABB24BA2602FC2C00C8785C /* TenorGIF.swift in Sources */, FABB24BB2602FC2C00C8785C /* ThemeBrowserViewController.swift in Sources */, FA73D7ED27987E4500DF24B3 /* SitePickerViewController+QuickStart.swift in Sources */, From a2aba99c78b80f52492d3223708f77b1ab8ef9e4 Mon Sep 17 00:00:00 2001 From: David Christiandy <1299411+dvdchr@users.noreply.github.com> Date: Sun, 9 Jul 2023 23:52:26 +0700 Subject: [PATCH 66/72] Create initial SwiftUI view for prepublishing social cell --- .../Post/PrepublishingAutoSharingView.swift | 37 +++++++++++++++++++ ...blishingViewController+JetpackSocial.swift | 2 +- WordPress/WordPress.xcodeproj/project.pbxproj | 6 +++ 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 WordPress/Classes/ViewRelated/Post/PrepublishingAutoSharingView.swift diff --git a/WordPress/Classes/ViewRelated/Post/PrepublishingAutoSharingView.swift b/WordPress/Classes/ViewRelated/Post/PrepublishingAutoSharingView.swift new file mode 100644 index 000000000000..d7860cfb13a9 --- /dev/null +++ b/WordPress/Classes/ViewRelated/Post/PrepublishingAutoSharingView.swift @@ -0,0 +1,37 @@ +import SwiftUI + +struct PrepublishingAutoSharingView: View { + + var body: some View { + HStack { + textStack + Spacer() + iconTrain + } + } + + var textStack: some View { + VStack { + Text("Sharing to @sporadicthoughts") + .font(.body) + .foregroundColor(Color(.label)) + Text("27/30 social shares remaining") + .font(.subheadline) + .foregroundColor(Color(.secondaryLabel)) + } + } + + var iconTrain: some View { + HStack { + if let uiImage = UIImage(named: "icon-tumblr") { + Image(uiImage: uiImage) + .resizable() + .frame(width: 32.0, height: 32.0) + .background(Color(UIColor.listForeground)) + .clipShape(Circle()) + .overlay(Circle().stroke(Color(UIColor.listForeground), lineWidth: 2.0)) + } + } + } + +} diff --git a/WordPress/Classes/ViewRelated/Post/PrepublishingViewController+JetpackSocial.swift b/WordPress/Classes/ViewRelated/Post/PrepublishingViewController+JetpackSocial.swift index eb2d710dade2..c203c35600a3 100644 --- a/WordPress/Classes/ViewRelated/Post/PrepublishingViewController+JetpackSocial.swift +++ b/WordPress/Classes/ViewRelated/Post/PrepublishingViewController+JetpackSocial.swift @@ -16,7 +16,7 @@ extension PrepublishingViewController { // - Show the PrepublishingAutoSharingView. // - Show the NoConnectionView if user has 0 connections. // - Properly configure the view models. - let autoSharingView = UIView() + let autoSharingView = UIView.embedSwiftUIView(PrepublishingAutoSharingView()) cell.contentView.addSubview(autoSharingView) cell.pinSubviewToAllEdges(autoSharingView) } diff --git a/WordPress/WordPress.xcodeproj/project.pbxproj b/WordPress/WordPress.xcodeproj/project.pbxproj index 127ea843aba9..c034b14cf364 100644 --- a/WordPress/WordPress.xcodeproj/project.pbxproj +++ b/WordPress/WordPress.xcodeproj/project.pbxproj @@ -5611,6 +5611,8 @@ FEDA1AD9269D475D0038EC98 /* ListTableViewCell+Comments.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEDA1AD7269D475D0038EC98 /* ListTableViewCell+Comments.swift */; }; FEDA8D9C2A5AA7050081314F /* PrepublishingViewController+JetpackSocial.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEDA8D9B2A5AA7050081314F /* PrepublishingViewController+JetpackSocial.swift */; }; FEDA8D9D2A5AA7050081314F /* PrepublishingViewController+JetpackSocial.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEDA8D9B2A5AA7050081314F /* PrepublishingViewController+JetpackSocial.swift */; }; + FEDA8D9F2A5B1B1B0081314F /* PrepublishingAutoSharingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEDA8D9E2A5B1B1B0081314F /* PrepublishingAutoSharingView.swift */; }; + FEDA8DA02A5B1B1B0081314F /* PrepublishingAutoSharingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEDA8D9E2A5B1B1B0081314F /* PrepublishingAutoSharingView.swift */; }; FEDDD46F26A03DE900F8942B /* ListTableViewCell+Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEDDD46E26A03DE900F8942B /* ListTableViewCell+Notifications.swift */; }; FEDDD47026A03DE900F8942B /* ListTableViewCell+Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEDDD46E26A03DE900F8942B /* ListTableViewCell+Notifications.swift */; }; FEE48EFC2A4C8312008A48E0 /* Blog+JetpackSocial.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEE48EFB2A4C8312008A48E0 /* Blog+JetpackSocial.swift */; }; @@ -9411,6 +9413,7 @@ FED77257298BC5B300C2346E /* PluginJetpackProxyService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PluginJetpackProxyService.swift; sourceTree = ""; }; FEDA1AD7269D475D0038EC98 /* ListTableViewCell+Comments.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ListTableViewCell+Comments.swift"; sourceTree = ""; }; FEDA8D9B2A5AA7050081314F /* PrepublishingViewController+JetpackSocial.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PrepublishingViewController+JetpackSocial.swift"; sourceTree = ""; }; + FEDA8D9E2A5B1B1B0081314F /* PrepublishingAutoSharingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrepublishingAutoSharingView.swift; sourceTree = ""; }; FEDDD46E26A03DE900F8942B /* ListTableViewCell+Notifications.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ListTableViewCell+Notifications.swift"; sourceTree = ""; }; FEE48EFB2A4C8312008A48E0 /* Blog+JetpackSocial.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Blog+JetpackSocial.swift"; sourceTree = ""; }; FEE48EFE2A4C9855008A48E0 /* Blog+PublicizeTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Blog+PublicizeTests.swift"; sourceTree = ""; }; @@ -14807,6 +14810,7 @@ E155EC711E9B7DCE009D7F63 /* PostTagPickerViewController.swift */, 8BAD272B241FEF3300E9D105 /* PrepublishingViewController.swift */, FEDA8D9B2A5AA7050081314F /* PrepublishingViewController+JetpackSocial.swift */, + FEDA8D9E2A5B1B1B0081314F /* PrepublishingAutoSharingView.swift */, 5DB3BA0318D0E7B600F3F3E9 /* WPPickerView.h */, 5DB3BA0418D0E7B600F3F3E9 /* WPPickerView.m */, C9F1D4B92706EEEB00BDF917 /* HomepageEditorNavigationBarManager.swift */, @@ -20989,6 +20993,7 @@ C395FB262821FE7B00AE7C11 /* RemoteSiteDesign+Thumbnail.swift in Sources */, 9A73B7152362FBAE004624A8 /* SiteStatsViewModel+AsyncBlock.swift in Sources */, 74AF4D7C1FE417D200E3EBFE /* PostUploadOperation.swift in Sources */, + FEDA8D9F2A5B1B1B0081314F /* PrepublishingAutoSharingView.swift in Sources */, 0857BB40299275760011CBD1 /* JetpackDefaultOverlayCoordinator.swift in Sources */, 37022D931981C19000F322B7 /* VerticallyStackedButton.m in Sources */, 59DCA5211CC68AF3000F245F /* PageListViewController.swift in Sources */, @@ -25101,6 +25106,7 @@ FABB24602602FC2C00C8785C /* BlogDetailsViewController+DomainCredit.swift in Sources */, 17C1D67D2670E3DC006C8970 /* SiteIconPickerView.swift in Sources */, 8BAC9D9F27BAB97E008EA44C /* BlogDashboardRemoteEntity.swift in Sources */, + FEDA8DA02A5B1B1B0081314F /* PrepublishingAutoSharingView.swift in Sources */, 80EF9287280D272E0064A971 /* DashboardPostsSyncManager.swift in Sources */, FABB24612602FC2C00C8785C /* KeyringAccountHelper.swift in Sources */, FABB24622602FC2C00C8785C /* ManagedAccountSettings+CoreDataProperties.swift in Sources */, From 9df56a8ccb2719fb70dfa2607b5f882cf196bc28 Mon Sep 17 00:00:00 2001 From: David Christiandy <1299411+dvdchr@users.noreply.github.com> Date: Sun, 9 Jul 2023 23:52:49 +0700 Subject: [PATCH 67/72] Modify entry points to allow displaying autosharing cell --- WordPress/Classes/Services/Stories/StoryEditor.swift | 4 ++++ WordPress/Classes/ViewRelated/Post/PostEditor.swift | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/WordPress/Classes/Services/Stories/StoryEditor.swift b/WordPress/Classes/Services/Stories/StoryEditor.swift index fbc73a01cc0e..6df1047eaf86 100644 --- a/WordPress/Classes/Services/Stories/StoryEditor.swift +++ b/WordPress/Classes/Services/Stories/StoryEditor.swift @@ -222,6 +222,10 @@ class StoryEditor: CameraController { extension StoryEditor: PublishingEditor { var prepublishingIdentifiers: [PrepublishingIdentifier] { + if FeatureFlag.jetpackSocial.enabled { + return [.title, .visibility, .schedule, .tags, .categories, .autoSharing] + } + return [.title, .visibility, .schedule, .tags, .categories] } diff --git a/WordPress/Classes/ViewRelated/Post/PostEditor.swift b/WordPress/Classes/ViewRelated/Post/PostEditor.swift index 7badef9fb5b9..6e47e13a7490 100644 --- a/WordPress/Classes/ViewRelated/Post/PostEditor.swift +++ b/WordPress/Classes/ViewRelated/Post/PostEditor.swift @@ -145,6 +145,10 @@ extension PostEditor { } var prepublishingIdentifiers: [PrepublishingIdentifier] { + if FeatureFlag.jetpackSocial.enabled { + return [.visibility, .schedule, .tags, .categories, .autoSharing] + } + return [.visibility, .schedule, .tags, .categories] } } From bbbaeaaf62a387c19a4bfcf58acd000574ca1321 Mon Sep 17 00:00:00 2001 From: David Christiandy <1299411+dvdchr@users.noreply.github.com> Date: Mon, 10 Jul 2023 00:38:10 +0700 Subject: [PATCH 68/72] Fix layout, add localized strings --- .../Post/PrepublishingAutoSharingView.swift | 41 +++++++++++++++++-- ...blishingViewController+JetpackSocial.swift | 13 ++++-- 2 files changed, 48 insertions(+), 6 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Post/PrepublishingAutoSharingView.swift b/WordPress/Classes/ViewRelated/Post/PrepublishingAutoSharingView.swift index d7860cfb13a9..b66d92eeb224 100644 --- a/WordPress/Classes/ViewRelated/Post/PrepublishingAutoSharingView.swift +++ b/WordPress/Classes/ViewRelated/Post/PrepublishingAutoSharingView.swift @@ -2,6 +2,8 @@ import SwiftUI struct PrepublishingAutoSharingView: View { + // TODO: view model. + var body: some View { HStack { textStack @@ -11,16 +13,17 @@ struct PrepublishingAutoSharingView: View { } var textStack: some View { - VStack { - Text("Sharing to @sporadicthoughts") + VStack(alignment: .leading) { + Text(String(format: Strings.primaryLabelActiveConnectionsFormat, 3)) .font(.body) .foregroundColor(Color(.label)) - Text("27/30 social shares remaining") + Text(String(format: Strings.remainingSharesTextFormat, 27, 30)) .font(.subheadline) .foregroundColor(Color(.secondaryLabel)) } } + // TODO: This will be implemented separately. var iconTrain: some View { HStack { if let uiImage = UIImage(named: "icon-tumblr") { @@ -33,5 +36,37 @@ struct PrepublishingAutoSharingView: View { } } } +} + +// MARK: - Helpers + +private extension PrepublishingAutoSharingView { + + enum Strings { + static let primaryLabelActiveConnectionsFormat = NSLocalizedString( + "prepublishing.social.text.activeConnections", + value: "Sharing to %1$d accounts", + comment: """ + The primary label for the auto-sharing row on the pre-publishing sheet. + Indicates the number of social accounts that will be auto-sharing the blog post. + %1$d is a placeholder for the number of social network accounts that will be auto-shared. + Example: Sharing to 3 accounts + """ + ) + + // TODO: More text variations. + + static let remainingSharesTextFormat = NSLocalizedString( + "prepublishing.social.remainingShares", + value: "%1$d/%2$d social shares remaining", + comment: """ + A subtext that's shown below the primary label in the auto-sharing row on the pre-publishing sheet. + Informs the remaining limit for post auto-sharing. + %1$d is a placeholder for the remaining shares. + %2$d is a placeholder for the maximum shares allowed for the user's blog. + Example: 27/30 social shares remaining + """ + ) + } } diff --git a/WordPress/Classes/ViewRelated/Post/PrepublishingViewController+JetpackSocial.swift b/WordPress/Classes/ViewRelated/Post/PrepublishingViewController+JetpackSocial.swift index c203c35600a3..aaabc472a3fe 100644 --- a/WordPress/Classes/ViewRelated/Post/PrepublishingViewController+JetpackSocial.swift +++ b/WordPress/Classes/ViewRelated/Post/PrepublishingViewController+JetpackSocial.swift @@ -13,11 +13,18 @@ extension PrepublishingViewController { func configureSocialCell(_ cell: UITableViewCell) { // TODO: - // - Show the PrepublishingAutoSharingView. // - Show the NoConnectionView if user has 0 connections. - // - Properly configure the view models. + // - Properly create and configure the view models. let autoSharingView = UIView.embedSwiftUIView(PrepublishingAutoSharingView()) cell.contentView.addSubview(autoSharingView) - cell.pinSubviewToAllEdges(autoSharingView) + + // Pin constraints to the cell's layoutMarginsGuide so that the content is properly aligned. + NSLayoutConstraint.activate([ + autoSharingView.leadingAnchor.constraint(equalTo: cell.contentView.layoutMarginsGuide.leadingAnchor), + autoSharingView.topAnchor.constraint(equalTo: cell.contentView.layoutMarginsGuide.topAnchor), + autoSharingView.bottomAnchor.constraint(equalTo: cell.contentView.layoutMarginsGuide.bottomAnchor), + autoSharingView.trailingAnchor.constraint(equalTo: cell.contentView.layoutMarginsGuide.trailingAnchor) + ]) + cell.accessoryType = .disclosureIndicator } } From 13f67d40eb95790530e5a2f5fd206cc8b79bb0f1 Mon Sep 17 00:00:00 2001 From: jos <17252150+jostnes@users.noreply.github.com> Date: Mon, 10 Jul 2023 16:15:13 +0800 Subject: [PATCH 69/72] remove unused mock files and add scheduled post mocks --- .../mappings/wpcom/posts/categories.json | 51 - .../mappings/wpcom/posts/post-formats.json | 20 - .../mappings/wpcom/posts/post_0_diffs.json | 18 - .../mappings/wpcom/posts/post_213_diffs.json | 1916 ----------------- .../mappings/wpcom/posts/post_215_diffs.json | 71 - .../mappings/wpcom/posts/post_387_diffs.json | 71 - .../mappings/wpcom/posts/post_396_diffs.json | 130 -- .../mappings/wpcom/posts/posts-diff.json | 38 - .../wpcom/posts/posts-draft,pending.json | 1272 ++++++++++- .../wpcom/posts/posts-draft,pending_v2.json | 1308 ----------- .../mappings/wpcom/posts/posts-first.json | 60 - .../mappings/wpcom/posts/posts-future.json | 44 - .../mappings/wpcom/posts/posts-new-after.json | 192 +- .../posts/posts-new-scheduled-after.json | 145 ++ .../wpcom/posts/posts-new-scheduled.json | 146 ++ .../mocks/mappings/wpcom/posts/posts-new.json | 28 +- .../wpcom/posts/posts-private,publish.json | 651 +++++- .../wpcom/posts/posts-private,publish_v2.json | 677 ------ .../mocks/mappings/wpcom/posts/posts_106.json | 160 -- .../mocks/mappings/wpcom/posts/posts_134.json | 151 -- .../mocks/mappings/wpcom/posts/posts_213.json | 196 -- .../mocks/mappings/wpcom/posts/posts_215.json | 140 -- .../mocks/mappings/wpcom/posts/posts_225.json | 191 -- .../mocks/mappings/wpcom/posts/posts_237.json | 216 -- .../mocks/mappings/wpcom/posts/posts_265.json | 148 -- .../mocks/mappings/wpcom/posts/posts_387.json | 140 -- .../mocks/mappings/wpcom/posts/posts_396.json | 154 -- .../mocks/mappings/wpcom/posts/posts_90.json | 171 -- ...st_sites_106707880_posts_439_replies.json} | 0 ...ites_106707880_posts_439_replies_new.json} | 0 ..._sites_181851495_posts-draft,pending.json} | 0 ..._sites_181977606_posts-draft,pending.json} | 0 ...rest_sites_181977606_posts-scheduled.json} | 6 +- ...rest_v11_sites_posts_subscribers_mine.json | 20 - 34 files changed, 2335 insertions(+), 6196 deletions(-) delete mode 100644 API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/categories.json delete mode 100644 API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/post-formats.json delete mode 100644 API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/post_0_diffs.json delete mode 100644 API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/post_213_diffs.json delete mode 100644 API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/post_215_diffs.json delete mode 100644 API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/post_387_diffs.json delete mode 100644 API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/post_396_diffs.json delete mode 100644 API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-diff.json delete mode 100644 API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-draft,pending_v2.json delete mode 100644 API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-first.json delete mode 100644 API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-future.json create mode 100644 API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-new-scheduled-after.json create mode 100644 API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-new-scheduled.json delete mode 100644 API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-private,publish_v2.json delete mode 100644 API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_106.json delete mode 100644 API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_134.json delete mode 100644 API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_213.json delete mode 100644 API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_215.json delete mode 100644 API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_225.json delete mode 100644 API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_237.json delete mode 100644 API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_265.json delete mode 100644 API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_387.json delete mode 100644 API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_396.json delete mode 100644 API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_90.json rename API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/{rest_v11_sites_106707880_posts_439_replies.json => rest_sites_106707880_posts_439_replies.json} (100%) rename API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/{rest_v11_sites_106707880_posts_439_replies_new.json => rest_sites_106707880_posts_439_replies_new.json} (100%) rename API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/{rest_v12_sites_181851495_posts-draft,pending.json => rest_sites_181851495_posts-draft,pending.json} (100%) rename API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/{rest_v12_sites_181977606_posts-draft,pending.json => rest_sites_181977606_posts-draft,pending.json} (100%) rename API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/{rest_v12_sites_181977606_posts-scheduled.json => rest_sites_181977606_posts-scheduled.json} (95%) delete mode 100644 API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_v11_sites_posts_subscribers_mine.json diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/categories.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/categories.json deleted file mode 100644 index f375b04e7a6c..000000000000 --- a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/categories.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "request": { - "method": "GET", - "urlPath": "/rest/v1.1/sites/106707880/categories", - "queryParameters": { - "locale": { - "matches": "(.*)" - } - } - }, - "response": { - "status": 200, - "jsonBody": { - "found": 2, - "categories": [ - { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "feed_url": "http://infocusphotographers.com/category/uncategorized/feed/", - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880" - } - } - }, - { - "ID": 1674, - "name": "Wedding", - "slug": "wedding", - "description": "", - "post_count": 1, - "feed_url": "http://infocusphotographers.com/category/wedding/feed/", - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:wedding", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:wedding/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880" - } - } - } - ] - } - } -} \ No newline at end of file diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/post-formats.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/post-formats.json deleted file mode 100644 index bed37adadcf9..000000000000 --- a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/post-formats.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "request": { - "method": "GET", - "urlPattern": "/rest/v1.1/sites/[0-9]+/post-formats(.*)" - }, - "response": { - "status": 200, - "jsonBody": { - "formats": { - "aside": "Aside", - "image": "Image", - "video": "Video", - "quote": "Quote", - "link": "Link", - "status": "Status", - "gallery": "Gallery" - } - } - } -} \ No newline at end of file diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/post_0_diffs.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/post_0_diffs.json deleted file mode 100644 index 8aca6e9500b5..000000000000 --- a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/post_0_diffs.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "request": { - "urlPattern": "/rest/v1.1/sites/.*/post/[0-9]+/diffs.*", - "method": "GET" - }, - "response": { - "status": 400, - "jsonBody": { - "error": "User cannot edit this post", - "message": 403 - }, - "headers": { - "Content-Type": "application/json", - "Connection": "keep-alive", - "Cache-Control": "no-cache, must-revalidate, max-age=0" - } - } -} \ No newline at end of file diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/post_213_diffs.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/post_213_diffs.json deleted file mode 100644 index d3ed9d7e4255..000000000000 --- a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/post_213_diffs.json +++ /dev/null @@ -1,1916 +0,0 @@ -{ - "request": { - "method": "GET", - "urlPath": "/rest/v1.1/sites/106707880/post/213/diffs/", - "queryParameters": { - "locale": { - "matches": "(.*)" - } - } - }, - "response": { - "status": 200, - "jsonBody": { - "diffs": [ - { - "from": 400, - "to": 401, - "diff": { - "post_title": [ - { - "op": "del", - "value": "(no" - }, - { - "op": "add", - "value": "Summer" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "title)" - }, - { - "op": "add", - "value": "Band Jam" - }, - { - "op": "copy", - "value": "\n" - } - ], - "post_content": [ - { - "op": "copy", - "value": "\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\n\n\n\n
\"\"
\n\n\n\n
\"\"
\n" - } - ], - "totals": { - "del": 2, - "add": 3 - } - } - }, - { - "from": 309, - "to": 400, - "diff": { - "post_title": [ - { - "op": "del", - "value": "Summer" - }, - { - "op": "add", - "value": "(no" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "Band Jam" - }, - { - "op": "add", - "value": "title)" - }, - { - "op": "copy", - "value": "\n" - } - ], - "post_content": [ - { - "op": "copy", - "value": "\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\n\n\n\n
\"\"
\n\n\n\n
\"\"
\n" - } - ], - "totals": { - "del": 3, - "add": 2 - } - } - }, - { - "from": 303, - "to": 309, - "diff": { - "post_title": [ - { - "op": "copy", - "value": "Summer Band Jam" - } - ], - "post_content": [ - { - "op": "copy", - "value": "\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\n\n" - }, - { - "op": "add", - "value": "\n\n
\"\"
\n\n\n\n
\"\"
\n" - }, - { - "op": "copy", - "value": "\n" - } - ], - "totals": { - "add": 50 - } - } - }, - { - "from": 300, - "to": 303, - "diff": { - "post_title": [ - { - "op": "copy", - "value": "Summer Band Jam" - } - ], - "post_content": [ - { - "op": "copy", - "value": "\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\n\n" - }, - { - "op": "del", - "value": "\n\n
\"\"
\n" - }, - { - "op": "copy", - "value": "\n" - } - ], - "totals": { - "del": 26 - } - } - }, - { - "from": 299, - "to": 300, - "diff": { - "post_title": [ - { - "op": "copy", - "value": "Summer Band Jam" - } - ], - "post_content": [ - { - "op": "copy", - "value": "\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!" - }, - { - "op": "del", - "value": " ..." - }, - { - "op": "copy", - "value": "

\n\n\n\n
\"\"
\n\n" - } - ], - "totals": { - "del": 0 - } - } - }, - { - "from": 298, - "to": 299, - "diff": { - "post_title": [ - { - "op": "del", - "value": "(no" - }, - { - "op": "add", - "value": "Summer" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "title)" - }, - { - "op": "add", - "value": "Band Jam" - }, - { - "op": "copy", - "value": "\n" - } - ], - "post_content": [ - { - "op": "copy", - "value": "\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots! ...

\n\n\n\n
\"\"
\n" - } - ], - "totals": { - "del": 2, - "add": 3 - } - } - }, - { - "from": 297, - "to": 298, - "diff": { - "post_title": [ - { - "op": "del", - "value": "Summer" - }, - { - "op": "add", - "value": "(no" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "Band Jam" - }, - { - "op": "add", - "value": "title)" - }, - { - "op": "copy", - "value": "\n" - } - ], - "post_content": [ - { - "op": "copy", - "value": "\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots! ...

\n\n\n\n
\"\"
\n" - } - ], - "totals": { - "del": 3, - "add": 2 - } - } - }, - { - "from": 296, - "to": 297, - "diff": { - "post_title": [ - { - "op": "copy", - "value": "Summer Band Jam" - } - ], - "post_content": [ - { - "op": "copy", - "value": "\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!" - }, - { - "op": "add", - "value": " ..." - }, - { - "op": "copy", - "value": "

\n\n\n\n
\"\"
\n\n" - } - ], - "totals": { - "add": 0 - } - } - }, - { - "from": 292, - "to": 296, - "diff": { - "post_title": [ - { - "op": "copy", - "value": "Summer Band Jam" - } - ], - "post_content": [ - { - "op": "copy", - "value": "\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\n\n\n" - }, - { - "op": "del", - "value": "\t \t " - }, - { - "op": "copy", - "value": "\n
""
" - }, - { - "op": "del", - "value": "\t \t " - }, - { - "op": "copy", - "value": "\n\n" - } - ], - "totals": { - "del": 0 - } - } - }, - { - "from": 291, - "to": 292, - "diff": { - "post_title": [ - { - "op": "del", - "value": "(no" - }, - { - "op": "add", - "value": "Summer" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "title)" - }, - { - "op": "add", - "value": "Band Jam" - }, - { - "op": "copy", - "value": "\n" - } - ], - "post_content": [ - { - "op": "copy", - "value": "\r\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\r\n\r\n\r\n\t \t \r\n
\"\"
\t \t \r\n" - } - ], - "totals": { - "del": 2, - "add": 3 - } - } - }, - { - "from": 289, - "to": 291, - "diff": { - "post_title": [ - { - "op": "del", - "value": "Summer" - }, - { - "op": "add", - "value": "(no" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "Band Jam" - }, - { - "op": "add", - "value": "title)" - }, - { - "op": "copy", - "value": "\n" - } - ], - "post_content": [ - { - "op": "copy", - "value": "\r\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\r\n\r\n\r\n\t \t \r\n
\"\"
\t \t \r\n" - } - ], - "totals": { - "del": 3, - "add": 2 - } - } - }, - { - "from": 288, - "to": 289, - "diff": { - "post_title": [ - { - "op": "del", - "value": "(no" - }, - { - "op": "add", - "value": "Summer" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "title)" - }, - { - "op": "add", - "value": "Band Jam" - }, - { - "op": "copy", - "value": "\n" - } - ], - "post_content": [ - { - "op": "copy", - "value": "\r\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\r\n\r\n\r\n\t \t \r\n
\"\"
\t \t \r\n" - } - ], - "totals": { - "del": 2, - "add": 3 - } - } - }, - { - "from": 287, - "to": 288, - "diff": { - "post_title": [ - { - "op": "del", - "value": "Summer" - }, - { - "op": "add", - "value": "(no" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "Band Jam" - }, - { - "op": "add", - "value": "title)" - }, - { - "op": "copy", - "value": "\n" - } - ], - "post_content": [ - { - "op": "copy", - "value": "\r\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\r\n\r\n\r\n\t \t \r\n
\"\"
\t \t \r\n" - } - ], - "totals": { - "del": 3, - "add": 2 - } - } - }, - { - "from": 286, - "to": 287, - "diff": { - "post_title": [ - { - "op": "del", - "value": "(no" - }, - { - "op": "add", - "value": "Summer" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "title)" - }, - { - "op": "add", - "value": "Band Jam" - }, - { - "op": "copy", - "value": "\n" - } - ], - "post_content": [ - { - "op": "copy", - "value": "\r\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\r\n\r\n\r\n\t \t \r\n
\"\"
\t \t \r\n" - } - ], - "totals": { - "del": 2, - "add": 3 - } - } - }, - { - "from": 285, - "to": 286, - "diff": { - "post_title": [ - { - "op": "del", - "value": "Summer" - }, - { - "op": "add", - "value": "(no" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "Band Jam" - }, - { - "op": "add", - "value": "title)" - }, - { - "op": "copy", - "value": "\n" - } - ], - "post_content": [ - { - "op": "copy", - "value": "\r\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\r\n\r\n\r\n\t \t \r\n
\"\"
\t \t \r\n" - } - ], - "totals": { - "del": 3, - "add": 2 - } - } - }, - { - "from": 284, - "to": 285, - "diff": { - "post_title": [ - { - "op": "del", - "value": "(no" - }, - { - "op": "add", - "value": "Summer" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "title)" - }, - { - "op": "add", - "value": "Band Jam" - }, - { - "op": "copy", - "value": "\n" - } - ], - "post_content": [ - { - "op": "copy", - "value": "\n

" - }, - { - "op": "del", - "value": "Blue" - }, - { - "op": "add", - "value": "This" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "skies" - }, - { - "op": "add", - "value": "event" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "and" - }, - { - "op": "add", - "value": "was" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "warm" - }, - { - "op": "add", - "value": "so" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "weather" - }, - { - "op": "add", - "value": "much fun" - }, - { - "op": "copy", - "value": ", " - }, - { - "op": "del", - "value": "what's" - }, - { - "op": "add", - "value": "I" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "not" - }, - { - "op": "add", - "value": "couldn’t wait" - }, - { - "op": "copy", - "value": " to " - }, - { - "op": "del", - "value": "love" - }, - { - "op": "add", - "value": "share a few of my" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "about" - }, - { - "op": "add", - "value": "favorite" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "summer?" - }, - { - "op": "add", - "value": "shots!" - }, - { - "op": "copy", - "value": "

\n\n\n\n

It's" - }, - { - "op": "add", - "value": "image" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "a great season for outdoor family portrait sessions and now is the time to book them!" - }, - { - "op": "del", - "value": "

\n\n\n\n

We offer a number of family portrait packages" - }, - { - "op": "add", - "value": ":209}" - }, - { - "op": "del", - "value": " and for a limited time are offering 15% off packages booked before May 1.

\n" - }, - { - "op": "del", - "value": "\n\n" - }, - { - "op": "copy", - "value": "\n
""
" - }, - { - "op": "add", - "value": "\t \t " - }, - { - "op": "copy", - "value": "\n\n" - }, - { - "op": "del", - "value": "\n\n

How to book

\n\n\n\n

Email us to set up a time to visit our studio.

\n" - }, - { - "op": "copy", - "value": "\n" - } - ], - "totals": { - "del": 127, - "add": 26 - } - } - }, - { - "from": 283, - "to": 284, - "diff": { - "post_title": [ - { - "op": "del", - "value": "Summer" - }, - { - "op": "add", - "value": "(no" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "Band Jam" - }, - { - "op": "add", - "value": "title)" - }, - { - "op": "copy", - "value": "\n" - } - ], - "post_content": [ - { - "op": "copy", - "value": "\n

" - }, - { - "op": "del", - "value": "This" - }, - { - "op": "add", - "value": "Blue" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "event" - }, - { - "op": "add", - "value": "skies" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "was" - }, - { - "op": "add", - "value": "and" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "so" - }, - { - "op": "add", - "value": "warm" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "much fun" - }, - { - "op": "add", - "value": "weather" - }, - { - "op": "copy", - "value": ", " - }, - { - "op": "del", - "value": "I" - }, - { - "op": "add", - "value": "what's" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "couldn’t wait" - }, - { - "op": "add", - "value": "not" - }, - { - "op": "copy", - "value": " to " - }, - { - "op": "del", - "value": "share a few of my" - }, - { - "op": "add", - "value": "love" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "favorite" - }, - { - "op": "add", - "value": "about" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "shots!" - }, - { - "op": "add", - "value": "summer?" - }, - { - "op": "copy", - "value": "

\n\n\n\n

It's" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "add", - "value": "a great season for outdoor family portrait sessions and now is the time to book them!" - }, - { - "op": "del", - "value": "{" - }, - { - "op": "add", - "value": "

\n\n\n\n

We offer a number of family portrait packages" - }, - { - "op": "add", - "value": " and for a limited time are offering 15% off packages booked before May 1.

\n" - }, - { - "op": "del", - "value": "\t" - }, - { - "op": "add", - "value": "\n\n" - }, - { - "op": "copy", - "value": "\n
""
" - }, - { - "op": "del", - "value": "\t \t " - }, - { - "op": "copy", - "value": "\n\n" - }, - { - "op": "add", - "value": "\n\n

How to book

\n\n\n\n

Email us to set up a time to visit our studio.

\n" - }, - { - "op": "copy", - "value": "\n" - } - ], - "totals": { - "del": 26, - "add": 127 - } - } - }, - { - "from": 280, - "to": 283, - "diff": { - "post_title": [ - { - "op": "copy", - "value": "Summer Band Jam" - } - ], - "post_content": [ - { - "op": "copy", - "value": "\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\n\n" - }, - { - "op": "add", - "value": "\n\t \t \n
\"\"
\t \t \n" - }, - { - "op": "copy", - "value": "\n" - } - ], - "totals": { - "add": 26 - } - } - }, - { - "from": 277, - "to": 280, - "diff": { - "post_title": [ - { - "op": "del", - "value": "(no" - }, - { - "op": "add", - "value": "Summer" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "title)" - }, - { - "op": "add", - "value": "Band Jam" - }, - { - "op": "copy", - "value": "\n" - } - ], - "post_content": [ - { - "op": "copy", - "value": "\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\n" - } - ], - "totals": { - "del": 2, - "add": 3 - } - } - }, - { - "from": 273, - "to": 277, - "diff": { - "post_title": [ - { - "op": "del", - "value": "Summer" - }, - { - "op": "add", - "value": "(no" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "Band Jam" - }, - { - "op": "add", - "value": "title)" - }, - { - "op": "copy", - "value": "\n" - } - ], - "post_content": [ - { - "op": "copy", - "value": "\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\n" - } - ], - "totals": { - "del": 3, - "add": 2 - } - } - }, - { - "from": 267, - "to": 273, - "diff": { - "post_title": [ - { - "op": "copy", - "value": "Summer Band Jam" - } - ], - "post_content": [ - { - "op": "copy", - "value": "\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\n\n" - }, - { - "op": "del", - "value": "\n\n
\"\"
\n" - }, - { - "op": "copy", - "value": "\n" - } - ], - "totals": { - "del": 26 - } - } - }, - { - "from": 240, - "to": 267, - "diff": { - "post_title": [ - { - "op": "copy", - "value": "Summer Band Jam" - } - ], - "post_content": [ - { - "op": "add", - "value": "\n

" - }, - { - "op": "copy", - "value": "This event was so much fun, I couldn’t wait to share a few of my favorite shots!" - }, - { - "op": "add", - "value": "

\n" - }, - { - "op": "copy", - "value": "\n\n<" - }, - { - "op": "del", - "value": "img" - }, - { - "op": "add", - "value": "!-- wp:image" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "class=" - }, - { - "op": "add", - "value": "{" - }, - { - "op": "copy", - "value": """ - }, - { - "op": "del", - "value": "alignnone" - }, - { - "op": "add", - "value": "id":209}" - }, - { - "op": "copy", - "value": " " - }, - { - "op": "del", - "value": "size" - }, - { - "op": "add", - "value": "" - }, - { - "op": "copy", - "value": "-" - }, - { - "op": "del", - "value": "full" - }, - { - "op": "add", - "value": "->\n\n\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\n\n\n\n
\"\"
\n\n\n\n
\"\"
\n", - "post_excerpt": "", - "post_title": "Summer Band Jam" - }, - "400": { - "post_date_gmt": "2019-06-28 21:04:40Z", - "post_modified_gmt": "2019-06-28 21:04:40Z", - "post_author": "68646169", - "id": 400, - "post_content": "\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\n\n\n\n
\"\"
\n\n\n\n
\"\"
\n", - "post_excerpt": "", - "post_title": "" - }, - "309": { - "post_date_gmt": "2019-05-27 21:36:25Z", - "post_modified_gmt": "2019-05-27 21:36:25Z", - "post_author": "742098", - "id": 309, - "post_content": "\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\n\n\n\n
\"\"
\n\n\n\n
\"\"
\n", - "post_excerpt": "", - "post_title": "Summer Band Jam" - }, - "303": { - "post_date_gmt": "2019-05-27 19:26:17Z", - "post_modified_gmt": "2019-05-27 19:26:17Z", - "post_author": "742098", - "id": 303, - "post_content": "\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\n", - "post_excerpt": "", - "post_title": "Summer Band Jam" - }, - "300": { - "post_date_gmt": "2019-04-17 10:45:45Z", - "post_modified_gmt": "2019-04-17 10:45:45Z", - "post_author": "67626417", - "id": 300, - "post_content": "\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\n\n\n\n
\"\"
\n", - "post_excerpt": "", - "post_title": "Summer Band Jam" - }, - "299": { - "post_date_gmt": "2019-04-17 10:45:25Z", - "post_modified_gmt": "2019-04-17 10:45:25Z", - "post_author": "67626417", - "id": 299, - "post_content": "\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots! ...

\n\n\n\n
\"\"
\n", - "post_excerpt": "", - "post_title": "Summer Band Jam" - }, - "298": { - "post_date_gmt": "2019-04-17 10:44:49Z", - "post_modified_gmt": "2019-04-17 10:44:49Z", - "post_author": "68646169", - "id": 298, - "post_content": "\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots! ...

\n\n\n\n
\"\"
\n", - "post_excerpt": "", - "post_title": "" - }, - "297": { - "post_date_gmt": "2019-04-17 10:44:12Z", - "post_modified_gmt": "2019-04-17 10:44:12Z", - "post_author": "67626417", - "id": 297, - "post_content": "\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots! ...

\n\n\n\n
\"\"
\n", - "post_excerpt": "", - "post_title": "Summer Band Jam" - }, - "296": { - "post_date_gmt": "2019-04-17 10:42:14Z", - "post_modified_gmt": "2019-04-17 10:42:14Z", - "post_author": "67626417", - "id": 296, - "post_content": "\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\n\n\n\n
\"\"
\n", - "post_excerpt": "", - "post_title": "Summer Band Jam" - }, - "292": { - "post_date_gmt": "2019-04-17 10:39:09Z", - "post_modified_gmt": "2019-04-17 10:39:09Z", - "post_author": "67626417", - "id": 292, - "post_content": "\r\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\r\n\r\n\r\n\t \t \r\n
\"\"
\t \t \r\n", - "post_excerpt": "", - "post_title": "Summer Band Jam" - }, - "291": { - "post_date_gmt": "2019-04-17 10:36:25Z", - "post_modified_gmt": "2019-04-17 10:36:25Z", - "post_author": "68646169", - "id": 291, - "post_content": "\r\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\r\n\r\n\r\n\t \t \r\n
\"\"
\t \t \r\n", - "post_excerpt": "", - "post_title": "" - }, - "289": { - "post_date_gmt": "2019-04-17 10:29:16Z", - "post_modified_gmt": "2019-04-17 10:29:16Z", - "post_author": "67626417", - "id": 289, - "post_content": "\r\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\r\n\r\n\r\n\t \t \r\n
\"\"
\t \t \r\n", - "post_excerpt": "", - "post_title": "Summer Band Jam" - }, - "288": { - "post_date_gmt": "2019-04-17 10:28:37Z", - "post_modified_gmt": "2019-04-17 10:28:37Z", - "post_author": "68646169", - "id": 288, - "post_content": "\r\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\r\n\r\n\r\n\t \t \r\n
\"\"
\t \t \r\n", - "post_excerpt": "", - "post_title": "" - }, - "287": { - "post_date_gmt": "2019-04-17 10:27:45Z", - "post_modified_gmt": "2019-04-17 10:27:45Z", - "post_author": "67626417", - "id": 287, - "post_content": "\r\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\r\n\r\n\r\n\t \t \r\n
\"\"
\t \t \r\n", - "post_excerpt": "", - "post_title": "Summer Band Jam" - }, - "286": { - "post_date_gmt": "2019-04-17 10:27:13Z", - "post_modified_gmt": "2019-04-17 10:27:13Z", - "post_author": "68646169", - "id": 286, - "post_content": "\r\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\r\n\r\n\r\n\t \t \r\n
\"\"
\t \t \r\n", - "post_excerpt": "", - "post_title": "" - }, - "285": { - "post_date_gmt": "2019-04-17 09:35:57Z", - "post_modified_gmt": "2019-04-17 09:35:57Z", - "post_author": "67626417", - "id": 285, - "post_content": "\r\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\r\n\r\n\r\n\t \t \r\n
\"\"
\t \t \r\n", - "post_excerpt": "", - "post_title": "Summer Band Jam" - }, - "284": { - "post_date_gmt": "2019-04-17 09:32:58Z", - "post_modified_gmt": "2019-04-17 09:32:58Z", - "post_author": "68646169", - "id": 284, - "post_content": "\n

Blue skies and warm weather, what's not to love about summer?

\n\n\n\n

It's a great season for outdoor family portrait sessions and now is the time to book them!

\n\n\n\n

We offer a number of family portrait packages and for a limited time are offering 15% off packages booked before May 1.

\n\n\n\n
\"beach-clouds-daytime-994605\"
\n\n\n\n

How to book

\n\n\n\n

Email us to set up a time to visit our studio.

\n", - "post_excerpt": "", - "post_title": "" - }, - "283": { - "post_date_gmt": "2019-04-17 09:32:34Z", - "post_modified_gmt": "2019-04-17 09:32:34Z", - "post_author": "67626417", - "id": 283, - "post_content": "\r\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\r\n\r\n\r\n\t \t \r\n
\"\"
\t \t \r\n", - "post_excerpt": "", - "post_title": "Summer Band Jam" - }, - "280": { - "post_date_gmt": "2019-04-17 09:23:35Z", - "post_modified_gmt": "2019-04-17 09:23:35Z", - "post_author": "67626417", - "id": 280, - "post_content": "\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\n", - "post_excerpt": "", - "post_title": "Summer Band Jam" - }, - "277": { - "post_date_gmt": "2019-04-16 14:21:22Z", - "post_modified_gmt": "2019-04-16 14:21:22Z", - "post_author": "68646169", - "id": 277, - "post_content": "\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\n", - "post_excerpt": "", - "post_title": "" - }, - "273": { - "post_date_gmt": "2019-03-21 17:23:26Z", - "post_modified_gmt": "2019-03-21 17:23:26Z", - "post_author": "68646169", - "id": 273, - "post_content": "\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\n", - "post_excerpt": "", - "post_title": "Summer Band Jam" - }, - "267": { - "post_date_gmt": "2019-03-21 17:17:59Z", - "post_modified_gmt": "2019-03-21 17:17:59Z", - "post_author": "68646169", - "id": 267, - "post_content": "\n

This event was so much fun, I couldn’t wait to share a few of my favorite shots!

\n\n\n\n
\"\"
\n", - "post_excerpt": "", - "post_title": "Summer Band Jam" - }, - "240": { - "post_date_gmt": "2019-03-20 23:45:49Z", - "post_modified_gmt": "2019-03-20 23:45:49Z", - "post_author": "14151046", - "id": 240, - "post_content": "This event was so much fun, I couldn’t wait to share a few of my favorite shots!\n\n\"concert-effect-entertainment-1150837\"", - "post_excerpt": "", - "post_title": "Summer Band Jam" - }, - "214": { - "post_date_gmt": "2019-02-15 23:26:48Z", - "post_modified_gmt": "2019-02-15 23:26:48Z", - "post_author": "68646169", - "id": 214, - "post_content": "This event was so much fun, I couldn’t wait to share a few of my favorite shots!", - "post_excerpt": "", - "post_title": "Summer Band Jam" - } - } - } - } -} \ No newline at end of file diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/post_215_diffs.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/post_215_diffs.json deleted file mode 100644 index d6f530c3fee7..000000000000 --- a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/post_215_diffs.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "request": { - "method": "GET", - "urlPath": "/rest/v1.1/sites/106707880/post/215/diffs/", - "queryParameters": { - "locale": { - "matches": "(.*)" - } - } - }, - "response": { - "status": 200, - "jsonBody": { - "diffs": [ - { - "from": 0, - "to": 216, - "diff": { - "post_title": [ - { - "op": "del", - "value": "" - }, - { - "op": "add", - "value": "Ideas" - }, - { - "op": "copy", - "value": "\n" - } - ], - "post_content": [ - { - "op": "add", - "value": "Returning client special - Offer a discount to clients who have left a review." - }, - { - "op": "copy", - "value": "\n\n" - }, - { - "op": "add", - "value": "Photography classes at the local" - }, - { - "op": "copy", - "value": "\n" - } - ], - "totals": { - "del": 0, - "add": 20 - } - } - } - ], - "revisions": { - "216": { - "post_date_gmt": "2019-02-15 23:27:13Z", - "post_modified_gmt": "2019-02-15 23:27:13Z", - "post_author": "68646169", - "id": 216, - "post_content": "Returning client special - Offer a discount to clients who have left a review.\n\nPhotography classes at the local", - "post_excerpt": "", - "post_title": "Ideas" - } - } - } - } -} \ No newline at end of file diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/post_387_diffs.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/post_387_diffs.json deleted file mode 100644 index 4e1dbb8b8a10..000000000000 --- a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/post_387_diffs.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "request": { - "method": "GET", - "urlPath": "/rest/v1.1/sites/106707880/post/387/diffs/", - "queryParameters": { - "locale": { - "matches": "(.*)" - } - } - }, - "response": { - "status": 200, - "jsonBody": { - "diffs": [ - { - "from": 0, - "to": 390, - "diff": { - "post_title": [ - { - "op": "del", - "value": "" - }, - { - "op": "add", - "value": "Time to Book Summer Sessions" - }, - { - "op": "copy", - "value": "\n" - } - ], - "post_content": [ - { - "op": "add", - "value": "Blue skies and warm weather, what's not to love about summer?" - }, - { - "op": "copy", - "value": "\n\n" - }, - { - "op": "add", - "value": "It's a great season for outdoor family portrait sessions and now is the time to book them!\n\nWe offer a number of family portrait packages and for a limited time are offering 15% off packages booked before May 1.\n\n\"beach-clouds-daytime-994605\"\n\nHow to book\nEmail us to set up a time to visit our studio." - }, - { - "op": "copy", - "value": "\n" - } - ], - "totals": { - "del": 0, - "add": 86 - } - } - } - ], - "revisions": { - "390": { - "post_date_gmt": "2019-05-28 21:03:03Z", - "post_modified_gmt": "2019-05-28 21:03:03Z", - "post_author": "742098", - "id": 390, - "post_content": "Blue skies and warm weather, what's not to love about summer?\n\nIt's a great season for outdoor family portrait sessions and now is the time to book them!\n\nWe offer a number of family portrait packages and for a limited time are offering 15% off packages booked before May 1.\n\n\"beach-clouds-daytime-994605\"\n\nHow to book\nEmail us to set up a time to visit our studio.", - "post_excerpt": "", - "post_title": "Time to Book Summer Sessions" - } - } - } - } -} \ No newline at end of file diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/post_396_diffs.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/post_396_diffs.json deleted file mode 100644 index 5634833bff6f..000000000000 --- a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/post_396_diffs.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "request": { - "method": "GET", - "urlPath": "/rest/v1.1/sites/106707880/post/396/diffs/", - "queryParameters": { - "locale": { - "matches": "(.*)" - } - } - }, - "response": { - "status": 200, - "jsonBody": { - "diffs": [ - { - "from": 398, - "to": 399, - "diff": { - "post_title": [ - { - "op": "copy", - "value": "Now Booking Summer Sessions" - } - ], - "post_content": [ - { - "op": "copy", - "value": "
“One must maintain a little bit of summer, even in the middle of winter.”\n\n– Henry David Thoreau
\n" - }, - { - "op": "add", - "value": "\n" - }, - { - "op": "copy", - "value": "\nBlue skies and warm weather, what's not to love about summer? It's a great season for outdoor family portrait sessions and now is the time to book them!\n\nWe offer a number of family portrait packages and for a limited time are offering 15% off packages booked before April 1.\n\nHow to book" - }, - { - "op": "del", - "value": "\n<" - }, - { - "op": "add", - "value": "<" - }, - { - "op": "copy", - "value": "/strong>" - }, - { - "op": "add", - "value": "\n\n\n" - }, - { - "op": "copy", - "value": "Email us to set up a time to visit our studio.\n" - } - ], - "totals": { - "add": 0, - "del": 0 - } - } - }, - { - "from": 0, - "to": 398, - "diff": { - "post_title": [ - { - "op": "del", - "value": "" - }, - { - "op": "add", - "value": "Now Booking Summer Sessions" - }, - { - "op": "copy", - "value": "\n" - } - ], - "post_content": [ - { - "op": "add", - "value": "
“One must maintain a little bit of summer, even in the middle of winter.”" - }, - { - "op": "copy", - "value": "\n\n" - }, - { - "op": "add", - "value": "– Henry David Thoreau
\nBlue skies and warm weather, what's not to love about summer? It's a great season for outdoor family portrait sessions and now is the time to book them!\n\nWe offer a number of family portrait packages and for a limited time are offering 15% off packages booked before April 1.\n\nHow to book\nEmail us to set up a time to visit our studio." - }, - { - "op": "copy", - "value": "\n" - } - ], - "totals": { - "del": 0, - "add": 101 - } - } - } - ], - "revisions": { - "399": { - "post_date_gmt": "2019-05-28 21:06:50Z", - "post_modified_gmt": "2019-05-28 21:06:50Z", - "post_author": "742098", - "id": 399, - "post_content": "
“One must maintain a little bit of summer, even in the middle of winter.”\n\n– Henry David Thoreau
\n\n\nBlue skies and warm weather, what's not to love about summer? It's a great season for outdoor family portrait sessions and now is the time to book them!\n\nWe offer a number of family portrait packages and for a limited time are offering 15% off packages booked before April 1.\n\nHow to book\n\n\nEmail us to set up a time to visit our studio.", - "post_excerpt": "", - "post_title": "Now Booking Summer Sessions" - }, - "398": { - "post_date_gmt": "2019-05-28 21:05:17Z", - "post_modified_gmt": "2019-05-28 21:05:17Z", - "post_author": "742098", - "id": 398, - "post_content": "
“One must maintain a little bit of summer, even in the middle of winter.”\n\n– Henry David Thoreau
\nBlue skies and warm weather, what's not to love about summer? It's a great season for outdoor family portrait sessions and now is the time to book them!\n\nWe offer a number of family portrait packages and for a limited time are offering 15% off packages booked before April 1.\n\nHow to book\nEmail us to set up a time to visit our studio.", - "post_excerpt": "", - "post_title": "Now Booking Summer Sessions" - } - } - } - } -} \ No newline at end of file diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-diff.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-diff.json deleted file mode 100644 index e5687df6fdba..000000000000 --- a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-diff.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "request": { - "method": "GET", - "urlPath": "/rest/v1.1/sites/106707880/posts/", - "queryParameters": { - "after": { - "matches": "(.*)" - }, - "before": { - "matches": "(.*)" - }, - "fields": { - "equalTo": "ID, title, URL" - }, - "number": { - "matches": "(.*)" - }, - "locale": { - "matches": "(.*)" - } - } - }, - "response": { - "status": 200, - "jsonBody": { - "found": 0, - "posts": [ - - ], - "meta": { - "links": { - "counts": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/post-counts/post" - }, - "wpcom": true - } - } - } -} \ No newline at end of file diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-draft,pending.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-draft,pending.json index 6dd5353c09bb..da83a98cc5b0 100644 --- a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-draft,pending.json +++ b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-draft,pending.json @@ -1,28 +1,25 @@ { "request": { "method": "GET", - "urlPath": "/rest/v1.1/sites/106707880/posts/", + "urlPath": "/rest/v1.2/sites/106707880/posts", "queryParameters": { - "number": { - "equalTo": "60" + "locale": { + "matches": "(.*)" }, "context": { "equalTo": "edit" }, - "order_by": { - "equalTo": "date" - }, - "fields": { - "equalTo": "ID,modified,status,meta,date" + "meta": { + "equalTo": "autosave" }, - "order": { - "equalTo": "DESC" + "number": { + "equalTo": "40" }, "status": { "equalTo": "draft,pending" }, - "locale": { - "matches": "(.*)" + "type": { + "equalTo": "post" } } }, @@ -33,43 +30,1276 @@ "posts": [ { "ID": 213, - "modified": "2019-07-16T02:39:45+00:00", - "status": "draft" + "site_ID": 106707880, + "author": { + "ID": 68646169, + "login": "thenomadicwordsmith", + "email": "thenomadicwordsmith@gmail.com", + "name": "thenomadicwordsmith", + "first_name": "Nomadic", + "last_name": "Wordsmith", + "nice_name": "thenomadicwordsmith", + "URL": "http://thenomadicwordsmith.wordpress.com", + "avatar_URL": "https://0.gravatar.com/avatar/9ba48385fc40dfd9a55a3348d8e7f4d9?s=96&d=identicon&r=G", + "profile_URL": "https://en.gravatar.com/thenomadicwordsmith", + "site_ID": 71769073 + }, + "date": "2020-08-24T12:17:14-07:00", + "modified": "2020-08-27T16:31:00-07:00", + "title": "Our Services", + "URL": "https://fourpawsdoggrooming.wordpress.com/our-services/", + "short_URL": "https://wp.me/Pcj1SD-J", + "content": "\n
\n

Mobile grooming salon for cats and dogs.

\n\n\n\n\n
\n\n\n\n

Dog grooming

\n\n\n\n
\n
\n

Our deluxe grooming service includes:

\n\n\n\n
  • Nail clip
  • Ear cleaning
  • 1st shampoo
  • 2nd shampoo
  • Conditioning rinse
  • Towel dry
  • Blow dry
  • Brush out
  • And a treat!
\n
\n\n\n\n
\n
\"\"
\n
\n
\n\n\n\n

Deluxe Cut and Groom

\n\n\n\n

Our deluxe cut and groom package includes everything in the deluxe groom plus a haircut.

\n\n\n\n

Add on services

\n\n\n\n

Pamper your pup even more with one of our signature add on services:

\n\n\n\n
  • Aloe conditioning treatment
  • Soothing medicated shampoos
  • Tooth brushing
  • Creative styling with temporary color
  • Nail polish application
  • Coat braiding
  • Bows and other accessories
\n\n\n\n
\n

\n
\n\n\n\n

\n", + "excerpt": "", + "slug": "our-services", + "guid": "https://fourpawsdoggrooming.wordpress.com/?p=45", + "status": "publish", + "sticky": false, + "password": "", + "parent": false, + "type": "post", + "discussion": { + "comments_open": false, + "comment_status": "closed", + "pings_open": false, + "ping_status": "closed", + "comment_count": 0 + }, + "likes_enabled": true, + "sharing_enabled": true, + "like_count": 0, + "i_like": false, + "is_reblogged": false, + "is_following": false, + "global_ID": "e41d1c97a7b93a594b07e4df51dfafb3", + "featured_image": "", + "post_thumbnail": null, + "format": "standard", + "geo": false, + "menu_order": 0, + "page_template": "", + "publicize_URLs": [ + + ], + "terms": { + "category": { + "Uncategorized": { + "ID": 1, + "name": "Uncategorized", + "slug": "uncategorized", + "description": "", + "post_count": 1, + "parent": 0, + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" + } + } + } + }, + "post_tag": { + }, + "post_format": { + }, + "mentions": { + } + }, + "tags": { + }, + "categories": { + "Uncategorized": { + "ID": 1, + "name": "Uncategorized", + "slug": "uncategorized", + "description": "", + "post_count": 1, + "parent": 0, + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" + } + } + } + }, + "attachments": { + "65": { + "ID": 65, + "URL": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg", + "guid": "http://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg", + "date": "2020-08-27T16:30:36-07:00", + "post_ID": 45, + "author_ID": 191794483, + "file": "image-1.jpg", + "mime_type": "image/jpeg", + "extension": "jpg", + "title": "image", + "caption": "", + "description": "", + "alt": "", + "thumbnails": { + "thumbnail": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=107", + "medium": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=214", + "large": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=731", + "newspack-article-block-landscape-large": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=1200&h=900&crop=1", + "newspack-article-block-portrait-large": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=900&h=1200&crop=1", + "newspack-article-block-square-large": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=1200&h=1200&crop=1", + "newspack-article-block-landscape-medium": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=800&h=600&crop=1", + "newspack-article-block-portrait-medium": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=600&h=800&crop=1", + "newspack-article-block-square-medium": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=800&h=800&crop=1", + "newspack-article-block-landscape-small": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=400&h=300&crop=1", + "newspack-article-block-portrait-small": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=300&h=400&crop=1", + "newspack-article-block-square-small": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=400&h=400&crop=1", + "newspack-article-block-landscape-tiny": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=200&h=150&crop=1", + "newspack-article-block-portrait-tiny": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=150&h=200&crop=1", + "newspack-article-block-square-tiny": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=200&h=200&crop=1", + "newspack-article-block-uncropped": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=1200" + }, + "height": 1848, + "width": 1320, + "exif": { + "aperture": "0", + "credit": "", + "camera": "", + "caption": "", + "created_timestamp": "0", + "copyright": "", + "focal_length": "0", + "iso": "0", + "shutter_speed": "0", + "title": "", + "orientation": "1", + "keywords": [ + + ] + }, + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/181851495/media/65", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/181851495/media/65/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/181851495", + "parent": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/181851495/posts/45" + } + } + }, + "63": { + "ID": 63, + "URL": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg", + "guid": "http://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg", + "date": "2020-08-26T12:20:02-07:00", + "post_ID": 45, + "author_ID": 191794483, + "file": "wp-1598469598971.jpg", + "mime_type": "image/jpeg", + "extension": "jpg", + "title": "wp-1598469598971.jpg", + "caption": "", + "description": "", + "alt": "", + "thumbnails": { + "thumbnail": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=100", + "medium": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=200", + "large": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=682", + "newspack-article-block-landscape-large": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=1200&h=900&crop=1", + "newspack-article-block-portrait-large": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=900&h=1200&crop=1", + "newspack-article-block-square-large": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=1200&h=1200&crop=1", + "newspack-article-block-landscape-medium": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=800&h=600&crop=1", + "newspack-article-block-portrait-medium": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=600&h=800&crop=1", + "newspack-article-block-square-medium": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=800&h=800&crop=1", + "newspack-article-block-landscape-small": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=400&h=300&crop=1", + "newspack-article-block-portrait-small": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=300&h=400&crop=1", + "newspack-article-block-square-small": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=400&h=400&crop=1", + "newspack-article-block-landscape-tiny": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=200&h=150&crop=1", + "newspack-article-block-portrait-tiny": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=150&h=200&crop=1", + "newspack-article-block-square-tiny": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=200&h=200&crop=1", + "newspack-article-block-uncropped": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=1200" + }, + "height": 2780, + "width": 1851, + "exif": { + "aperture": "0", + "credit": "", + "camera": "", + "caption": "", + "created_timestamp": "0", + "copyright": "", + "focal_length": "0", + "iso": "0", + "shutter_speed": "0", + "title": "", + "orientation": "0", + "keywords": [ + + ] + }, + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/181851495/media/63", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/181851495/media/63/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/181851495", + "parent": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/181851495/posts/45" + } + } + }, + "61": { + "ID": 61, + "URL": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg", + "guid": "http://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg", + "date": "2020-08-25T12:05:54-07:00", + "post_ID": 45, + "author_ID": 191794483, + "file": "image.jpg", + "mime_type": "image/jpeg", + "extension": "jpg", + "title": "image", + "caption": "", + "description": "", + "alt": "", + "thumbnails": { + "thumbnail": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=150", + "medium": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=300", + "large": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=1024", + "newspack-article-block-landscape-large": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=1200&h=900&crop=1", + "newspack-article-block-portrait-large": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=900&h=1200&crop=1", + "newspack-article-block-square-large": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=1200&h=1200&crop=1", + "newspack-article-block-landscape-medium": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=800&h=600&crop=1", + "newspack-article-block-portrait-medium": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=600&h=800&crop=1", + "newspack-article-block-square-medium": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=800&h=800&crop=1", + "newspack-article-block-landscape-small": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=400&h=300&crop=1", + "newspack-article-block-portrait-small": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=300&h=400&crop=1", + "newspack-article-block-square-small": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=400&h=400&crop=1", + "newspack-article-block-landscape-tiny": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=200&h=150&crop=1", + "newspack-article-block-portrait-tiny": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=150&h=200&crop=1", + "newspack-article-block-square-tiny": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=200&h=200&crop=1", + "newspack-article-block-uncropped": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=1200" + }, + "height": 1848, + "width": 1846, + "exif": { + "aperture": "0", + "credit": "", + "camera": "", + "caption": "", + "created_timestamp": "0", + "copyright": "", + "focal_length": "0", + "iso": "0", + "shutter_speed": "0", + "title": "", + "orientation": "1", + "keywords": [ + + ] + }, + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/181851495/media/61", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/181851495/media/61/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/181851495", + "parent": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/181851495/posts/45" + } + } + } + }, + "attachment_count": 3, + "metadata": [ + { + "id": "502", + "key": "email_notification", + "value": "1553125754" + }, + { + "id": "564", + "key": "geo_public", + "value": "0" + }, + { + "id": "496", + "key": "jabber_published", + "value": "1553125752" + }, + { + "id": "503", + "key": "timeline_notification", + "value": "1553125801" + }, + { + "id": "563", + "key": "_edit_last", + "value": "67626417" + }, + { + "id": "556", + "key": "_edit_lock", + "value": "1565368108:742098" + }, + { + "id": "501", + "key": "_publicize_job_id", + "value": "28865441316" + }, + { + "id": "500", + "key": "_rest_api_client_id", + "value": "-1" + }, + { + "id": "499", + "key": "_rest_api_published", + "value": "1" + }, + { + "id": "565", + "key": "_thumbnail_id", + "value": "151" + }, + { + "id": "514", + "key": "_wp_old_date", + "value": "2019-03-20" + } + ], + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/213", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/posts/213/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880", + "replies": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/213/replies/", + "likes": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/213/likes/" + } + }, + "capabilities": { + "publish_post": true, + "delete_post": true, + "edit_post": true + }, + "revisions": [ + 402, + 401, + 400, + 309, + 303, + 300, + 299, + 298, + 297, + 296, + 292, + 291, + 289, + 288, + 287, + 286, + 285, + 284, + 283, + 280, + 277, + 273, + 267, + 240, + 214 + ], + "other_URLs": { + "permalink_URL": "http://infocusphotographers.com/2019/07/16/%postname%/", + "suggested_slug": "summer-band-jam" + } }, { "ID": 396, + "site_ID": 106707880, + "author": { + "ID": 742098, + "login": "jkmassel", + "email": "jeremy.massel@gmail.com", + "name": "Jeremy Massel", + "first_name": "Jeremy", + "last_name": "Massel", + "nice_name": "jkmassel", + "URL": "https://jkmassel.wordpress.com", + "avatar_URL": "https://2.gravatar.com/avatar/58fc51586c9a1f9895ac70e3ca60886e?s=96&d=identicon&r=G", + "profile_URL": "https://en.gravatar.com/jkmassel", + "site_ID": 1562023 + }, + "date": "2019-05-28T21:06:45+00:00", "modified": "2019-05-28T21:08:03+00:00", - "status": "draft" + "title": "Now Booking Summer Sessions", + "URL": "http://infocusphotographers.com/?p=396", + "short_URL": "https://wp.me/p7dJAQ-6o", + "content": "
“One must maintain a little bit of summer, even in the middle of winter.”\n\n– Henry David Thoreau
\nBlue skies and warm weather, what's not to love about summer? It's a great season for outdoor family portrait sessions and now is the time to book them!\n\nWe offer a number of family portrait packages and for a limited time are offering 15% off packages booked before April 1.\n\nHow to book\n\nEmail us to set up a time to visit our studio.", + "excerpt": "", + "slug": "", + "guid": "http://infocusphotographers.com/?p=396", + "status": "draft", + "sticky": false, + "password": "", + "parent": false, + "type": "post", + "discussion": { + "comments_open": true, + "comment_status": "open", + "pings_open": true, + "ping_status": "open", + "comment_count": 0 + }, + "likes_enabled": true, + "sharing_enabled": false, + "like_count": 0, + "i_like": false, + "is_reblogged": false, + "is_following": false, + "global_ID": "276e4cea0342ec68e69a0ca537acfce1", + "featured_image": "", + "post_thumbnail": null, + "format": "standard", + "geo": false, + "menu_order": 0, + "page_template": "", + "publicize_URLs": [ + + ], + "terms": { + "category": { + "Uncategorized": { + "ID": 1, + "name": "Uncategorized", + "slug": "uncategorized", + "description": "", + "post_count": 1, + "parent": 0, + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" + } + } + } + }, + "post_tag": { + }, + "post_format": { + }, + "mentions": { + } + }, + "tags": { + }, + "categories": { + "Uncategorized": { + "ID": 1, + "name": "Uncategorized", + "slug": "uncategorized", + "description": "", + "post_count": 1, + "parent": 0, + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" + } + } + } + }, + "attachments": { + }, + "attachment_count": 0, + "metadata": [ + { + "id": "742", + "key": "sharing_disabled", + "value": [ + + ] + }, + { + "id": "741", + "key": "switch_like_status", + "value": "" + }, + { + "id": "743", + "key": "_edit_lock", + "value": "1565368199:742098" + } + ], + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/396", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/posts/396/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880", + "replies": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/396/replies/", + "likes": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/396/likes/" + } + }, + "capabilities": { + "publish_post": true, + "delete_post": true, + "edit_post": true + }, + "revisions": [ + 399, + 398 + ], + "other_URLs": { + "permalink_URL": "http://infocusphotographers.com/2019/05/28/%postname%/", + "suggested_slug": "now-booking-summer-sessions-2" + } }, { "ID": 387, + "site_ID": 106707880, + "author": { + "ID": 68646169, + "login": "thenomadicwordsmith", + "email": "thenomadicwordsmith@gmail.com", + "name": "thenomadicwordsmith", + "first_name": "Nomadic", + "last_name": "Wordsmith", + "nice_name": "thenomadicwordsmith", + "URL": "http://thenomadicwordsmith.wordpress.com", + "avatar_URL": "https://0.gravatar.com/avatar/9ba48385fc40dfd9a55a3348d8e7f4d9?s=96&d=identicon&r=G", + "profile_URL": "https://en.gravatar.com/thenomadicwordsmith", + "site_ID": 71769073 + }, + "date": "2019-05-28T21:03:22+00:00", "modified": "2019-05-28T21:03:22+00:00", - "status": "draft" + "title": "Time to Book Summer Sessions", + "URL": "http://infocusphotographers.com/?p=387", + "short_URL": "https://wp.me/p7dJAQ-6f", + "content": "Blue skies and warm weather, what's not to love about summer?\n\nIt's a great season for outdoor family portrait sessions and now is the time to book them!\n\nWe offer a number of family portrait packages and for a limited time are offering 15% off packages booked before May 1.\n\n\"beach-clouds-daytime-994605\"\n\nHow to book\nEmail us to set up a time to visit our studio.", + "excerpt": "", + "slug": "", + "guid": "http://infocusphotographers.com/?p=387", + "status": "draft", + "sticky": false, + "password": "", + "parent": false, + "type": "post", + "discussion": { + "comments_open": true, + "comment_status": "open", + "pings_open": true, + "ping_status": "open", + "comment_count": 0 + }, + "likes_enabled": true, + "sharing_enabled": true, + "like_count": 0, + "i_like": false, + "is_reblogged": false, + "is_following": false, + "global_ID": "a9037bde04073835b078a1b1bb48b7de", + "featured_image": "", + "post_thumbnail": null, + "format": "standard", + "geo": false, + "menu_order": 0, + "page_template": "", + "publicize_URLs": [ + + ], + "terms": { + "category": { + "Uncategorized": { + "ID": 1, + "name": "Uncategorized", + "slug": "uncategorized", + "description": "", + "post_count": 1, + "parent": 0, + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" + } + } + } + }, + "post_tag": { + }, + "post_format": { + }, + "mentions": { + } + }, + "tags": { + }, + "categories": { + "Uncategorized": { + "ID": 1, + "name": "Uncategorized", + "slug": "uncategorized", + "description": "", + "post_count": 1, + "parent": 0, + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" + } + } + } + }, + "attachments": { + }, + "attachment_count": 0, + "metadata": [ + { + "id": "731", + "key": "_edit_lock", + "value": "1559077396:742098" + } + ], + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/387", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/posts/387/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880", + "replies": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/387/replies/", + "likes": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/387/likes/" + } + }, + "capabilities": { + "publish_post": true, + "delete_post": true, + "edit_post": true + }, + "revisions": [ + 390 + ], + "other_URLs": { + "permalink_URL": "http://infocusphotographers.com/2019/05/28/%postname%/", + "suggested_slug": "time-to-book-summer-sessions" + } }, { "ID": 265, + "site_ID": 106707880, + "author": { + "ID": 68646169, + "login": "thenomadicwordsmith", + "email": "thenomadicwordsmith@gmail.com", + "name": "thenomadicwordsmith", + "first_name": "Nomadic", + "last_name": "Wordsmith", + "nice_name": "thenomadicwordsmith", + "URL": "http://thenomadicwordsmith.wordpress.com", + "avatar_URL": "https://0.gravatar.com/avatar/9ba48385fc40dfd9a55a3348d8e7f4d9?s=96&d=identicon&r=G", + "profile_URL": "https://en.gravatar.com/thenomadicwordsmith", + "site_ID": 71769073 + }, + "date": "2019-04-17T10:40:39+00:00", "modified": "2019-04-17T10:41:03+00:00", - "status": "draft" + "title": "What we've been doing lately", + "URL": "http://infocusphotographers.com/?p=265", + "short_URL": "https://wp.me/p7dJAQ-4h", + "content": "\r\n

The last few weeks have been a blur! Here are a few shots we really like. What do you think?

\r\n\r\n\r\n\r\n\r\n", + "excerpt": "", + "slug": "", + "guid": "http://infocusphotographers.com/?p=265", + "status": "draft", + "sticky": false, + "password": "", + "parent": false, + "type": "post", + "discussion": { + "comments_open": true, + "comment_status": "open", + "pings_open": true, + "ping_status": "open", + "comment_count": 0 + }, + "likes_enabled": true, + "sharing_enabled": true, + "like_count": 0, + "i_like": false, + "is_reblogged": false, + "is_following": false, + "global_ID": "2f7a8f8da665b6469d91f96108fb24c6", + "featured_image": "", + "post_thumbnail": null, + "format": "standard", + "geo": false, + "menu_order": 0, + "page_template": "", + "publicize_URLs": [ + + ], + "terms": { + "category": { + "Uncategorized": { + "ID": 1, + "name": "Uncategorized", + "slug": "uncategorized", + "description": "", + "post_count": 1, + "parent": 0, + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" + } + } + } + }, + "post_tag": { + }, + "post_format": { + }, + "mentions": { + } + }, + "tags": { + }, + "categories": { + "Uncategorized": { + "ID": 1, + "name": "Uncategorized", + "slug": "uncategorized", + "description": "", + "post_count": 1, + "parent": 0, + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" + } + } + } + }, + "attachments": { + }, + "attachment_count": 0, + "metadata": [ + { + "id": "567", + "key": "geo_public", + "value": "0" + }, + { + "id": "566", + "key": "_edit_last", + "value": "67626417" + }, + { + "id": "555", + "key": "_edit_lock", + "value": "1555497522:67626417" + } + ], + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/265", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/posts/265/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880", + "replies": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/265/replies/", + "likes": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/265/likes/" + } + }, + "capabilities": { + "publish_post": true, + "delete_post": true, + "edit_post": true + }, + "revisions": [ + 294, + 293, + 266 + ], + "other_URLs": { + "permalink_URL": "http://infocusphotographers.com/2019/04/17/%postname%/", + "suggested_slug": "what-weve-been-doing-lately" + } }, { "ID": 134, + "site_ID": 106707880, + "author": { + "ID": 68646169, + "login": "thenomadicwordsmith", + "email": "thenomadicwordsmith@gmail.com", + "name": "thenomadicwordsmith", + "first_name": "Nomadic", + "last_name": "Wordsmith", + "nice_name": "thenomadicwordsmith", + "URL": "http://thenomadicwordsmith.wordpress.com", + "avatar_URL": "https://0.gravatar.com/avatar/9ba48385fc40dfd9a55a3348d8e7f4d9?s=96&d=identicon&r=G", + "profile_URL": "https://en.gravatar.com/thenomadicwordsmith", + "site_ID": 71769073 + }, + "date": "2019-03-19T03:08:16+00:00", "modified": "2019-05-27T21:39:08+00:00", - "status": "draft" + "title": "Now Booking Summer Sessions", + "URL": "http://infocusphotographers.com/?p=134", + "short_URL": "https://wp.me/p7dJAQ-2a", + "content": "
“One must maintain a little bit of summer, even in the middle of winter.” \n\n– Henry David Thoreau
\nBlue skies and warm weather, what's not to love about summer? It's a great season for outdoor family portrait sessions and now is the time to book them!\n\nWe offer a number of family portrait packages and for a limited time are offering 15% off packages booked before April 1.\n

How to book

\nEmail us to set up a time to visit our studio.", + "excerpt": "", + "slug": "now-booking-summer-sessions", + "guid": "http://infocusphotographers.com/?p=134", + "status": "draft", + "sticky": false, + "password": "", + "parent": false, + "type": "post", + "discussion": { + "comments_open": true, + "comment_status": "open", + "pings_open": true, + "ping_status": "open", + "comment_count": 0 + }, + "likes_enabled": true, + "sharing_enabled": true, + "like_count": 0, + "i_like": false, + "is_reblogged": false, + "is_following": false, + "global_ID": "e9bb2d5021873cf97e6ced1f9308bdd5", + "featured_image": "", + "post_thumbnail": null, + "format": "standard", + "geo": false, + "menu_order": 0, + "page_template": "", + "publicize_URLs": [ + + ], + "terms": { + "category": { + "Uncategorized": { + "ID": 1, + "name": "Uncategorized", + "slug": "uncategorized", + "description": "", + "post_count": 1, + "parent": 0, + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" + } + } + } + }, + "post_tag": { + }, + "post_format": { + }, + "mentions": { + } + }, + "tags": { + }, + "categories": { + "Uncategorized": { + "ID": 1, + "name": "Uncategorized", + "slug": "uncategorized", + "description": "", + "post_count": 1, + "parent": 0, + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" + } + } + } + }, + "attachments": { + }, + "attachment_count": 0, + "metadata": [ + { + "id": "560", + "key": "_edit_lock", + "value": "1559078929:742098" + }, + { + "id": "478", + "key": "_wp_desired_post_slug", + "value": "" + }, + { + "id": "481", + "key": "_wp_desired_post_slug", + "value": "__trashed-5" + } + ], + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/134", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/posts/134/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880", + "replies": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/134/replies/", + "likes": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/134/likes/", + "autosave": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/134/autosave" + }, + "data": { + "autosave": { + "ID": 397, + "author_ID": "742098", + "post_ID": 134, + "title": "Now Booking Summer Sessions", + "content": "
“One must maintain a little bit of summer, even in the middle of winter.” \n\n– Henry David Thoreau
\nBlue skies and warm weather, what's not to love about summer? It's a great season for outdoor family portrait sessions and now is the time to book them!\n\nWe offer a number of family portrait packages and for a limited time are offering 15% off packages booked before April 1.\n

How to book

\nEmail us to set up a time to visit our studio.", + "excerpt": "", + "preview_URL": "http://infocusphotographers.com/?p=134&preview=true&preview_nonce=fcfb9daa0a", + "modified": "2019-05-28T21:05:12+00:00" + } + } + }, + "capabilities": { + "publish_post": true, + "delete_post": true, + "edit_post": true + }, + "revisions": [ + 397, + 310, + 274, + 236, + 231, + 230, + 220, + 219, + 218, + 136, + 135 + ], + "other_URLs": { + "permalink_URL": "http://infocusphotographers.com/2019/03/19/%postname%/", + "suggested_slug": "now-booking-summer-sessions" + } }, { "ID": 215, + "site_ID": 106707880, + "author": { + "ID": 68646169, + "login": "thenomadicwordsmith", + "email": "thenomadicwordsmith@gmail.com", + "name": "thenomadicwordsmith", + "first_name": "Nomadic", + "last_name": "Wordsmith", + "nice_name": "thenomadicwordsmith", + "URL": "http://thenomadicwordsmith.wordpress.com", + "avatar_URL": "https://0.gravatar.com/avatar/9ba48385fc40dfd9a55a3348d8e7f4d9?s=96&d=identicon&r=G", + "profile_URL": "https://en.gravatar.com/thenomadicwordsmith", + "site_ID": 71769073 + }, + "date": "2019-02-15T23:27:13+00:00", "modified": "2019-02-15T23:27:13+00:00", - "status": "draft" + "title": "Ideas", + "URL": "http://infocusphotographers.com/?p=215", + "short_URL": "https://wp.me/p7dJAQ-3t", + "content": "Returning client special - Offer a discount to clients who have left a review.\n\nPhotography classes at the local", + "excerpt": "", + "slug": "", + "guid": "http://infocusphotographers.com/?p=215", + "status": "draft", + "sticky": false, + "password": "", + "parent": false, + "type": "post", + "discussion": { + "comments_open": true, + "comment_status": "open", + "pings_open": true, + "ping_status": "open", + "comment_count": 0 + }, + "likes_enabled": true, + "sharing_enabled": true, + "like_count": 0, + "i_like": false, + "is_reblogged": false, + "is_following": false, + "global_ID": "50d8150dfae26a5bef18779211142b65", + "featured_image": "", + "post_thumbnail": null, + "format": "standard", + "geo": false, + "menu_order": 0, + "page_template": "", + "publicize_URLs": [ + + ], + "terms": { + "category": { + "Uncategorized": { + "ID": 1, + "name": "Uncategorized", + "slug": "uncategorized", + "description": "", + "post_count": 1, + "parent": 0, + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" + } + } + } + }, + "post_tag": { + }, + "post_format": { + }, + "mentions": { + } + }, + "tags": { + }, + "categories": { + "Uncategorized": { + "ID": 1, + "name": "Uncategorized", + "slug": "uncategorized", + "description": "", + "post_count": 1, + "parent": 0, + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" + } + } + } + }, + "attachments": { + }, + "attachment_count": 0, + "metadata": [ + { + "id": "561", + "key": "_edit_lock", + "value": "1553718391:742098" + } + ], + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/215", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/posts/215/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880", + "replies": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/215/replies/", + "likes": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/215/likes/" + } + }, + "capabilities": { + "publish_post": true, + "delete_post": true, + "edit_post": true + }, + "revisions": [ + 216 + ], + "other_URLs": { + "permalink_URL": "http://infocusphotographers.com/2019/02/15/%postname%/", + "suggested_slug": "ideas" + } }, { "ID": 225, + "site_ID": 106707880, + "author": { + "ID": 68646169, + "login": "thenomadicwordsmith", + "email": "thenomadicwordsmith@gmail.com", + "name": "thenomadicwordsmith", + "first_name": "Nomadic", + "last_name": "Wordsmith", + "nice_name": "thenomadicwordsmith", + "URL": "http://thenomadicwordsmith.wordpress.com", + "avatar_URL": "https://0.gravatar.com/avatar/9ba48385fc40dfd9a55a3348d8e7f4d9?s=96&d=identicon&r=G", + "profile_URL": "https://en.gravatar.com/thenomadicwordsmith", + "site_ID": 71769073 + }, + "date": "2019-01-01T21:54:15+00:00", "modified": "2019-03-21T17:20:44+00:00", - "status": "draft" + "title": "Book Your Summer Sessions", + "URL": "http://infocusphotographers.com/?p=225", + "short_URL": "https://wp.me/p7dJAQ-3D", + "content": "\n

“One must maintain a little bit of summer, even in the middle of winter.

– Henry David Thoreau
\n\n\n\n

Blue skies and warm weather, what's not to love about summer? It's a great season for outdoor family portrait sessions and now is the time to book them!

\n\n\n\n

We offer a number of family portrait packages and for a limited time are offering 15% off packages booked before April 1.

\n\n\n\n
\"beach-children-family-39691\"
\n\n\n\n

How to book

\n\n\n\n

Email us to set up a time to visit our studio.

\n", + "excerpt": "", + "slug": "__trashed-2", + "guid": "http://infocusphotographers.com/?p=225", + "status": "draft", + "sticky": false, + "password": "", + "parent": false, + "type": "post", + "discussion": { + "comments_open": true, + "comment_status": "open", + "pings_open": true, + "ping_status": "open", + "comment_count": 0 + }, + "likes_enabled": true, + "sharing_enabled": true, + "like_count": 0, + "i_like": false, + "is_reblogged": false, + "is_following": false, + "global_ID": "2d07f957bcc110149b8aa37bd1231ad1", + "featured_image": "", + "post_thumbnail": null, + "format": "standard", + "geo": false, + "menu_order": 0, + "page_template": "", + "publicize_URLs": [ + + ], + "terms": { + "category": { + "Uncategorized": { + "ID": 1, + "name": "Uncategorized", + "slug": "uncategorized", + "description": "", + "post_count": 1, + "parent": 0, + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" + } + } + } + }, + "post_tag": { + }, + "post_format": { + }, + "mentions": { + } + }, + "tags": { + }, + "categories": { + "Uncategorized": { + "ID": 1, + "name": "Uncategorized", + "slug": "uncategorized", + "description": "", + "post_count": 1, + "parent": 0, + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" + } + } + } + }, + "attachments": { + "243": { + "ID": 243, + "URL": "https://infocusphotographers.files.wordpress.com/2019/01/beach-children-family-39691.jpg", + "guid": "http://infocusphotographers.files.wordpress.com/2019/01/beach-children-family-39691.jpg", + "date": "2019-03-20T23:56:52+00:00", + "post_ID": 225, + "author_ID": 14151046, + "file": "beach-children-family-39691.jpg", + "mime_type": "image/jpeg", + "extension": "jpg", + "title": "beach-children-family-39691", + "caption": "", + "description": "", + "alt": "", + "thumbnails": { + "thumbnail": "https://infocusphotographers.files.wordpress.com/2019/01/beach-children-family-39691.jpg?w=150", + "medium": "https://infocusphotographers.files.wordpress.com/2019/01/beach-children-family-39691.jpg?w=300", + "large": "https://infocusphotographers.files.wordpress.com/2019/01/beach-children-family-39691.jpg?w=1024" + }, + "height": 2446, + "width": 3669, + "exif": { + "aperture": "0", + "credit": "", + "camera": "", + "caption": "", + "created_timestamp": "0", + "copyright": "", + "focal_length": "0", + "iso": "0", + "shutter_speed": "0", + "title": "", + "orientation": "0", + "keywords": [ + + ] + }, + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/media/243", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/media/243/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880", + "parent": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/225" + } + } + } + }, + "attachment_count": 1, + "metadata": [ + { + "id": "558", + "key": "_edit_lock", + "value": "1559077412:742098" + }, + { + "id": "468", + "key": "_wp_desired_post_slug", + "value": "" + } + ], + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/225", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/posts/225/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880", + "replies": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/225/replies/", + "likes": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/225/likes/" + } + }, + "capabilities": { + "publish_post": true, + "delete_post": true, + "edit_post": true + }, + "revisions": [ + 271, + 235, + 229, + 228, + 227, + 226 + ], + "other_URLs": { + "permalink_URL": "http://infocusphotographers.com/2019/01/01/%postname%/", + "suggested_slug": "__trashed-2" + } } ], "meta": { "links": { - "counts": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/post-counts/post" + "counts": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/post-counts/post" }, "wpcom": true } diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-draft,pending_v2.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-draft,pending_v2.json deleted file mode 100644 index da83a98cc5b0..000000000000 --- a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-draft,pending_v2.json +++ /dev/null @@ -1,1308 +0,0 @@ -{ - "request": { - "method": "GET", - "urlPath": "/rest/v1.2/sites/106707880/posts", - "queryParameters": { - "locale": { - "matches": "(.*)" - }, - "context": { - "equalTo": "edit" - }, - "meta": { - "equalTo": "autosave" - }, - "number": { - "equalTo": "40" - }, - "status": { - "equalTo": "draft,pending" - }, - "type": { - "equalTo": "post" - } - } - }, - "response": { - "status": 200, - "jsonBody": { - "found": 7, - "posts": [ - { - "ID": 213, - "site_ID": 106707880, - "author": { - "ID": 68646169, - "login": "thenomadicwordsmith", - "email": "thenomadicwordsmith@gmail.com", - "name": "thenomadicwordsmith", - "first_name": "Nomadic", - "last_name": "Wordsmith", - "nice_name": "thenomadicwordsmith", - "URL": "http://thenomadicwordsmith.wordpress.com", - "avatar_URL": "https://0.gravatar.com/avatar/9ba48385fc40dfd9a55a3348d8e7f4d9?s=96&d=identicon&r=G", - "profile_URL": "https://en.gravatar.com/thenomadicwordsmith", - "site_ID": 71769073 - }, - "date": "2020-08-24T12:17:14-07:00", - "modified": "2020-08-27T16:31:00-07:00", - "title": "Our Services", - "URL": "https://fourpawsdoggrooming.wordpress.com/our-services/", - "short_URL": "https://wp.me/Pcj1SD-J", - "content": "\n
\n

Mobile grooming salon for cats and dogs.

\n\n\n\n\n
\n\n\n\n

Dog grooming

\n\n\n\n
\n
\n

Our deluxe grooming service includes:

\n\n\n\n
  • Nail clip
  • Ear cleaning
  • 1st shampoo
  • 2nd shampoo
  • Conditioning rinse
  • Towel dry
  • Blow dry
  • Brush out
  • And a treat!
\n
\n\n\n\n
\n
\"\"
\n
\n
\n\n\n\n

Deluxe Cut and Groom

\n\n\n\n

Our deluxe cut and groom package includes everything in the deluxe groom plus a haircut.

\n\n\n\n

Add on services

\n\n\n\n

Pamper your pup even more with one of our signature add on services:

\n\n\n\n
  • Aloe conditioning treatment
  • Soothing medicated shampoos
  • Tooth brushing
  • Creative styling with temporary color
  • Nail polish application
  • Coat braiding
  • Bows and other accessories
\n\n\n\n
\n

\n
\n\n\n\n

\n", - "excerpt": "", - "slug": "our-services", - "guid": "https://fourpawsdoggrooming.wordpress.com/?p=45", - "status": "publish", - "sticky": false, - "password": "", - "parent": false, - "type": "post", - "discussion": { - "comments_open": false, - "comment_status": "closed", - "pings_open": false, - "ping_status": "closed", - "comment_count": 0 - }, - "likes_enabled": true, - "sharing_enabled": true, - "like_count": 0, - "i_like": false, - "is_reblogged": false, - "is_following": false, - "global_ID": "e41d1c97a7b93a594b07e4df51dfafb3", - "featured_image": "", - "post_thumbnail": null, - "format": "standard", - "geo": false, - "menu_order": 0, - "page_template": "", - "publicize_URLs": [ - - ], - "terms": { - "category": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" - } - } - } - }, - "post_tag": { - }, - "post_format": { - }, - "mentions": { - } - }, - "tags": { - }, - "categories": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" - } - } - } - }, - "attachments": { - "65": { - "ID": 65, - "URL": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg", - "guid": "http://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg", - "date": "2020-08-27T16:30:36-07:00", - "post_ID": 45, - "author_ID": 191794483, - "file": "image-1.jpg", - "mime_type": "image/jpeg", - "extension": "jpg", - "title": "image", - "caption": "", - "description": "", - "alt": "", - "thumbnails": { - "thumbnail": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=107", - "medium": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=214", - "large": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=731", - "newspack-article-block-landscape-large": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=1200&h=900&crop=1", - "newspack-article-block-portrait-large": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=900&h=1200&crop=1", - "newspack-article-block-square-large": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=1200&h=1200&crop=1", - "newspack-article-block-landscape-medium": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=800&h=600&crop=1", - "newspack-article-block-portrait-medium": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=600&h=800&crop=1", - "newspack-article-block-square-medium": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=800&h=800&crop=1", - "newspack-article-block-landscape-small": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=400&h=300&crop=1", - "newspack-article-block-portrait-small": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=300&h=400&crop=1", - "newspack-article-block-square-small": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=400&h=400&crop=1", - "newspack-article-block-landscape-tiny": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=200&h=150&crop=1", - "newspack-article-block-portrait-tiny": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=150&h=200&crop=1", - "newspack-article-block-square-tiny": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=200&h=200&crop=1", - "newspack-article-block-uncropped": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image-1.jpg?w=1200" - }, - "height": 1848, - "width": 1320, - "exif": { - "aperture": "0", - "credit": "", - "camera": "", - "caption": "", - "created_timestamp": "0", - "copyright": "", - "focal_length": "0", - "iso": "0", - "shutter_speed": "0", - "title": "", - "orientation": "1", - "keywords": [ - - ] - }, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/181851495/media/65", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/181851495/media/65/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/181851495", - "parent": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/181851495/posts/45" - } - } - }, - "63": { - "ID": 63, - "URL": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg", - "guid": "http://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg", - "date": "2020-08-26T12:20:02-07:00", - "post_ID": 45, - "author_ID": 191794483, - "file": "wp-1598469598971.jpg", - "mime_type": "image/jpeg", - "extension": "jpg", - "title": "wp-1598469598971.jpg", - "caption": "", - "description": "", - "alt": "", - "thumbnails": { - "thumbnail": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=100", - "medium": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=200", - "large": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=682", - "newspack-article-block-landscape-large": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=1200&h=900&crop=1", - "newspack-article-block-portrait-large": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=900&h=1200&crop=1", - "newspack-article-block-square-large": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=1200&h=1200&crop=1", - "newspack-article-block-landscape-medium": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=800&h=600&crop=1", - "newspack-article-block-portrait-medium": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=600&h=800&crop=1", - "newspack-article-block-square-medium": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=800&h=800&crop=1", - "newspack-article-block-landscape-small": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=400&h=300&crop=1", - "newspack-article-block-portrait-small": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=300&h=400&crop=1", - "newspack-article-block-square-small": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=400&h=400&crop=1", - "newspack-article-block-landscape-tiny": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=200&h=150&crop=1", - "newspack-article-block-portrait-tiny": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=150&h=200&crop=1", - "newspack-article-block-square-tiny": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=200&h=200&crop=1", - "newspack-article-block-uncropped": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/wp-1598469598971.jpg?w=1200" - }, - "height": 2780, - "width": 1851, - "exif": { - "aperture": "0", - "credit": "", - "camera": "", - "caption": "", - "created_timestamp": "0", - "copyright": "", - "focal_length": "0", - "iso": "0", - "shutter_speed": "0", - "title": "", - "orientation": "0", - "keywords": [ - - ] - }, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/181851495/media/63", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/181851495/media/63/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/181851495", - "parent": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/181851495/posts/45" - } - } - }, - "61": { - "ID": 61, - "URL": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg", - "guid": "http://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg", - "date": "2020-08-25T12:05:54-07:00", - "post_ID": 45, - "author_ID": 191794483, - "file": "image.jpg", - "mime_type": "image/jpeg", - "extension": "jpg", - "title": "image", - "caption": "", - "description": "", - "alt": "", - "thumbnails": { - "thumbnail": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=150", - "medium": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=300", - "large": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=1024", - "newspack-article-block-landscape-large": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=1200&h=900&crop=1", - "newspack-article-block-portrait-large": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=900&h=1200&crop=1", - "newspack-article-block-square-large": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=1200&h=1200&crop=1", - "newspack-article-block-landscape-medium": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=800&h=600&crop=1", - "newspack-article-block-portrait-medium": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=600&h=800&crop=1", - "newspack-article-block-square-medium": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=800&h=800&crop=1", - "newspack-article-block-landscape-small": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=400&h=300&crop=1", - "newspack-article-block-portrait-small": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=300&h=400&crop=1", - "newspack-article-block-square-small": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=400&h=400&crop=1", - "newspack-article-block-landscape-tiny": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=200&h=150&crop=1", - "newspack-article-block-portrait-tiny": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=150&h=200&crop=1", - "newspack-article-block-square-tiny": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=200&h=200&crop=1", - "newspack-article-block-uncropped": "https://fourpawsdoggrooming.files.wordpress.com/2020/08/image.jpg?w=1200" - }, - "height": 1848, - "width": 1846, - "exif": { - "aperture": "0", - "credit": "", - "camera": "", - "caption": "", - "created_timestamp": "0", - "copyright": "", - "focal_length": "0", - "iso": "0", - "shutter_speed": "0", - "title": "", - "orientation": "1", - "keywords": [ - - ] - }, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/181851495/media/61", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/181851495/media/61/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/181851495", - "parent": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/181851495/posts/45" - } - } - } - }, - "attachment_count": 3, - "metadata": [ - { - "id": "502", - "key": "email_notification", - "value": "1553125754" - }, - { - "id": "564", - "key": "geo_public", - "value": "0" - }, - { - "id": "496", - "key": "jabber_published", - "value": "1553125752" - }, - { - "id": "503", - "key": "timeline_notification", - "value": "1553125801" - }, - { - "id": "563", - "key": "_edit_last", - "value": "67626417" - }, - { - "id": "556", - "key": "_edit_lock", - "value": "1565368108:742098" - }, - { - "id": "501", - "key": "_publicize_job_id", - "value": "28865441316" - }, - { - "id": "500", - "key": "_rest_api_client_id", - "value": "-1" - }, - { - "id": "499", - "key": "_rest_api_published", - "value": "1" - }, - { - "id": "565", - "key": "_thumbnail_id", - "value": "151" - }, - { - "id": "514", - "key": "_wp_old_date", - "value": "2019-03-20" - } - ], - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/213", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/posts/213/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880", - "replies": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/213/replies/", - "likes": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/213/likes/" - } - }, - "capabilities": { - "publish_post": true, - "delete_post": true, - "edit_post": true - }, - "revisions": [ - 402, - 401, - 400, - 309, - 303, - 300, - 299, - 298, - 297, - 296, - 292, - 291, - 289, - 288, - 287, - 286, - 285, - 284, - 283, - 280, - 277, - 273, - 267, - 240, - 214 - ], - "other_URLs": { - "permalink_URL": "http://infocusphotographers.com/2019/07/16/%postname%/", - "suggested_slug": "summer-band-jam" - } - }, - { - "ID": 396, - "site_ID": 106707880, - "author": { - "ID": 742098, - "login": "jkmassel", - "email": "jeremy.massel@gmail.com", - "name": "Jeremy Massel", - "first_name": "Jeremy", - "last_name": "Massel", - "nice_name": "jkmassel", - "URL": "https://jkmassel.wordpress.com", - "avatar_URL": "https://2.gravatar.com/avatar/58fc51586c9a1f9895ac70e3ca60886e?s=96&d=identicon&r=G", - "profile_URL": "https://en.gravatar.com/jkmassel", - "site_ID": 1562023 - }, - "date": "2019-05-28T21:06:45+00:00", - "modified": "2019-05-28T21:08:03+00:00", - "title": "Now Booking Summer Sessions", - "URL": "http://infocusphotographers.com/?p=396", - "short_URL": "https://wp.me/p7dJAQ-6o", - "content": "
“One must maintain a little bit of summer, even in the middle of winter.”\n\n– Henry David Thoreau
\nBlue skies and warm weather, what's not to love about summer? It's a great season for outdoor family portrait sessions and now is the time to book them!\n\nWe offer a number of family portrait packages and for a limited time are offering 15% off packages booked before April 1.\n\nHow to book\n\nEmail us to set up a time to visit our studio.", - "excerpt": "", - "slug": "", - "guid": "http://infocusphotographers.com/?p=396", - "status": "draft", - "sticky": false, - "password": "", - "parent": false, - "type": "post", - "discussion": { - "comments_open": true, - "comment_status": "open", - "pings_open": true, - "ping_status": "open", - "comment_count": 0 - }, - "likes_enabled": true, - "sharing_enabled": false, - "like_count": 0, - "i_like": false, - "is_reblogged": false, - "is_following": false, - "global_ID": "276e4cea0342ec68e69a0ca537acfce1", - "featured_image": "", - "post_thumbnail": null, - "format": "standard", - "geo": false, - "menu_order": 0, - "page_template": "", - "publicize_URLs": [ - - ], - "terms": { - "category": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" - } - } - } - }, - "post_tag": { - }, - "post_format": { - }, - "mentions": { - } - }, - "tags": { - }, - "categories": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" - } - } - } - }, - "attachments": { - }, - "attachment_count": 0, - "metadata": [ - { - "id": "742", - "key": "sharing_disabled", - "value": [ - - ] - }, - { - "id": "741", - "key": "switch_like_status", - "value": "" - }, - { - "id": "743", - "key": "_edit_lock", - "value": "1565368199:742098" - } - ], - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/396", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/posts/396/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880", - "replies": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/396/replies/", - "likes": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/396/likes/" - } - }, - "capabilities": { - "publish_post": true, - "delete_post": true, - "edit_post": true - }, - "revisions": [ - 399, - 398 - ], - "other_URLs": { - "permalink_URL": "http://infocusphotographers.com/2019/05/28/%postname%/", - "suggested_slug": "now-booking-summer-sessions-2" - } - }, - { - "ID": 387, - "site_ID": 106707880, - "author": { - "ID": 68646169, - "login": "thenomadicwordsmith", - "email": "thenomadicwordsmith@gmail.com", - "name": "thenomadicwordsmith", - "first_name": "Nomadic", - "last_name": "Wordsmith", - "nice_name": "thenomadicwordsmith", - "URL": "http://thenomadicwordsmith.wordpress.com", - "avatar_URL": "https://0.gravatar.com/avatar/9ba48385fc40dfd9a55a3348d8e7f4d9?s=96&d=identicon&r=G", - "profile_URL": "https://en.gravatar.com/thenomadicwordsmith", - "site_ID": 71769073 - }, - "date": "2019-05-28T21:03:22+00:00", - "modified": "2019-05-28T21:03:22+00:00", - "title": "Time to Book Summer Sessions", - "URL": "http://infocusphotographers.com/?p=387", - "short_URL": "https://wp.me/p7dJAQ-6f", - "content": "Blue skies and warm weather, what's not to love about summer?\n\nIt's a great season for outdoor family portrait sessions and now is the time to book them!\n\nWe offer a number of family portrait packages and for a limited time are offering 15% off packages booked before May 1.\n\n\"beach-clouds-daytime-994605\"\n\nHow to book\nEmail us to set up a time to visit our studio.", - "excerpt": "", - "slug": "", - "guid": "http://infocusphotographers.com/?p=387", - "status": "draft", - "sticky": false, - "password": "", - "parent": false, - "type": "post", - "discussion": { - "comments_open": true, - "comment_status": "open", - "pings_open": true, - "ping_status": "open", - "comment_count": 0 - }, - "likes_enabled": true, - "sharing_enabled": true, - "like_count": 0, - "i_like": false, - "is_reblogged": false, - "is_following": false, - "global_ID": "a9037bde04073835b078a1b1bb48b7de", - "featured_image": "", - "post_thumbnail": null, - "format": "standard", - "geo": false, - "menu_order": 0, - "page_template": "", - "publicize_URLs": [ - - ], - "terms": { - "category": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" - } - } - } - }, - "post_tag": { - }, - "post_format": { - }, - "mentions": { - } - }, - "tags": { - }, - "categories": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" - } - } - } - }, - "attachments": { - }, - "attachment_count": 0, - "metadata": [ - { - "id": "731", - "key": "_edit_lock", - "value": "1559077396:742098" - } - ], - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/387", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/posts/387/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880", - "replies": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/387/replies/", - "likes": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/387/likes/" - } - }, - "capabilities": { - "publish_post": true, - "delete_post": true, - "edit_post": true - }, - "revisions": [ - 390 - ], - "other_URLs": { - "permalink_URL": "http://infocusphotographers.com/2019/05/28/%postname%/", - "suggested_slug": "time-to-book-summer-sessions" - } - }, - { - "ID": 265, - "site_ID": 106707880, - "author": { - "ID": 68646169, - "login": "thenomadicwordsmith", - "email": "thenomadicwordsmith@gmail.com", - "name": "thenomadicwordsmith", - "first_name": "Nomadic", - "last_name": "Wordsmith", - "nice_name": "thenomadicwordsmith", - "URL": "http://thenomadicwordsmith.wordpress.com", - "avatar_URL": "https://0.gravatar.com/avatar/9ba48385fc40dfd9a55a3348d8e7f4d9?s=96&d=identicon&r=G", - "profile_URL": "https://en.gravatar.com/thenomadicwordsmith", - "site_ID": 71769073 - }, - "date": "2019-04-17T10:40:39+00:00", - "modified": "2019-04-17T10:41:03+00:00", - "title": "What we've been doing lately", - "URL": "http://infocusphotographers.com/?p=265", - "short_URL": "https://wp.me/p7dJAQ-4h", - "content": "\r\n

The last few weeks have been a blur! Here are a few shots we really like. What do you think?

\r\n\r\n\r\n\r\n\r\n", - "excerpt": "", - "slug": "", - "guid": "http://infocusphotographers.com/?p=265", - "status": "draft", - "sticky": false, - "password": "", - "parent": false, - "type": "post", - "discussion": { - "comments_open": true, - "comment_status": "open", - "pings_open": true, - "ping_status": "open", - "comment_count": 0 - }, - "likes_enabled": true, - "sharing_enabled": true, - "like_count": 0, - "i_like": false, - "is_reblogged": false, - "is_following": false, - "global_ID": "2f7a8f8da665b6469d91f96108fb24c6", - "featured_image": "", - "post_thumbnail": null, - "format": "standard", - "geo": false, - "menu_order": 0, - "page_template": "", - "publicize_URLs": [ - - ], - "terms": { - "category": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" - } - } - } - }, - "post_tag": { - }, - "post_format": { - }, - "mentions": { - } - }, - "tags": { - }, - "categories": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" - } - } - } - }, - "attachments": { - }, - "attachment_count": 0, - "metadata": [ - { - "id": "567", - "key": "geo_public", - "value": "0" - }, - { - "id": "566", - "key": "_edit_last", - "value": "67626417" - }, - { - "id": "555", - "key": "_edit_lock", - "value": "1555497522:67626417" - } - ], - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/265", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/posts/265/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880", - "replies": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/265/replies/", - "likes": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/265/likes/" - } - }, - "capabilities": { - "publish_post": true, - "delete_post": true, - "edit_post": true - }, - "revisions": [ - 294, - 293, - 266 - ], - "other_URLs": { - "permalink_URL": "http://infocusphotographers.com/2019/04/17/%postname%/", - "suggested_slug": "what-weve-been-doing-lately" - } - }, - { - "ID": 134, - "site_ID": 106707880, - "author": { - "ID": 68646169, - "login": "thenomadicwordsmith", - "email": "thenomadicwordsmith@gmail.com", - "name": "thenomadicwordsmith", - "first_name": "Nomadic", - "last_name": "Wordsmith", - "nice_name": "thenomadicwordsmith", - "URL": "http://thenomadicwordsmith.wordpress.com", - "avatar_URL": "https://0.gravatar.com/avatar/9ba48385fc40dfd9a55a3348d8e7f4d9?s=96&d=identicon&r=G", - "profile_URL": "https://en.gravatar.com/thenomadicwordsmith", - "site_ID": 71769073 - }, - "date": "2019-03-19T03:08:16+00:00", - "modified": "2019-05-27T21:39:08+00:00", - "title": "Now Booking Summer Sessions", - "URL": "http://infocusphotographers.com/?p=134", - "short_URL": "https://wp.me/p7dJAQ-2a", - "content": "
“One must maintain a little bit of summer, even in the middle of winter.” \n\n– Henry David Thoreau
\nBlue skies and warm weather, what's not to love about summer? It's a great season for outdoor family portrait sessions and now is the time to book them!\n\nWe offer a number of family portrait packages and for a limited time are offering 15% off packages booked before April 1.\n

How to book

\nEmail us to set up a time to visit our studio.", - "excerpt": "", - "slug": "now-booking-summer-sessions", - "guid": "http://infocusphotographers.com/?p=134", - "status": "draft", - "sticky": false, - "password": "", - "parent": false, - "type": "post", - "discussion": { - "comments_open": true, - "comment_status": "open", - "pings_open": true, - "ping_status": "open", - "comment_count": 0 - }, - "likes_enabled": true, - "sharing_enabled": true, - "like_count": 0, - "i_like": false, - "is_reblogged": false, - "is_following": false, - "global_ID": "e9bb2d5021873cf97e6ced1f9308bdd5", - "featured_image": "", - "post_thumbnail": null, - "format": "standard", - "geo": false, - "menu_order": 0, - "page_template": "", - "publicize_URLs": [ - - ], - "terms": { - "category": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" - } - } - } - }, - "post_tag": { - }, - "post_format": { - }, - "mentions": { - } - }, - "tags": { - }, - "categories": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" - } - } - } - }, - "attachments": { - }, - "attachment_count": 0, - "metadata": [ - { - "id": "560", - "key": "_edit_lock", - "value": "1559078929:742098" - }, - { - "id": "478", - "key": "_wp_desired_post_slug", - "value": "" - }, - { - "id": "481", - "key": "_wp_desired_post_slug", - "value": "__trashed-5" - } - ], - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/134", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/posts/134/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880", - "replies": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/134/replies/", - "likes": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/134/likes/", - "autosave": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/134/autosave" - }, - "data": { - "autosave": { - "ID": 397, - "author_ID": "742098", - "post_ID": 134, - "title": "Now Booking Summer Sessions", - "content": "
“One must maintain a little bit of summer, even in the middle of winter.” \n\n– Henry David Thoreau
\nBlue skies and warm weather, what's not to love about summer? It's a great season for outdoor family portrait sessions and now is the time to book them!\n\nWe offer a number of family portrait packages and for a limited time are offering 15% off packages booked before April 1.\n

How to book

\nEmail us to set up a time to visit our studio.", - "excerpt": "", - "preview_URL": "http://infocusphotographers.com/?p=134&preview=true&preview_nonce=fcfb9daa0a", - "modified": "2019-05-28T21:05:12+00:00" - } - } - }, - "capabilities": { - "publish_post": true, - "delete_post": true, - "edit_post": true - }, - "revisions": [ - 397, - 310, - 274, - 236, - 231, - 230, - 220, - 219, - 218, - 136, - 135 - ], - "other_URLs": { - "permalink_URL": "http://infocusphotographers.com/2019/03/19/%postname%/", - "suggested_slug": "now-booking-summer-sessions" - } - }, - { - "ID": 215, - "site_ID": 106707880, - "author": { - "ID": 68646169, - "login": "thenomadicwordsmith", - "email": "thenomadicwordsmith@gmail.com", - "name": "thenomadicwordsmith", - "first_name": "Nomadic", - "last_name": "Wordsmith", - "nice_name": "thenomadicwordsmith", - "URL": "http://thenomadicwordsmith.wordpress.com", - "avatar_URL": "https://0.gravatar.com/avatar/9ba48385fc40dfd9a55a3348d8e7f4d9?s=96&d=identicon&r=G", - "profile_URL": "https://en.gravatar.com/thenomadicwordsmith", - "site_ID": 71769073 - }, - "date": "2019-02-15T23:27:13+00:00", - "modified": "2019-02-15T23:27:13+00:00", - "title": "Ideas", - "URL": "http://infocusphotographers.com/?p=215", - "short_URL": "https://wp.me/p7dJAQ-3t", - "content": "Returning client special - Offer a discount to clients who have left a review.\n\nPhotography classes at the local", - "excerpt": "", - "slug": "", - "guid": "http://infocusphotographers.com/?p=215", - "status": "draft", - "sticky": false, - "password": "", - "parent": false, - "type": "post", - "discussion": { - "comments_open": true, - "comment_status": "open", - "pings_open": true, - "ping_status": "open", - "comment_count": 0 - }, - "likes_enabled": true, - "sharing_enabled": true, - "like_count": 0, - "i_like": false, - "is_reblogged": false, - "is_following": false, - "global_ID": "50d8150dfae26a5bef18779211142b65", - "featured_image": "", - "post_thumbnail": null, - "format": "standard", - "geo": false, - "menu_order": 0, - "page_template": "", - "publicize_URLs": [ - - ], - "terms": { - "category": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" - } - } - } - }, - "post_tag": { - }, - "post_format": { - }, - "mentions": { - } - }, - "tags": { - }, - "categories": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" - } - } - } - }, - "attachments": { - }, - "attachment_count": 0, - "metadata": [ - { - "id": "561", - "key": "_edit_lock", - "value": "1553718391:742098" - } - ], - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/215", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/posts/215/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880", - "replies": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/215/replies/", - "likes": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/215/likes/" - } - }, - "capabilities": { - "publish_post": true, - "delete_post": true, - "edit_post": true - }, - "revisions": [ - 216 - ], - "other_URLs": { - "permalink_URL": "http://infocusphotographers.com/2019/02/15/%postname%/", - "suggested_slug": "ideas" - } - }, - { - "ID": 225, - "site_ID": 106707880, - "author": { - "ID": 68646169, - "login": "thenomadicwordsmith", - "email": "thenomadicwordsmith@gmail.com", - "name": "thenomadicwordsmith", - "first_name": "Nomadic", - "last_name": "Wordsmith", - "nice_name": "thenomadicwordsmith", - "URL": "http://thenomadicwordsmith.wordpress.com", - "avatar_URL": "https://0.gravatar.com/avatar/9ba48385fc40dfd9a55a3348d8e7f4d9?s=96&d=identicon&r=G", - "profile_URL": "https://en.gravatar.com/thenomadicwordsmith", - "site_ID": 71769073 - }, - "date": "2019-01-01T21:54:15+00:00", - "modified": "2019-03-21T17:20:44+00:00", - "title": "Book Your Summer Sessions", - "URL": "http://infocusphotographers.com/?p=225", - "short_URL": "https://wp.me/p7dJAQ-3D", - "content": "\n

“One must maintain a little bit of summer, even in the middle of winter.

– Henry David Thoreau
\n\n\n\n

Blue skies and warm weather, what's not to love about summer? It's a great season for outdoor family portrait sessions and now is the time to book them!

\n\n\n\n

We offer a number of family portrait packages and for a limited time are offering 15% off packages booked before April 1.

\n\n\n\n
\"beach-children-family-39691\"
\n\n\n\n

How to book

\n\n\n\n

Email us to set up a time to visit our studio.

\n", - "excerpt": "", - "slug": "__trashed-2", - "guid": "http://infocusphotographers.com/?p=225", - "status": "draft", - "sticky": false, - "password": "", - "parent": false, - "type": "post", - "discussion": { - "comments_open": true, - "comment_status": "open", - "pings_open": true, - "ping_status": "open", - "comment_count": 0 - }, - "likes_enabled": true, - "sharing_enabled": true, - "like_count": 0, - "i_like": false, - "is_reblogged": false, - "is_following": false, - "global_ID": "2d07f957bcc110149b8aa37bd1231ad1", - "featured_image": "", - "post_thumbnail": null, - "format": "standard", - "geo": false, - "menu_order": 0, - "page_template": "", - "publicize_URLs": [ - - ], - "terms": { - "category": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" - } - } - } - }, - "post_tag": { - }, - "post_format": { - }, - "mentions": { - } - }, - "tags": { - }, - "categories": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" - } - } - } - }, - "attachments": { - "243": { - "ID": 243, - "URL": "https://infocusphotographers.files.wordpress.com/2019/01/beach-children-family-39691.jpg", - "guid": "http://infocusphotographers.files.wordpress.com/2019/01/beach-children-family-39691.jpg", - "date": "2019-03-20T23:56:52+00:00", - "post_ID": 225, - "author_ID": 14151046, - "file": "beach-children-family-39691.jpg", - "mime_type": "image/jpeg", - "extension": "jpg", - "title": "beach-children-family-39691", - "caption": "", - "description": "", - "alt": "", - "thumbnails": { - "thumbnail": "https://infocusphotographers.files.wordpress.com/2019/01/beach-children-family-39691.jpg?w=150", - "medium": "https://infocusphotographers.files.wordpress.com/2019/01/beach-children-family-39691.jpg?w=300", - "large": "https://infocusphotographers.files.wordpress.com/2019/01/beach-children-family-39691.jpg?w=1024" - }, - "height": 2446, - "width": 3669, - "exif": { - "aperture": "0", - "credit": "", - "camera": "", - "caption": "", - "created_timestamp": "0", - "copyright": "", - "focal_length": "0", - "iso": "0", - "shutter_speed": "0", - "title": "", - "orientation": "0", - "keywords": [ - - ] - }, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/media/243", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/media/243/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880", - "parent": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/225" - } - } - } - }, - "attachment_count": 1, - "metadata": [ - { - "id": "558", - "key": "_edit_lock", - "value": "1559077412:742098" - }, - { - "id": "468", - "key": "_wp_desired_post_slug", - "value": "" - } - ], - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/225", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/posts/225/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880", - "replies": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/225/replies/", - "likes": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/225/likes/" - } - }, - "capabilities": { - "publish_post": true, - "delete_post": true, - "edit_post": true - }, - "revisions": [ - 271, - 235, - 229, - 228, - 227, - 226 - ], - "other_URLs": { - "permalink_URL": "http://infocusphotographers.com/2019/01/01/%postname%/", - "suggested_slug": "__trashed-2" - } - } - ], - "meta": { - "links": { - "counts": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/post-counts/post" - }, - "wpcom": true - } - } - } -} \ No newline at end of file diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-first.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-first.json deleted file mode 100644 index 99bef23f4ce7..000000000000 --- a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-first.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "request": { - "method": "GET", - "urlPattern": "/rest/v1.1/sites/.*/posts/.*", - "queryParameters": { - "locale": { - "matches": "(.*)" - }, - "fields": { - "equalTo": "ID, title, URL, discussion, like_count, date" - }, - "number": { - "matches": "1" - }, - "order_by": { - "equalTo": "date" - }, - "type": { - "equalTo": "post" - } - } - }, - "response": { - "status": 200, - "fixedDelayMilliseconds": 1000, - "jsonBody": { - "found": 2, - "posts": [ - { - "ID": 106, - "date": "2016-04-19T21:28:27+00:00", - "title": "Some News to Share", - "URL": "http://infocusphotographers.com/2016/04/19/some-news-to-share/", - "discussion": { - "comments_open": true, - "comment_status": "open", - "pings_open": true, - "ping_status": "open", - "comment_count": 0 - }, - "like_count": 0 - } - ], - "meta": { - "links": { - "counts": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/post-counts/post" - }, - "next_page": "value=2016-04-19T21%3A28%3A27%2B00%3A00&id=106", - "wpcom": true - } - }, - "headers": { - "Content-Type": "application/json", - "Connection": "keep-alive", - "Cache-Control": "no-cache, must-revalidate, max-age=0" - } - }, - "scenarioName": "new-post", - "newScenarioState": "Post Published" -} \ No newline at end of file diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-future.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-future.json deleted file mode 100644 index 36a6269b1b62..000000000000 --- a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-future.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "request": { - "method": "GET", - "urlPath": "/rest/v1.1/sites/106707880/posts/", - "queryParameters": { - "number": { - "equalTo": "60" - }, - "context": { - "equalTo": "edit" - }, - "order_by": { - "equalTo": "date" - }, - "fields": { - "matches": "ID,modified,status(,meta)?(,date)?" - }, - "order": { - "equalTo": "DESC" - }, - "status": { - "equalTo": "future" - }, - "locale": { - "matches": "(.*)" - } - } - }, - "response": { - "status": 200, - "jsonBody": { - "found": 0, - "posts": [ - - ], - "meta": { - "links": { - "counts": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/post-counts/post" - }, - "wpcom": true - } - } - } -} \ No newline at end of file diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-new-after.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-new-after.json index 5dd572a60bdc..e149f56bc87f 100644 --- a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-new-after.json +++ b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-new-after.json @@ -1,56 +1,146 @@ { - "request": { - "method": "GET", - "urlPattern": "/rest/v1.1/sites/106707880/posts(/)\\?($|\\?.*)", - "queryParameters": { - "context": { - "equalTo": "edit" - }, - "status": { - "equalTo": "publish,private" - } - } - }, - "response": { - "status": 200, - "jsonBody": { - "found": 4, - "posts": [ - { - "ID": 5, - "modified": "2019-03-12T15:00:53+00:00", - "status": "publish" - }, - { - "ID": 237, - "modified": "2019-03-21T17:19:25+00:00", - "status": "private" - }, - { - "ID": 106, - "modified": "2018-03-23T00:20:36+00:00", - "status": "publish" - }, - { - "ID": 90, - "modified": "2016-03-16T02:01:50+00:00", - "status": "publish" + "request": { + "method": "POST", + "urlPattern": "/rest/v1.2/sites/106707880/posts/5?($|\\?.*)", + "queryParameters": { + "context": { + "equalTo": "edit" } - ], - "meta": { - "links": { - "counts": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/post-counts/post" + } + }, + "response": { + "status": 200, + "fixedDelayMilliseconds": 1000, + "jsonBody": { + "ID": 5, + "site_ID": 106707880, + "author": { + "ID": 152748359, + "login": "e2eflowtestingmobile", + "email": "e2eflowtestingmobile@example.com", + "name": "e2eflowtestingmobile", + "first_name": "", + "last_name": "", + "nice_name": "e2eflowtestingmobile", + "URL": "https://infocusphotographers.com", + "avatar_URL": "https://1.gravatar.com/avatar/7a4015c11be6a342f65e0e169092d402?s=96&d=identicon&r=G", + "profile_URL": "http://en.gravatar.com/e2eflowtestingmobile", + "site_ID": 1 + }, + "date": "{{#assign 'customformat'}}yyyy-MM-dd'T'HH:mm:ss{{/assign}}{{now format=customformat}}", + "modified": "{{now format=customformat}}", + "title": "{{jsonPath request.body '$.title'}}", + "URL": "https://lowtestingmobile.wordpress.com/2019/03/12/title-33/", + "short_URL": "https://e/paIC9Y-1r", + "content": "\n

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam congue efficitur leo eget porta.

\n", + "excerpt": "", + "slug": "title-33", + "guid": "https://infocusphotographers.com/2019/03/12/title-33/", + "status": "publish", + "sticky": false, + "password": "", + "parent": false, + "type": "post", + "discussion": { + "comments_open": true, + "comment_status": "open", + "pings_open": true, + "ping_status": "open", + "comment_count": 0 + }, + "likes_enabled": true, + "sharing_enabled": true, + "like_count": 0, + "i_like": false, + "is_reblogged": false, + "is_following": true, + "global_ID": "127876e9017a09034bcf41ee80428027", + "featured_image": "", + "post_thumbnail": null, + "format": "standard", + "geo": false, + "menu_order": 0, + "page_template": "", + "publicize_URLs": [ + + ], + "terms": { + "category": { + "Uncategorized": { + "ID": 1, + "name": "Uncategorized", + "slug": "uncategorized", + "description": "", + "post_count": 82, + "parent": 0, + "meta": { + "links": { + "self": "https://public-api.wordpress.com/rest/v1.1/sites/106707880/categories/slug:uncategorized", + "help": "https://public-api.wordpress.com/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", + "site": "https://public-api.wordpress.com/rest/v1.2/sites/106707880" + } + } + } + }, + "post_tag": { + }, + "post_format": { + }, + "mentions": { + } + }, + "tags": { }, - "next_page": "value=&id=29", - "wpcom": true + "categories": { + "Uncategorized": { + "ID": 1, + "name": "Uncategorized", + "slug": "uncategorized", + "description": "", + "post_count": 82, + "parent": 0, + "meta": { + "links": { + "self": "https://public-api.wordpress.com/rest/v1.1/sites/106707880/categories/slug:uncategorized", + "help": "https://public-api.wordpress.com/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", + "site": "https://public-api.wordpress.com/rest/v1.2/sites/106707880" + } + } + } + }, + "attachments": { + }, + "attachment_count": 0, + "metadata": [ + { + "id": "909", + "key": "jabber_published", + "value": "1552402855" + } + ], + "meta": { + "links": { + "self": "https://public-api.wordpress.com/rest/v1.1/sites/106707880/posts/5", + "help": "https://public-api.wordpress.com/rest/v1.2/sites/106707880/posts/5/help", + "site": "https://public-api.wordpress.com/rest/v1.2/sites/106707880", + "replies": "https://public-api.wordpress.com/rest/v1.1/sites/106707880/posts/5/replies/", + "likes": "https://public-api.wordpress.com/rest/v1.1/sites/106707880/posts/5/likes/" + } + }, + "capabilities": { + "publish_post": true, + "delete_post": true, + "edit_post": true + }, + "other_URLs": { + } + }, + "headers": { + "Content-Type": "application/json", + "Connection": "keep-alive", + "Cache-Control": "no-cache, must-revalidate, max-age=0" } }, - "headers": { - "Content-Type": "application/json", - "Connection": "keep-alive", - "Cache-Control": "no-cache, must-revalidate, max-age=0" - } - }, - "scenarioName": "new-post", - "requiredScenarioState": "Post Published" -} \ No newline at end of file + "scenarioName": "new-post", + "newScenarioState": "Post Published" + } \ No newline at end of file diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-new-scheduled-after.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-new-scheduled-after.json new file mode 100644 index 000000000000..af305e34c97d --- /dev/null +++ b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-new-scheduled-after.json @@ -0,0 +1,145 @@ +{ + "request": { + "method": "POST", + "urlPattern": "/rest/v1.2/sites/181977606/posts/15?($|\\?.*)", + "queryParameters": { + "context": { + "equalTo": "edit" + } + } + }, + "response": { + "status": 200, + "jsonBody": { + "ID": 15, + "site_ID": 181977606, + "author": { + "ID": 152748359, + "login": "e2eflowtestingmobile", + "email": "e2eflowtestingmobile@example.com", + "name": "e2eflowtestingmobile", + "first_name": "", + "last_name": "", + "nice_name": "e2eflowtestingmobile", + "URL": "https://infocusphotographers.com", + "avatar_URL": "https://1.gravatar.com/avatar/7a4015c11be6a342f65e0e169092d402?s=96&d=identicon&r=G", + "profile_URL": "http://en.gravatar.com/e2eflowtestingmobile", + "site_ID": 1 + }, + "date": "{{#assign 'customformat'}}yyyy-MM-dd'T'HH:mm:ss{{/assign}}{{now offset='+2 hours' format=customformat}}", + "modified": "{{now offset='+2 hours' format=customformat}}", + "title": "{{jsonPath request.body '$.title'}}", + "URL": "https://lowtestingmobile.wordpress.com/2019/03/12/title-33/", + "short_URL": "https://e/paIC9Y-1r", + "content": "\n

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam congue efficitur leo eget porta.

\n", + "excerpt": "", + "slug": "title-33", + "guid": "https://infocusphotographers.com/2019/03/12/title-33/", + "status": "future", + "sticky": false, + "password": "", + "parent": false, + "type": "post", + "discussion": { + "comments_open": true, + "comment_status": "open", + "pings_open": true, + "ping_status": "open", + "comment_count": 0 + }, + "likes_enabled": true, + "sharing_enabled": true, + "like_count": 0, + "i_like": false, + "is_reblogged": false, + "is_following": true, + "global_ID": "127876e9017a09034bcf41ee80428027", + "featured_image": "", + "post_thumbnail": null, + "format": "standard", + "geo": false, + "menu_order": 0, + "page_template": "", + "publicize_URLs": [ + + ], + "terms": { + "category": { + "Uncategorized": { + "ID": 1, + "name": "Uncategorized", + "slug": "uncategorized", + "description": "", + "post_count": 82, + "parent": 0, + "meta": { + "links": { + "self": "https://public-api.wordpress.com/rest/v1.1/sites/181977606/categories/slug:uncategorized", + "help": "https://public-api.wordpress.com/rest/v1.2/sites/181977606/categories/slug:uncategorized/help", + "site": "https://public-api.wordpress.com/rest/v1.2/sites/181977606" + } + } + } + }, + "post_tag": { + }, + "post_format": { + }, + "mentions": { + } + }, + "tags": { + }, + "categories": { + "Uncategorized": { + "ID": 1, + "name": "Uncategorized", + "slug": "uncategorized", + "description": "", + "post_count": 82, + "parent": 0, + "meta": { + "links": { + "self": "https://public-api.wordpress.com/rest/v1.1/sites/181977606/categories/slug:uncategorized", + "help": "https://public-api.wordpress.com/rest/v1.2/sites/181977606/categories/slug:uncategorized/help", + "site": "https://public-api.wordpress.com/rest/v1.2/sites/181977606" + } + } + } + }, + "attachments": { + }, + "attachment_count": 0, + "metadata": [ + { + "id": "909", + "key": "jabber_published", + "value": "1552402855" + } + ], + "meta": { + "links": { + "self": "https://public-api.wordpress.com/rest/v1.1/sites/181977606/posts/5", + "help": "https://public-api.wordpress.com/rest/v1.2/sites/181977606/posts/5/help", + "site": "https://public-api.wordpress.com/rest/v1.2/sites/181977606", + "replies": "https://public-api.wordpress.com/rest/v1.1/sites/181977606/posts/5/replies/", + "likes": "https://public-api.wordpress.com/rest/v1.1/sites/181977606/posts/5/likes/" + } + }, + "capabilities": { + "publish_post": true, + "delete_post": true, + "edit_post": true + }, + "other_URLs": { + } + }, + "headers": { + "Content-Type": "application/json", + "Connection": "keep-alive", + "Cache-Control": "no-cache, must-revalidate, max-age=0" + } + }, + "scenarioName": "new-scheduled-post", + "requiredScenarioState": "Scheduled Post Published" + } \ No newline at end of file diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-new-scheduled.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-new-scheduled.json new file mode 100644 index 000000000000..7391a5adf318 --- /dev/null +++ b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-new-scheduled.json @@ -0,0 +1,146 @@ +{ + "request": { + "method": "POST", + "urlPattern": "/rest/v1.2/sites/181977606/posts/new?($|\\?.*)", + "queryParameters": { + "context": { + "equalTo": "edit" + } + } + }, + "response": { + "status": 200, + "fixedDelayMilliseconds": 1000, + "jsonBody": { + "ID": 15, + "site_ID": 181977606, + "author": { + "ID": 152748359, + "login": "e2eflowtestingmobile", + "email": "e2eflowtestingmobile@example.com", + "name": "e2eflowtestingmobile", + "first_name": "", + "last_name": "", + "nice_name": "e2eflowtestingmobile", + "URL": "https://infocusphotographers.com", + "avatar_URL": "https://1.gravatar.com/avatar/7a4015c11be6a342f65e0e169092d402?s=96&d=identicon&r=G", + "profile_URL": "http://en.gravatar.com/e2eflowtestingmobile", + "site_ID": 1 + }, + "date": "{{#assign 'customformat'}}yyyy-MM-dd'T'HH:mm:ss{{/assign}}{{now offset='+2 hours' format=customformat}}", + "modified": "{{now offset='+2 hours' format=customformat}}", + "title": "{{jsonPath request.body '$.title'}}", + "URL": "https://lowtestingmobile.wordpress.com/2019/03/12/title-33/", + "short_URL": "https://e/paIC9Y-1r", + "content": "\n

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam congue efficitur leo eget porta.

\n", + "excerpt": "", + "slug": "title-33", + "guid": "https://infocusphotographers.com/2019/03/12/title-33/", + "status": "future", + "sticky": false, + "password": "", + "parent": false, + "type": "post", + "discussion": { + "comments_open": true, + "comment_status": "open", + "pings_open": true, + "ping_status": "open", + "comment_count": 0 + }, + "likes_enabled": true, + "sharing_enabled": true, + "like_count": 0, + "i_like": false, + "is_reblogged": false, + "is_following": true, + "global_ID": "127876e9017a09034bcf41ee80428027", + "featured_image": "", + "post_thumbnail": null, + "format": "standard", + "geo": false, + "menu_order": 0, + "page_template": "", + "publicize_URLs": [ + + ], + "terms": { + "category": { + "Uncategorized": { + "ID": 1, + "name": "Uncategorized", + "slug": "uncategorized", + "description": "", + "post_count": 82, + "parent": 0, + "meta": { + "links": { + "self": "https://public-api.wordpress.com/rest/v1.1/sites/181977606/categories/slug:uncategorized", + "help": "https://public-api.wordpress.com/rest/v1.2/sites/181977606/categories/slug:uncategorized/help", + "site": "https://public-api.wordpress.com/rest/v1.2/sites/181977606" + } + } + } + }, + "post_tag": { + }, + "post_format": { + }, + "mentions": { + } + }, + "tags": { + }, + "categories": { + "Uncategorized": { + "ID": 1, + "name": "Uncategorized", + "slug": "uncategorized", + "description": "", + "post_count": 82, + "parent": 0, + "meta": { + "links": { + "self": "https://public-api.wordpress.com/rest/v1.1/sites/181977606/categories/slug:uncategorized", + "help": "https://public-api.wordpress.com/rest/v1.2/sites/181977606/categories/slug:uncategorized/help", + "site": "https://public-api.wordpress.com/rest/v1.2/sites/181977606" + } + } + } + }, + "attachments": { + }, + "attachment_count": 0, + "metadata": [ + { + "id": "909", + "key": "jabber_published", + "value": "1552402855" + } + ], + "meta": { + "links": { + "self": "https://public-api.wordpress.com/rest/v1.1/sites/181977606/posts/5", + "help": "https://public-api.wordpress.com/rest/v1.2/sites/181977606/posts/5/help", + "site": "https://public-api.wordpress.com/rest/v1.2/sites/181977606", + "replies": "https://public-api.wordpress.com/rest/v1.1/sites/181977606/posts/5/replies/", + "likes": "https://public-api.wordpress.com/rest/v1.1/sites/181977606/posts/5/likes/" + } + }, + "capabilities": { + "publish_post": true, + "delete_post": true, + "edit_post": true + }, + "other_URLs": { + } + }, + "headers": { + "Content-Type": "application/json", + "Connection": "keep-alive", + "Cache-Control": "no-cache, must-revalidate, max-age=0" + } + }, + "scenarioName": "new-scheduled-post", + "newScenarioState": "Scheduled Post Published" + } \ No newline at end of file diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-new.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-new.json index e9bbdb4c3058..1c605251f963 100644 --- a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-new.json +++ b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-new.json @@ -1,7 +1,7 @@ { "request": { "method": "POST", - "urlPattern": "/rest/v1.2/sites/.*/posts/new(/)?($|\\?.*)", + "urlPattern": "/rest/v1.2/sites/106707880/posts/new?($|\\?.*)", "queryParameters": { "context": { "equalTo": "edit" @@ -27,8 +27,8 @@ "profile_URL": "http://en.gravatar.com/e2eflowtestingmobile", "site_ID": 1 }, - "date": "2019-03-12T15:00:53+00:00", - "modified": "2019-03-12T15:00:53+00:00", + "date": "{{#assign 'customformat'}}yyyy-MM-dd'T'HH:mm:ss{{/assign}}{{now format=customformat}}", + "modified": "{{now format=customformat}}", "title": "{{jsonPath request.body '$.title'}}", "URL": "https://lowtestingmobile.wordpress.com/2019/03/12/title-33/", "short_URL": "https://e/paIC9Y-1r", @@ -75,9 +75,9 @@ "parent": 0, "meta": { "links": { - "self": "https://ic-api.wordpress.com/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "https://ic-api.wordpress.com/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", - "site": "https://ic-api.wordpress.com/rest/v1.2/sites/106707880" + "self": "https://public-api.wordpress.com/rest/v1.1/sites/106707880/categories/slug:uncategorized", + "help": "https://public-api.wordpress.com/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", + "site": "https://public-api.wordpress.com/rest/v1.2/sites/106707880" } } } @@ -101,9 +101,9 @@ "parent": 0, "meta": { "links": { - "self": "https://ic-api.wordpress.com/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "https://ic-api.wordpress.com/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", - "site": "https://ic-api.wordpress.com/rest/v1.2/sites/106707880" + "self": "https://public-api.wordpress.com/rest/v1.1/sites/106707880/categories/slug:uncategorized", + "help": "https://public-api.wordpress.com/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", + "site": "https://public-api.wordpress.com/rest/v1.2/sites/106707880" } } } @@ -120,11 +120,11 @@ ], "meta": { "links": { - "self": "https://ic-api.wordpress.com/rest/v1.1/sites/106707880/posts/5", - "help": "https://ic-api.wordpress.com/rest/v1.2/sites/106707880/posts/5/help", - "site": "https://ic-api.wordpress.com/rest/v1.2/sites/106707880", - "replies": "https://ic-api.wordpress.com/rest/v1.1/sites/106707880/posts/5/replies/", - "likes": "https://ic-api.wordpress.com/rest/v1.1/sites/106707880/posts/5/likes/" + "self": "https://public-api.wordpress.com/rest/v1.1/sites/106707880/posts/5", + "help": "https://public-api.wordpress.com/rest/v1.2/sites/106707880/posts/5/help", + "site": "https://public-api.wordpress.com/rest/v1.2/sites/106707880", + "replies": "https://public-api.wordpress.com/rest/v1.1/sites/106707880/posts/5/replies/", + "likes": "https://public-api.wordpress.com/rest/v1.1/sites/106707880/posts/5/likes/" } }, "capabilities": { diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-private,publish.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-private,publish.json index dcb60cf5f74e..f4209469721d 100644 --- a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-private,publish.json +++ b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-private,publish.json @@ -1,28 +1,25 @@ { "request": { "method": "GET", - "urlPath": "/rest/v1.1/sites/106707880/posts/", + "urlPattern": "/rest/v1.2/sites/.*/posts.*", "queryParameters": { - "number": { - "equalTo": "60" + "locale": { + "matches": "(.*)" }, "context": { "equalTo": "edit" }, - "order_by": { - "equalTo": "date" - }, - "fields": { - "equalTo": "ID,modified,status,meta,date" + "meta": { + "equalTo": "autosave" }, - "order": { - "equalTo": "DESC" + "number": { + "matches": "(.*)" }, "status": { "equalTo": "publish,private" }, - "locale": { - "matches": "(.*)" + "type": { + "equalTo": "post" } } }, @@ -33,23 +30,645 @@ "posts": [ { "ID": 237, + "site_ID": 106707880, + "author": { + "ID": 68646169, + "login": "thenomadicwordsmith", + "email": "thenomadicwordsmith@gmail.com", + "name": "thenomadicwordsmith", + "first_name": "Nomadic", + "last_name": "Wordsmith", + "nice_name": "thenomadicwordsmith", + "URL": "http://thenomadicwordsmith.wordpress.com", + "avatar_URL": "https://0.gravatar.com/avatar/9ba48385fc40dfd9a55a3348d8e7f4d9?s=96&d=identicon&r=G", + "profile_URL": "https://en.gravatar.com/thenomadicwordsmith", + "site_ID": 71769073 + }, + "date": "2019-03-13T23:48:58+00:00", "modified": "2019-03-21T17:19:25+00:00", - "status": "private" + "title": "Photo Contest", + "URL": "http://infocusphotographers.com/2019/03/13/some-news-to-share-2/", + "short_URL": "https://wp.me/p7dJAQ-3P", + "content": "\n

In Focus Photography was nominated for an international photo award!

\n\n\n\n

Please vote for us!

\n", + "excerpt": "", + "slug": "some-news-to-share-2", + "guid": "http://infocusphotographers.com/?p=237", + "status": "private", + "sticky": false, + "password": "", + "parent": false, + "type": "post", + "discussion": { + "comments_open": true, + "comment_status": "open", + "pings_open": true, + "ping_status": "open", + "comment_count": 0 + }, + "likes_enabled": true, + "sharing_enabled": true, + "like_count": 0, + "i_like": false, + "is_reblogged": false, + "is_following": false, + "global_ID": "9dc6f7941b6a68fc2323b652c4e9516b", + "featured_image": "https://infocusphotographers.files.wordpress.com/2019/03/art-bright-celebration-1313817.jpg", + "post_thumbnail": { + "ID": 238, + "URL": "https://infocusphotographers.files.wordpress.com/2019/03/art-bright-celebration-1313817.jpg", + "guid": "http://infocusphotographers.files.wordpress.com/2019/03/art-bright-celebration-1313817.jpg", + "mime_type": "image/jpeg", + "width": 4256, + "height": 2628 + }, + "format": "standard", + "geo": false, + "menu_order": 0, + "page_template": "", + "publicize_URLs": [ + + ], + "terms": { + "category": { + "Uncategorized": { + "ID": 1, + "name": "Uncategorized", + "slug": "uncategorized", + "description": "", + "post_count": 1, + "parent": 0, + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" + } + } + } + }, + "post_tag": { + }, + "post_format": { + }, + "mentions": { + } + }, + "tags": { + }, + "categories": { + "Uncategorized": { + "ID": 1, + "name": "Uncategorized", + "slug": "uncategorized", + "description": "", + "post_count": 1, + "parent": 0, + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" + } + } + } + }, + "attachments": { + "238": { + "ID": 238, + "URL": "https://infocusphotographers.files.wordpress.com/2019/03/art-bright-celebration-1313817.jpg", + "guid": "http://infocusphotographers.files.wordpress.com/2019/03/art-bright-celebration-1313817.jpg", + "date": "2019-03-20T23:44:49+00:00", + "post_ID": 237, + "author_ID": 14151046, + "file": "art-bright-celebration-1313817.jpg", + "mime_type": "image/jpeg", + "extension": "jpg", + "title": "art-bright-celebration-1313817", + "caption": "", + "description": "", + "alt": "", + "thumbnails": { + "thumbnail": "https://infocusphotographers.files.wordpress.com/2019/03/art-bright-celebration-1313817.jpg?w=150", + "medium": "https://infocusphotographers.files.wordpress.com/2019/03/art-bright-celebration-1313817.jpg?w=300", + "large": "https://infocusphotographers.files.wordpress.com/2019/03/art-bright-celebration-1313817.jpg?w=1024" + }, + "height": 2628, + "width": 4256, + "exif": { + "aperture": "0", + "credit": "", + "camera": "", + "caption": "", + "created_timestamp": "0", + "copyright": "", + "focal_length": "0", + "iso": "0", + "shutter_speed": "0", + "title": "", + "orientation": "0", + "keywords": [ + + ] + }, + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/media/238", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/media/238/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880", + "parent": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/237" + } + } + } + }, + "attachment_count": 1, + "metadata": [ + { + "id": "493", + "key": "email_notification", + "value": "1553125740" + }, + { + "id": "486", + "key": "jabber_published", + "value": "1553125739" + }, + { + "id": "491", + "key": "timeline_notification", + "value": "1553125810" + }, + { + "id": "557", + "key": "_edit_lock", + "value": "1553188814:68646169" + }, + { + "id": "492", + "key": "_publicize_job_id", + "value": "28865445244" + }, + { + "id": "490", + "key": "_rest_api_client_id", + "value": "-1" + }, + { + "id": "489", + "key": "_rest_api_published", + "value": "1" + }, + { + "id": "484", + "key": "_thumbnail_id", + "value": "238" + } + ], + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/237", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/posts/237/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880", + "replies": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/237/replies/", + "likes": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/237/likes/" + } + }, + "capabilities": { + "publish_post": true, + "delete_post": true, + "edit_post": true + }, + "revisions": [ + 269, + 263, + 239 + ], + "other_URLs": { + "permalink_URL": "http://infocusphotographers.com/2019/03/13/%postname%/", + "suggested_slug": "some-news-to-share-2" + } }, { "ID": 106, + "site_ID": 106707880, + "author": { + "ID": 100907762, + "login": "leahelainerand", + "email": "andreazoellner+leahrand@gmail.com", + "name": "Leah Elaine Rand", + "first_name": "Leah", + "last_name": "Rand", + "nice_name": "leahelainerand", + "URL": "", + "avatar_URL": "https://0.gravatar.com/avatar/62937c26a2a79bae5921ca9e85be8040?s=96&d=identicon&r=G", + "profile_URL": "https://en.gravatar.com/leahelainerand", + "site_ID": 106523982 + }, + "date": "2016-04-19T21:28:27+00:00", "modified": "2018-03-23T00:20:36+00:00", - "status": "publish" + "title": "Some News to Share", + "URL": "http://infocusphotographers.com/2016/04/19/some-news-to-share/", + "short_URL": "https://wp.me/p7dJAQ-1I", + "content": "John was shortlisted for the World Press Photo competition, an international celebration of the best photojournalism of the year.\n\nhttps://twitter.com/wordpressdotcom/status/702181837079187456", + "excerpt": "", + "slug": "some-news-to-share", + "guid": "https://infocusphotographers.wordpress.com/?p=106", + "status": "publish", + "sticky": false, + "password": "", + "parent": false, + "type": "post", + "discussion": { + "comments_open": true, + "comment_status": "open", + "pings_open": true, + "ping_status": "open", + "comment_count": 0 + }, + "likes_enabled": true, + "sharing_enabled": true, + "like_count": 0, + "i_like": false, + "is_reblogged": false, + "is_following": false, + "global_ID": "3a10a002b4f389596205c24992732a3e", + "featured_image": "https://infocusphotographers.files.wordpress.com/2016/02/photo-1449761485030-c9bf16154670.jpg", + "post_thumbnail": { + "ID": 62, + "URL": "https://infocusphotographers.files.wordpress.com/2016/02/photo-1449761485030-c9bf16154670.jpg", + "guid": "http://infocusphotographers.files.wordpress.com/2016/02/photo-1449761485030-c9bf16154670.jpg", + "mime_type": "image/jpeg", + "width": 1080, + "height": 720 + }, + "format": "standard", + "geo": false, + "menu_order": 0, + "page_template": "", + "publicize_URLs": [ + + ], + "terms": { + "category": { + "Uncategorized": { + "ID": 1, + "name": "Uncategorized", + "slug": "uncategorized", + "description": "", + "post_count": 1, + "parent": 0, + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" + } + } + } + }, + "post_tag": { + }, + "post_format": { + }, + "mentions": { + } + }, + "tags": { + }, + "categories": { + "Uncategorized": { + "ID": 1, + "name": "Uncategorized", + "slug": "uncategorized", + "description": "", + "post_count": 1, + "parent": 0, + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" + } + } + } + }, + "attachments": { + }, + "attachment_count": 0, + "metadata": [ + { + "id": "254", + "key": "jabber_published", + "value": "1461101308" + }, + { + "id": "267", + "key": "_oembed_00ce3f36d70c72c174774d1222895a08", + "value": "

Congrats to the photojournalists on WordPress who won #WPPh16 @WorldPressPhoto prizes: https://t.co/9ya2boX1Yy pic.twitter.com/ZFAHNngh1f

— WordPress.com (@wordpressdotcom) February 23, 2016
" + }, + { + "id": "294", + "key": "_oembed_33aac0b04f7a7bc31eec252936d4ae4a", + "value": "

Congrats to the photojournalists on WordPress who won #WPPh16 @WorldPressPhoto prizes: https://t.co/9ya2boX1Yy pic.twitter.com/ZFAHNngh1f

— WordPress.com (@wordpressdotcom) February 23, 2016
" + }, + { + "id": "257", + "key": "_oembed_4e3318c4371cf9880f6705450efd7fe6", + "value": "

Congrats to the photojournalists on WordPress who won #WPPh16 @WorldPressPhoto prizes: https://t.co/9ya2boX1Yy pic.twitter.com/ZFAHNngh1f

— WordPress.com (@wordpressdotcom) February 23, 2016
" + }, + { + "id": "251", + "key": "_oembed_8655c52bd5f940727d92329c248de249", + "value": "

Congrats to the photojournalists on WordPress who won #WPPh16 @WorldPressPhoto prizes: https://t.co/9ya2boX1Yy pic.twitter.com/ZFAHNngh1f

— WordPress.com (@wordpressdotcom) February 23, 2016
" + }, + { + "id": "262", + "key": "_oembed_eb2de30a8aa65d93ca387e4a12fd9f06", + "value": "

Congrats to the photojournalists on WordPress who won #WPPh16 @WorldPressPhoto prizes: https://t.co/9ya2boX1Yy pic.twitter.com/ZFAHNngh1f

— WordPress.com (@wordpressdotcom) February 23, 2016
" + }, + { + "id": "268", + "key": "_oembed_time_00ce3f36d70c72c174774d1222895a08", + "value": "1461200444" + }, + { + "id": "295", + "key": "_oembed_time_33aac0b04f7a7bc31eec252936d4ae4a", + "value": "1521764439" + }, + { + "id": "258", + "key": "_oembed_time_4e3318c4371cf9880f6705450efd7fe6", + "value": "1461101310" + }, + { + "id": "252", + "key": "_oembed_time_8655c52bd5f940727d92329c248de249", + "value": "1461101270" + }, + { + "id": "263", + "key": "_oembed_time_eb2de30a8aa65d93ca387e4a12fd9f06", + "value": "1461101311" + }, + { + "id": "261", + "key": "_publicize_job_id", + "value": "21955598041" + }, + { + "id": "260", + "key": "_rest_api_client_id", + "value": "-1" + }, + { + "id": "259", + "key": "_rest_api_published", + "value": "1" + }, + { + "id": "266", + "key": "_thumbnail_id", + "value": "62" + } + ], + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/106", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/posts/106/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880", + "replies": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/106/replies/", + "likes": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/106/likes/", + "autosave": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/106/autosave" + }, + "data": { + "autosave": { + "ID": 262, + "author_ID": "14151046", + "post_ID": 106, + "title": "Photo Contest", + "content": "John was shortlisted for the World Press Photo competition, an international celebration of the best photojournalism of the year.\n\nhttps://twitter.com/wordpressdotcom/status/702181837079187456", + "excerpt": "", + "preview_URL": "http://infocusphotographers.com/2016/04/19/some-news-to-share/?preview=true&preview_nonce=ef0913f6c4", + "modified": "2019-03-21T00:23:25+00:00" + } + } + }, + "capabilities": { + "publish_post": true, + "delete_post": true, + "edit_post": true + }, + "revisions": [ + 262, + 109, + 108, + 107 + ], + "other_URLs": { + } }, { "ID": 90, + "site_ID": 106707880, + "author": { + "ID": 100907762, + "login": "leahelainerand", + "email": "andreazoellner+leahrand@gmail.com", + "name": "Leah Elaine Rand", + "first_name": "Leah", + "last_name": "Rand", + "nice_name": "leahelainerand", + "URL": "", + "avatar_URL": "https://0.gravatar.com/avatar/62937c26a2a79bae5921ca9e85be8040?s=96&d=identicon&r=G", + "profile_URL": "https://en.gravatar.com/leahelainerand", + "site_ID": 106523982 + }, + "date": "2016-03-07T18:32:11+00:00", "modified": "2016-03-16T02:01:50+00:00", - "status": "publish" + "title": "Martin and Amy's Wedding", + "URL": "http://infocusphotographers.com/2016/03/07/martin-and-amys-wedding/", + "short_URL": "https://wp.me/p7dJAQ-1s", + "content": "Martin and Amy are a wonderful couple that John and I were lucky to photograph. The theme for their wedding was sophisticated but warm and everything had a clearly personal touch.\n\nThey decided they wanted the bulk of their wedding photos to be black and white. While some couples like personal, goofy photos, Amy and Martin found a perfect balance between classic elegance and shots with personality.\n\n \n\nhttps://www.instagram.com/p/BCF4Z6UjRjE/?taken-by=photomatt\n\n \n\nhttps://www.instagram.com/p/8qwIAWDRum/?taken-by=photomatt\n\n ", + "excerpt": "", + "slug": "martin-and-amys-wedding", + "guid": "https://infocusphotographers.wordpress.com/?p=90", + "status": "publish", + "sticky": false, + "password": "", + "parent": false, + "type": "post", + "discussion": { + "comments_open": true, + "comment_status": "open", + "pings_open": true, + "ping_status": "open", + "comment_count": 0 + }, + "likes_enabled": true, + "sharing_enabled": true, + "like_count": 0, + "i_like": false, + "is_reblogged": false, + "is_following": false, + "global_ID": "8ffbda2c616a90c6b92efe4fb016fe95", + "featured_image": "https://infocusphotographers.files.wordpress.com/2016/02/photo-1453857271477-4f9a4081966e1.jpeg", + "post_thumbnail": { + "ID": 82, + "URL": "https://infocusphotographers.files.wordpress.com/2016/02/photo-1453857271477-4f9a4081966e1.jpeg", + "guid": "http://infocusphotographers.files.wordpress.com/2016/02/photo-1453857271477-4f9a4081966e1.jpeg", + "mime_type": "image/jpeg", + "width": 3853, + "height": 2384 + }, + "format": "standard", + "geo": false, + "menu_order": 0, + "page_template": "", + "publicize_URLs": [ + + ], + "terms": { + "category": { + "Wedding": { + "ID": 1674, + "name": "Wedding", + "slug": "wedding", + "description": "", + "post_count": 1, + "parent": 0, + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:wedding", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:wedding/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" + } + } + } + }, + "post_tag": { + }, + "post_format": { + }, + "mentions": { + } + }, + "tags": { + }, + "categories": { + "Wedding": { + "ID": 1674, + "name": "Wedding", + "slug": "wedding", + "description": "", + "post_count": 1, + "parent": 0, + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:wedding", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:wedding/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" + } + } + } + }, + "attachments": { + }, + "attachment_count": 0, + "metadata": [ + { + "id": "201", + "key": "jabber_published", + "value": "1457375532" + }, + { + "id": "562", + "key": "_edit_lock", + "value": "1555492632:67626417" + }, + { + "id": "248", + "key": "_oembed_4e3318c4371cf9880f6705450efd7fe6", + "value": "

Congrats to the photojournalists on WordPress who won #WPPh16 @WorldPressPhoto prizes: https://t.co/9ya2boX1Yy pic.twitter.com/ZFAHNngh1f

— WordPress.com (@wordpressdotcom) February 23, 2016
" + }, + { + "id": "249", + "key": "_oembed_time_4e3318c4371cf9880f6705450efd7fe6", + "value": "1461101264" + }, + { + "id": "233", + "key": "_publicize_done_13969716", + "value": "1" + }, + { + "id": "232", + "key": "_publicize_done_external", + "value": { + "facebook": { + "13895248": "https://facebook.com/10208752052869141" + } + } + }, + { + "id": "206", + "key": "_publicize_job_id", + "value": "20665553278" + }, + { + "id": "205", + "key": "_rest_api_client_id", + "value": "-1" + }, + { + "id": "204", + "key": "_rest_api_published", + "value": "1" + }, + { + "id": "198", + "key": "_thumbnail_id", + "value": "82" + }, + { + "id": "234", + "key": "_wpas_done_13895248", + "value": "1" + }, + { + "id": "231", + "key": "_wpas_mess", + "value": "An amazing weekend, a wonderful couple, and beautiful photos to match! Check it out!" + } + ], + "meta": { + "links": { + "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/90", + "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/posts/90/help", + "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880", + "replies": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/90/replies/", + "likes": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/90/likes/" + } + }, + "capabilities": { + "publish_post": true, + "delete_post": true, + "edit_post": true + }, + "revisions": [ + 102, + 101, + 100, + 93, + 92, + 91 + ], + "other_URLs": { + } } ], "meta": { "links": { - "counts": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/post-counts/post" + "counts": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/post-counts/post" }, "wpcom": true } diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-private,publish_v2.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-private,publish_v2.json deleted file mode 100644 index f4209469721d..000000000000 --- a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts-private,publish_v2.json +++ /dev/null @@ -1,677 +0,0 @@ -{ - "request": { - "method": "GET", - "urlPattern": "/rest/v1.2/sites/.*/posts.*", - "queryParameters": { - "locale": { - "matches": "(.*)" - }, - "context": { - "equalTo": "edit" - }, - "meta": { - "equalTo": "autosave" - }, - "number": { - "matches": "(.*)" - }, - "status": { - "equalTo": "publish,private" - }, - "type": { - "equalTo": "post" - } - } - }, - "response": { - "status": 200, - "jsonBody": { - "found": 3, - "posts": [ - { - "ID": 237, - "site_ID": 106707880, - "author": { - "ID": 68646169, - "login": "thenomadicwordsmith", - "email": "thenomadicwordsmith@gmail.com", - "name": "thenomadicwordsmith", - "first_name": "Nomadic", - "last_name": "Wordsmith", - "nice_name": "thenomadicwordsmith", - "URL": "http://thenomadicwordsmith.wordpress.com", - "avatar_URL": "https://0.gravatar.com/avatar/9ba48385fc40dfd9a55a3348d8e7f4d9?s=96&d=identicon&r=G", - "profile_URL": "https://en.gravatar.com/thenomadicwordsmith", - "site_ID": 71769073 - }, - "date": "2019-03-13T23:48:58+00:00", - "modified": "2019-03-21T17:19:25+00:00", - "title": "Photo Contest", - "URL": "http://infocusphotographers.com/2019/03/13/some-news-to-share-2/", - "short_URL": "https://wp.me/p7dJAQ-3P", - "content": "\n

In Focus Photography was nominated for an international photo award!

\n\n\n\n

Please vote for us!

\n", - "excerpt": "", - "slug": "some-news-to-share-2", - "guid": "http://infocusphotographers.com/?p=237", - "status": "private", - "sticky": false, - "password": "", - "parent": false, - "type": "post", - "discussion": { - "comments_open": true, - "comment_status": "open", - "pings_open": true, - "ping_status": "open", - "comment_count": 0 - }, - "likes_enabled": true, - "sharing_enabled": true, - "like_count": 0, - "i_like": false, - "is_reblogged": false, - "is_following": false, - "global_ID": "9dc6f7941b6a68fc2323b652c4e9516b", - "featured_image": "https://infocusphotographers.files.wordpress.com/2019/03/art-bright-celebration-1313817.jpg", - "post_thumbnail": { - "ID": 238, - "URL": "https://infocusphotographers.files.wordpress.com/2019/03/art-bright-celebration-1313817.jpg", - "guid": "http://infocusphotographers.files.wordpress.com/2019/03/art-bright-celebration-1313817.jpg", - "mime_type": "image/jpeg", - "width": 4256, - "height": 2628 - }, - "format": "standard", - "geo": false, - "menu_order": 0, - "page_template": "", - "publicize_URLs": [ - - ], - "terms": { - "category": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" - } - } - } - }, - "post_tag": { - }, - "post_format": { - }, - "mentions": { - } - }, - "tags": { - }, - "categories": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" - } - } - } - }, - "attachments": { - "238": { - "ID": 238, - "URL": "https://infocusphotographers.files.wordpress.com/2019/03/art-bright-celebration-1313817.jpg", - "guid": "http://infocusphotographers.files.wordpress.com/2019/03/art-bright-celebration-1313817.jpg", - "date": "2019-03-20T23:44:49+00:00", - "post_ID": 237, - "author_ID": 14151046, - "file": "art-bright-celebration-1313817.jpg", - "mime_type": "image/jpeg", - "extension": "jpg", - "title": "art-bright-celebration-1313817", - "caption": "", - "description": "", - "alt": "", - "thumbnails": { - "thumbnail": "https://infocusphotographers.files.wordpress.com/2019/03/art-bright-celebration-1313817.jpg?w=150", - "medium": "https://infocusphotographers.files.wordpress.com/2019/03/art-bright-celebration-1313817.jpg?w=300", - "large": "https://infocusphotographers.files.wordpress.com/2019/03/art-bright-celebration-1313817.jpg?w=1024" - }, - "height": 2628, - "width": 4256, - "exif": { - "aperture": "0", - "credit": "", - "camera": "", - "caption": "", - "created_timestamp": "0", - "copyright": "", - "focal_length": "0", - "iso": "0", - "shutter_speed": "0", - "title": "", - "orientation": "0", - "keywords": [ - - ] - }, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/media/238", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/media/238/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880", - "parent": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/237" - } - } - } - }, - "attachment_count": 1, - "metadata": [ - { - "id": "493", - "key": "email_notification", - "value": "1553125740" - }, - { - "id": "486", - "key": "jabber_published", - "value": "1553125739" - }, - { - "id": "491", - "key": "timeline_notification", - "value": "1553125810" - }, - { - "id": "557", - "key": "_edit_lock", - "value": "1553188814:68646169" - }, - { - "id": "492", - "key": "_publicize_job_id", - "value": "28865445244" - }, - { - "id": "490", - "key": "_rest_api_client_id", - "value": "-1" - }, - { - "id": "489", - "key": "_rest_api_published", - "value": "1" - }, - { - "id": "484", - "key": "_thumbnail_id", - "value": "238" - } - ], - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/237", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/posts/237/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880", - "replies": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/237/replies/", - "likes": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/237/likes/" - } - }, - "capabilities": { - "publish_post": true, - "delete_post": true, - "edit_post": true - }, - "revisions": [ - 269, - 263, - 239 - ], - "other_URLs": { - "permalink_URL": "http://infocusphotographers.com/2019/03/13/%postname%/", - "suggested_slug": "some-news-to-share-2" - } - }, - { - "ID": 106, - "site_ID": 106707880, - "author": { - "ID": 100907762, - "login": "leahelainerand", - "email": "andreazoellner+leahrand@gmail.com", - "name": "Leah Elaine Rand", - "first_name": "Leah", - "last_name": "Rand", - "nice_name": "leahelainerand", - "URL": "", - "avatar_URL": "https://0.gravatar.com/avatar/62937c26a2a79bae5921ca9e85be8040?s=96&d=identicon&r=G", - "profile_URL": "https://en.gravatar.com/leahelainerand", - "site_ID": 106523982 - }, - "date": "2016-04-19T21:28:27+00:00", - "modified": "2018-03-23T00:20:36+00:00", - "title": "Some News to Share", - "URL": "http://infocusphotographers.com/2016/04/19/some-news-to-share/", - "short_URL": "https://wp.me/p7dJAQ-1I", - "content": "John was shortlisted for the World Press Photo competition, an international celebration of the best photojournalism of the year.\n\nhttps://twitter.com/wordpressdotcom/status/702181837079187456", - "excerpt": "", - "slug": "some-news-to-share", - "guid": "https://infocusphotographers.wordpress.com/?p=106", - "status": "publish", - "sticky": false, - "password": "", - "parent": false, - "type": "post", - "discussion": { - "comments_open": true, - "comment_status": "open", - "pings_open": true, - "ping_status": "open", - "comment_count": 0 - }, - "likes_enabled": true, - "sharing_enabled": true, - "like_count": 0, - "i_like": false, - "is_reblogged": false, - "is_following": false, - "global_ID": "3a10a002b4f389596205c24992732a3e", - "featured_image": "https://infocusphotographers.files.wordpress.com/2016/02/photo-1449761485030-c9bf16154670.jpg", - "post_thumbnail": { - "ID": 62, - "URL": "https://infocusphotographers.files.wordpress.com/2016/02/photo-1449761485030-c9bf16154670.jpg", - "guid": "http://infocusphotographers.files.wordpress.com/2016/02/photo-1449761485030-c9bf16154670.jpg", - "mime_type": "image/jpeg", - "width": 1080, - "height": 720 - }, - "format": "standard", - "geo": false, - "menu_order": 0, - "page_template": "", - "publicize_URLs": [ - - ], - "terms": { - "category": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" - } - } - } - }, - "post_tag": { - }, - "post_format": { - }, - "mentions": { - } - }, - "tags": { - }, - "categories": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" - } - } - } - }, - "attachments": { - }, - "attachment_count": 0, - "metadata": [ - { - "id": "254", - "key": "jabber_published", - "value": "1461101308" - }, - { - "id": "267", - "key": "_oembed_00ce3f36d70c72c174774d1222895a08", - "value": "

Congrats to the photojournalists on WordPress who won #WPPh16 @WorldPressPhoto prizes: https://t.co/9ya2boX1Yy pic.twitter.com/ZFAHNngh1f

— WordPress.com (@wordpressdotcom) February 23, 2016
" - }, - { - "id": "294", - "key": "_oembed_33aac0b04f7a7bc31eec252936d4ae4a", - "value": "

Congrats to the photojournalists on WordPress who won #WPPh16 @WorldPressPhoto prizes: https://t.co/9ya2boX1Yy pic.twitter.com/ZFAHNngh1f

— WordPress.com (@wordpressdotcom) February 23, 2016
" - }, - { - "id": "257", - "key": "_oembed_4e3318c4371cf9880f6705450efd7fe6", - "value": "

Congrats to the photojournalists on WordPress who won #WPPh16 @WorldPressPhoto prizes: https://t.co/9ya2boX1Yy pic.twitter.com/ZFAHNngh1f

— WordPress.com (@wordpressdotcom) February 23, 2016
" - }, - { - "id": "251", - "key": "_oembed_8655c52bd5f940727d92329c248de249", - "value": "

Congrats to the photojournalists on WordPress who won #WPPh16 @WorldPressPhoto prizes: https://t.co/9ya2boX1Yy pic.twitter.com/ZFAHNngh1f

— WordPress.com (@wordpressdotcom) February 23, 2016
" - }, - { - "id": "262", - "key": "_oembed_eb2de30a8aa65d93ca387e4a12fd9f06", - "value": "

Congrats to the photojournalists on WordPress who won #WPPh16 @WorldPressPhoto prizes: https://t.co/9ya2boX1Yy pic.twitter.com/ZFAHNngh1f

— WordPress.com (@wordpressdotcom) February 23, 2016
" - }, - { - "id": "268", - "key": "_oembed_time_00ce3f36d70c72c174774d1222895a08", - "value": "1461200444" - }, - { - "id": "295", - "key": "_oembed_time_33aac0b04f7a7bc31eec252936d4ae4a", - "value": "1521764439" - }, - { - "id": "258", - "key": "_oembed_time_4e3318c4371cf9880f6705450efd7fe6", - "value": "1461101310" - }, - { - "id": "252", - "key": "_oembed_time_8655c52bd5f940727d92329c248de249", - "value": "1461101270" - }, - { - "id": "263", - "key": "_oembed_time_eb2de30a8aa65d93ca387e4a12fd9f06", - "value": "1461101311" - }, - { - "id": "261", - "key": "_publicize_job_id", - "value": "21955598041" - }, - { - "id": "260", - "key": "_rest_api_client_id", - "value": "-1" - }, - { - "id": "259", - "key": "_rest_api_published", - "value": "1" - }, - { - "id": "266", - "key": "_thumbnail_id", - "value": "62" - } - ], - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/106", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/posts/106/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880", - "replies": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/106/replies/", - "likes": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/106/likes/", - "autosave": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/106/autosave" - }, - "data": { - "autosave": { - "ID": 262, - "author_ID": "14151046", - "post_ID": 106, - "title": "Photo Contest", - "content": "John was shortlisted for the World Press Photo competition, an international celebration of the best photojournalism of the year.\n\nhttps://twitter.com/wordpressdotcom/status/702181837079187456", - "excerpt": "", - "preview_URL": "http://infocusphotographers.com/2016/04/19/some-news-to-share/?preview=true&preview_nonce=ef0913f6c4", - "modified": "2019-03-21T00:23:25+00:00" - } - } - }, - "capabilities": { - "publish_post": true, - "delete_post": true, - "edit_post": true - }, - "revisions": [ - 262, - 109, - 108, - 107 - ], - "other_URLs": { - } - }, - { - "ID": 90, - "site_ID": 106707880, - "author": { - "ID": 100907762, - "login": "leahelainerand", - "email": "andreazoellner+leahrand@gmail.com", - "name": "Leah Elaine Rand", - "first_name": "Leah", - "last_name": "Rand", - "nice_name": "leahelainerand", - "URL": "", - "avatar_URL": "https://0.gravatar.com/avatar/62937c26a2a79bae5921ca9e85be8040?s=96&d=identicon&r=G", - "profile_URL": "https://en.gravatar.com/leahelainerand", - "site_ID": 106523982 - }, - "date": "2016-03-07T18:32:11+00:00", - "modified": "2016-03-16T02:01:50+00:00", - "title": "Martin and Amy's Wedding", - "URL": "http://infocusphotographers.com/2016/03/07/martin-and-amys-wedding/", - "short_URL": "https://wp.me/p7dJAQ-1s", - "content": "Martin and Amy are a wonderful couple that John and I were lucky to photograph. The theme for their wedding was sophisticated but warm and everything had a clearly personal touch.\n\nThey decided they wanted the bulk of their wedding photos to be black and white. While some couples like personal, goofy photos, Amy and Martin found a perfect balance between classic elegance and shots with personality.\n\n \n\nhttps://www.instagram.com/p/BCF4Z6UjRjE/?taken-by=photomatt\n\n \n\nhttps://www.instagram.com/p/8qwIAWDRum/?taken-by=photomatt\n\n ", - "excerpt": "", - "slug": "martin-and-amys-wedding", - "guid": "https://infocusphotographers.wordpress.com/?p=90", - "status": "publish", - "sticky": false, - "password": "", - "parent": false, - "type": "post", - "discussion": { - "comments_open": true, - "comment_status": "open", - "pings_open": true, - "ping_status": "open", - "comment_count": 0 - }, - "likes_enabled": true, - "sharing_enabled": true, - "like_count": 0, - "i_like": false, - "is_reblogged": false, - "is_following": false, - "global_ID": "8ffbda2c616a90c6b92efe4fb016fe95", - "featured_image": "https://infocusphotographers.files.wordpress.com/2016/02/photo-1453857271477-4f9a4081966e1.jpeg", - "post_thumbnail": { - "ID": 82, - "URL": "https://infocusphotographers.files.wordpress.com/2016/02/photo-1453857271477-4f9a4081966e1.jpeg", - "guid": "http://infocusphotographers.files.wordpress.com/2016/02/photo-1453857271477-4f9a4081966e1.jpeg", - "mime_type": "image/jpeg", - "width": 3853, - "height": 2384 - }, - "format": "standard", - "geo": false, - "menu_order": 0, - "page_template": "", - "publicize_URLs": [ - - ], - "terms": { - "category": { - "Wedding": { - "ID": 1674, - "name": "Wedding", - "slug": "wedding", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:wedding", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:wedding/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" - } - } - } - }, - "post_tag": { - }, - "post_format": { - }, - "mentions": { - } - }, - "tags": { - }, - "categories": { - "Wedding": { - "ID": 1674, - "name": "Wedding", - "slug": "wedding", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:wedding", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/categories/slug:wedding/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880" - } - } - } - }, - "attachments": { - }, - "attachment_count": 0, - "metadata": [ - { - "id": "201", - "key": "jabber_published", - "value": "1457375532" - }, - { - "id": "562", - "key": "_edit_lock", - "value": "1555492632:67626417" - }, - { - "id": "248", - "key": "_oembed_4e3318c4371cf9880f6705450efd7fe6", - "value": "

Congrats to the photojournalists on WordPress who won #WPPh16 @WorldPressPhoto prizes: https://t.co/9ya2boX1Yy pic.twitter.com/ZFAHNngh1f

— WordPress.com (@wordpressdotcom) February 23, 2016
" - }, - { - "id": "249", - "key": "_oembed_time_4e3318c4371cf9880f6705450efd7fe6", - "value": "1461101264" - }, - { - "id": "233", - "key": "_publicize_done_13969716", - "value": "1" - }, - { - "id": "232", - "key": "_publicize_done_external", - "value": { - "facebook": { - "13895248": "https://facebook.com/10208752052869141" - } - } - }, - { - "id": "206", - "key": "_publicize_job_id", - "value": "20665553278" - }, - { - "id": "205", - "key": "_rest_api_client_id", - "value": "-1" - }, - { - "id": "204", - "key": "_rest_api_published", - "value": "1" - }, - { - "id": "198", - "key": "_thumbnail_id", - "value": "82" - }, - { - "id": "234", - "key": "_wpas_done_13895248", - "value": "1" - }, - { - "id": "231", - "key": "_wpas_mess", - "value": "An amazing weekend, a wonderful couple, and beautiful photos to match! Check it out!" - } - ], - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/90", - "help": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/posts/90/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880", - "replies": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/90/replies/", - "likes": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/90/likes/" - } - }, - "capabilities": { - "publish_post": true, - "delete_post": true, - "edit_post": true - }, - "revisions": [ - 102, - 101, - 100, - 93, - 92, - 91 - ], - "other_URLs": { - } - } - ], - "meta": { - "links": { - "counts": "{{request.requestLine.baseUrl}}/rest/v1.2/sites/106707880/post-counts/post" - }, - "wpcom": true - } - } - } -} \ No newline at end of file diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_106.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_106.json deleted file mode 100644 index a13aaf8e9b34..000000000000 --- a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_106.json +++ /dev/null @@ -1,160 +0,0 @@ -{ - "request": { - "method": "GET", - "urlPath": "/rest/v1.1/sites/106707880/posts/106/", - "queryParameters": { - "context": { - "equalTo": "edit" - }, - "locale": { - "matches": "(.*)" - } - } - }, - "response": { - "status": 200, - "jsonBody": { - "ID": 106, - "site_ID": 106707880, - "author": { - "ID": 100907762, - "login": "leahelainerand", - "email": "andreazoellner+leahrand@gmail.com", - "name": "Leah Elaine Rand", - "first_name": "Leah", - "last_name": "Rand", - "nice_name": "leahelainerand", - "URL": "", - "avatar_URL": "https://0.gravatar.com/avatar/62937c26a2a79bae5921ca9e85be8040?s=96&d=identicon&r=G", - "profile_URL": "http://en.gravatar.com/leahelainerand", - "site_ID": 106523982 - }, - "date": "2016-04-19T21:28:27+00:00", - "modified": "2018-03-23T00:20:36+00:00", - "title": "Some News to Share", - "URL": "http://infocusphotographers.com/2016/04/19/some-news-to-share/", - "short_URL": "https://wp.me/p7dJAQ-1I", - "content": "John was shortlisted for the World Press Photo competition, an international celebration of the best photojournalism of the year.\n\nhttps://twitter.com/wordpressdotcom/status/702181837079187456", - "excerpt": "", - "slug": "some-news-to-share", - "guid": "https://infocusphotographers.wordpress.com/?p=106", - "status": "publish", - "sticky": false, - "password": "", - "parent": false, - "type": "post", - "discussion": { - "comments_open": true, - "comment_status": "open", - "pings_open": true, - "ping_status": "open", - "comment_count": 0 - }, - "likes_enabled": true, - "sharing_enabled": true, - "like_count": 0, - "i_like": false, - "is_reblogged": false, - "is_following": false, - "global_ID": "3a10a002b4f389596205c24992732a3e", - "featured_image": "https://infocusphotographers.files.wordpress.com/2016/02/photo-1449761485030-c9bf16154670.jpg", - "post_thumbnail": { - "ID": 62, - "URL": "https://infocusphotographers.files.wordpress.com/2016/02/photo-1449761485030-c9bf16154670.jpg", - "guid": "http://infocusphotographers.files.wordpress.com/2016/02/photo-1449761485030-c9bf16154670.jpg", - "mime_type": "image/jpeg", - "width": 1080, - "height": 720 - }, - "format": "standard", - "geo": false, - "menu_order": 0, - "page_template": "", - "publicize_URLs": [ - - ], - "terms": { - "category": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880" - } - } - } - }, - "post_tag": { - }, - "post_format": { - }, - "mentions": { - } - }, - "tags": { - }, - "categories": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880" - } - } - } - }, - "attachments": { - }, - "attachment_count": 0, - "metadata": [ - { - "id": "254", - "key": "jabber_published", - "value": "1461101308" - }, - { - "id": "266", - "key": "_thumbnail_id", - "value": "62" - } - ], - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/106", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/106/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880", - "replies": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/106/replies/", - "likes": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/106/likes/", - "autosave": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/106/autosave" - } - }, - "capabilities": { - "publish_post": true, - "delete_post": true, - "edit_post": true - }, - "revisions": [ - 262, - 109, - 108, - 107 - ], - "other_URLs": { - } - } - } -} \ No newline at end of file diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_134.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_134.json deleted file mode 100644 index 7037dd231942..000000000000 --- a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_134.json +++ /dev/null @@ -1,151 +0,0 @@ -{ - "request": { - "method": "GET", - "urlPath": "/rest/v1.1/sites/106707880/posts/134/", - "queryParameters": { - "context": { - "equalTo": "edit" - }, - "locale": { - "matches": "(.*)" - } - } - }, - "response": { - "status": 200, - "jsonBody": { - "ID": 134, - "site_ID": 106707880, - "author": { - "ID": 68646169, - "login": "thenomadicwordsmith", - "email": "thenomadicwordsmith@wordpress.com", - "name": "thenomadicwordsmith", - "first_name": "Nomadic", - "last_name": "Wordsmith", - "nice_name": "thenomadicwordsmith", - "URL": "http://thenomadicwordsmith.wordpress.com", - "avatar_URL": "https://0.gravatar.com/avatar/9ba48385fc40dfd9a55a3348d8e7f4d9?s=96&d=identicon&r=G", - "profile_URL": "http://en.gravatar.com/thenomadicwordsmith", - "site_ID": 71769073 - }, - "date": "2019-03-19T03:08:16+00:00", - "modified": "2019-05-27T21:39:08+00:00", - "title": "Now Booking Summer Sessions", - "URL": "http://infocusphotographers.com/?p=134", - "short_URL": "https://wp.me/p7dJAQ-2a", - "content": "
“One must maintain a little bit of summer, even in the middle of winter.” \n\n– Henry David Thoreau
\nBlue skies and warm weather, what's not to love about summer? It's a great season for outdoor family portrait sessions and now is the time to book them!\n\nWe offer a number of family portrait packages and for a limited time are offering 15% off packages booked before April 1.\n

How to book

\nEmail us to set up a time to visit our studio.", - "excerpt": "", - "slug": "now-booking-summer-sessions", - "guid": "http://infocusphotographers.com/?p=134", - "status": "draft", - "sticky": false, - "password": "", - "parent": false, - "type": "post", - "discussion": { - "comments_open": true, - "comment_status": "open", - "pings_open": true, - "ping_status": "open", - "comment_count": 0 - }, - "likes_enabled": true, - "sharing_enabled": true, - "like_count": 0, - "i_like": false, - "is_reblogged": false, - "is_following": false, - "global_ID": "e9bb2d5021873cf97e6ced1f9308bdd5", - "featured_image": "", - "post_thumbnail": null, - "format": "standard", - "geo": false, - "menu_order": 0, - "page_template": "", - "publicize_URLs": [ - - ], - "terms": { - "category": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880" - } - } - } - }, - "post_tag": { - }, - "post_format": { - }, - "mentions": { - } - }, - "tags": { - }, - "categories": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880" - } - } - } - }, - "attachments": { - }, - "attachment_count": 0, - "metadata": false, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/134", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/134/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880", - "replies": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/134/replies/", - "likes": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/134/likes/", - "autosave": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/134/autosave" - } - }, - "capabilities": { - "publish_post": true, - "delete_post": true, - "edit_post": true - }, - "revisions": [ - 397, - 310, - 274, - 236, - 231, - 230, - 220, - 219, - 218, - 136, - 135 - ], - "other_URLs": { - "permalink_URL": "http://infocusphotographers.com/2019/03/19/%postname%/", - "suggested_slug": "now-booking-summer-sessions" - } - } - } -} \ No newline at end of file diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_213.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_213.json deleted file mode 100644 index 23911bcd2955..000000000000 --- a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_213.json +++ /dev/null @@ -1,196 +0,0 @@ -{ - "request": { - "method": "GET", - "urlPath": "/rest/v1.1/sites/106707880/posts/213/", - "queryParameters": { - "context": { - "equalTo": "edit" - }, - "locale": { - "matches": "(.*)" - } - } - }, - "response": { - "status": 200, - "jsonBody": { - "ID": 213, - "site_ID": 106707880, - "author": { - "ID": 68646169, - "login": "thenomadicwordsmith", - "email": "thenomadicwordsmith@wordpress.com", - "name": "thenomadicwordsmith", - "first_name": "Nomadic", - "last_name": "Wordsmith", - "nice_name": "thenomadicwordsmith", - "URL": "http://thenomadicwordsmith.wordpress.com", - "avatar_URL": "https://0.gravatar.com/avatar/9ba48385fc40dfd9a55a3348d8e7f4d9?s=96&d=identicon&r=G", - "profile_URL": "http://en.gravatar.com/thenomadicwordsmith", - "site_ID": 71769073 - }, - "date": "2019-07-16T02:39:44+00:00", - "modified": "2019-07-16T02:39:45+00:00", - "title": "Our Services", - "URL": "http://infocusphotographers.com/?p=213", - "short_URL": "https://wp.me/p7dJAQ-3r", - "content": "\n
\n

Mobile grooming salon for cats and dogs.

\n\n\n\n\n
\n\n\n\n

Dog grooming

\n\n\n\n
\n
\n

Our deluxe grooming service includes:

\n\n\n\n
  • Nail clip
  • Ear cleaning
  • 1st shampoo
  • 2nd shampoo
  • Conditioning rinse
  • Towel dry
  • Blow dry
  • Brush out
  • And a treat!
\n
\n\n\n\n
\n
\"\"
\n
\n
\n\n\n\n

Deluxe Cut and Groom

\n\n\n\n

Our deluxe cut and groom package includes everything in the deluxe groom plus a haircut.

\n\n\n\n

Add on services

\n\n\n\n

Pamper your pup even more with one of our signature add on services:

\n\n\n\n
  • Aloe conditioning treatment
  • Soothing medicated shampoos
  • Tooth brushing
  • Creative styling with temporary color
  • Nail polish application
  • Coat braiding
  • Bows and other accessories
\n\n\n\n
\n

\n
\n\n\n\n

\n", - "excerpt": "", - "slug": "summer-band-jam", - "guid": "http://infocusphotographers.com/?p=213", - "status": "draft", - "sticky": false, - "password": "", - "parent": false, - "type": "post", - "discussion": { - "comments_open": true, - "comment_status": "open", - "pings_open": true, - "ping_status": "open", - "comment_count": 0 - }, - "likes_enabled": true, - "sharing_enabled": true, - "like_count": 0, - "i_like": false, - "is_reblogged": false, - "is_following": false, - "global_ID": "e41d1c97a7b93a594b07e4df51dfafb3", - "featured_image": "https://infocusphotographers.files.wordpress.com/2019/02/adult-band-concert-995301.jpg", - "post_thumbnail": { - "ID": 151, - "URL": "https://infocusphotographers.files.wordpress.com/2019/02/adult-band-concert-995301.jpg", - "guid": "http://infocusphotographers.files.wordpress.com/2019/02/adult-band-concert-995301.jpg", - "mime_type": "image/jpeg", - "width": 5184, - "height": 3456 - }, - "format": "standard", - "geo": false, - "menu_order": 0, - "page_template": "", - "publicize_URLs": [ - - ], - "terms": { - "category": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880" - } - } - } - }, - "post_tag": { - }, - "post_format": { - }, - "mentions": { - } - }, - "tags": { - }, - "categories": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880" - } - } - } - }, - "attachments": { - }, - "attachment_count": 0, - "metadata": [ - { - "id": "502", - "key": "email_notification", - "value": "1553125754" - }, - { - "id": "564", - "key": "geo_public", - "value": "0" - }, - { - "id": "496", - "key": "jabber_published", - "value": "1553125752" - }, - { - "id": "503", - "key": "timeline_notification", - "value": "1553125801" - }, - { - "id": "565", - "key": "_thumbnail_id", - "value": "151" - } - ], - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/213", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/213/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880", - "replies": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/213/replies/", - "likes": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/213/likes/" - } - }, - "capabilities": { - "publish_post": true, - "delete_post": true, - "edit_post": true - }, - "revisions": [ - 401, - 400, - 309, - 303, - 300, - 299, - 298, - 297, - 296, - 292, - 291, - 289, - 288, - 287, - 286, - 285, - 284, - 283, - 280, - 277, - 273, - 267, - 240, - 214 - ], - "other_URLs": { - "permalink_URL": "http://infocusphotographers.com/2019/07/16/%postname%/", - "suggested_slug": "summer-band-jam" - } - } - } -} \ No newline at end of file diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_215.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_215.json deleted file mode 100644 index 0f9e249b8b3e..000000000000 --- a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_215.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "request": { - "method": "GET", - "urlPath": "/rest/v1.1/sites/106707880/posts/215/", - "queryParameters": { - "context": { - "equalTo": "edit" - }, - "locale": { - "matches": "(.*)" - } - } - }, - "response": { - "status": 200, - "jsonBody": { - "ID": 215, - "site_ID": 106707880, - "author": { - "ID": 68646169, - "login": "thenomadicwordsmith", - "email": "thenomadicwordsmith@wordpress.com", - "name": "thenomadicwordsmith", - "first_name": "Nomadic", - "last_name": "Wordsmith", - "nice_name": "thenomadicwordsmith", - "URL": "http://thenomadicwordsmith.wordpress.com", - "avatar_URL": "https://0.gravatar.com/avatar/9ba48385fc40dfd9a55a3348d8e7f4d9?s=96&d=identicon&r=G", - "profile_URL": "http://en.gravatar.com/thenomadicwordsmith", - "site_ID": 71769073 - }, - "date": "2019-02-15T23:27:13+00:00", - "modified": "2019-02-15T23:27:13+00:00", - "title": "Ideas", - "URL": "http://infocusphotographers.com/?p=215", - "short_URL": "https://wp.me/p7dJAQ-3t", - "content": "Returning client special - Offer a discount to clients who have left a review.\n\nPhotography classes at the local", - "excerpt": "", - "slug": "", - "guid": "http://infocusphotographers.com/?p=215", - "status": "draft", - "sticky": false, - "password": "", - "parent": false, - "type": "post", - "discussion": { - "comments_open": true, - "comment_status": "open", - "pings_open": true, - "ping_status": "open", - "comment_count": 0 - }, - "likes_enabled": true, - "sharing_enabled": true, - "like_count": 0, - "i_like": false, - "is_reblogged": false, - "is_following": false, - "global_ID": "50d8150dfae26a5bef18779211142b65", - "featured_image": "", - "post_thumbnail": null, - "format": "standard", - "geo": false, - "menu_order": 0, - "page_template": "", - "publicize_URLs": [ - - ], - "terms": { - "category": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880" - } - } - } - }, - "post_tag": { - }, - "post_format": { - }, - "mentions": { - } - }, - "tags": { - }, - "categories": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880" - } - } - } - }, - "attachments": { - }, - "attachment_count": 0, - "metadata": false, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/215", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/215/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880", - "replies": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/215/replies/", - "likes": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/215/likes/" - } - }, - "capabilities": { - "publish_post": true, - "delete_post": true, - "edit_post": true - }, - "revisions": [ - 216 - ], - "other_URLs": { - "permalink_URL": "http://infocusphotographers.com/2019/02/15/%postname%/", - "suggested_slug": "ideas" - } - } - } -} \ No newline at end of file diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_225.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_225.json deleted file mode 100644 index 96a16c9a971d..000000000000 --- a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_225.json +++ /dev/null @@ -1,191 +0,0 @@ -{ - "request": { - "method": "GET", - "urlPath": "/rest/v1.1/sites/106707880/posts/225/", - "queryParameters": { - "context": { - "equalTo": "edit" - }, - "locale": { - "matches": "(.*)" - } - } - }, - "response": { - "status": 200, - "jsonBody": { - "ID": 225, - "site_ID": 106707880, - "author": { - "ID": 68646169, - "login": "thenomadicwordsmith", - "email": "thenomadicwordsmith@wordpress.com", - "name": "thenomadicwordsmith", - "first_name": "Nomadic", - "last_name": "Wordsmith", - "nice_name": "thenomadicwordsmith", - "URL": "http://thenomadicwordsmith.wordpress.com", - "avatar_URL": "https://0.gravatar.com/avatar/9ba48385fc40dfd9a55a3348d8e7f4d9?s=96&d=identicon&r=G", - "profile_URL": "http://en.gravatar.com/thenomadicwordsmith", - "site_ID": 71769073 - }, - "date": "2019-01-01T21:54:15+00:00", - "modified": "2019-03-21T17:20:44+00:00", - "title": "Book Your Summer Sessions", - "URL": "http://infocusphotographers.com/?p=225", - "short_URL": "https://wp.me/p7dJAQ-3D", - "content": "\n

“One must maintain a little bit of summer, even in the middle of winter.”

– Henry David Thoreau
\n\n\n\n

Blue skies and warm weather, what's not to love about summer? It's a great season for outdoor family portrait sessions and now is the time to book them!

\n\n\n\n

We offer a number of family portrait packages and for a limited time are offering 15% off packages booked before April 1.

\n\n\n\n
\"beach-children-family-39691\"
\n\n\n\n

How to book

\n\n\n\n

Email us to set up a time to visit our studio.

\n", - "excerpt": "", - "slug": "__trashed-2", - "guid": "http://infocusphotographers.com/?p=225", - "status": "draft", - "sticky": false, - "password": "", - "parent": false, - "type": "post", - "discussion": { - "comments_open": true, - "comment_status": "open", - "pings_open": true, - "ping_status": "open", - "comment_count": 0 - }, - "likes_enabled": true, - "sharing_enabled": true, - "like_count": 0, - "i_like": false, - "is_reblogged": false, - "is_following": false, - "global_ID": "2d07f957bcc110149b8aa37bd1231ad1", - "featured_image": "", - "post_thumbnail": null, - "format": "standard", - "geo": false, - "menu_order": 0, - "page_template": "", - "publicize_URLs": [ - - ], - "terms": { - "category": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880" - } - } - } - }, - "post_tag": { - }, - "post_format": { - }, - "mentions": { - } - }, - "tags": { - }, - "categories": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880" - } - } - } - }, - "attachments": { - "243": { - "ID": 243, - "URL": "https://infocusphotographers.files.wordpress.com/2019/01/beach-children-family-39691.jpg", - "guid": "http://infocusphotographers.files.wordpress.com/2019/01/beach-children-family-39691.jpg", - "date": "2019-03-20T23:56:52+00:00", - "post_ID": 225, - "author_ID": 14151046, - "file": "beach-children-family-39691.jpg", - "mime_type": "image/jpeg", - "extension": "jpg", - "title": "beach-children-family-39691", - "caption": "", - "description": "", - "alt": "", - "thumbnails": { - "thumbnail": "https://infocusphotographers.files.wordpress.com/2019/01/beach-children-family-39691.jpg?w=150", - "medium": "https://infocusphotographers.files.wordpress.com/2019/01/beach-children-family-39691.jpg?w=300", - "large": "https://infocusphotographers.files.wordpress.com/2019/01/beach-children-family-39691.jpg?w=1024" - }, - "height": 2446, - "width": 3669, - "exif": { - "aperture": "0", - "credit": "", - "camera": "", - "caption": "", - "created_timestamp": "0", - "copyright": "", - "focal_length": "0", - "iso": "0", - "shutter_speed": "0", - "title": "", - "orientation": "0", - "keywords": [ - - ] - }, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/media/243", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/media/243/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880", - "parent": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/225" - } - } - } - }, - "attachment_count": 1, - "metadata": false, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/225", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/225/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880", - "replies": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/225/replies/", - "likes": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/225/likes/" - } - }, - "capabilities": { - "publish_post": true, - "delete_post": true, - "edit_post": true - }, - "revisions": [ - 271, - 235, - 229, - 228, - 227, - 226 - ], - "other_URLs": { - "permalink_URL": "http://infocusphotographers.com/2019/01/01/%postname%/", - "suggested_slug": "__trashed-2" - } - } - } -} \ No newline at end of file diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_237.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_237.json deleted file mode 100644 index 886c2c03c1e9..000000000000 --- a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_237.json +++ /dev/null @@ -1,216 +0,0 @@ -{ - "request": { - "method": "GET", - "urlPath": "/rest/v1.1/sites/106707880/posts/237/", - "queryParameters": { - "context": { - "equalTo": "edit" - }, - "locale": { - "matches": "(.*)" - } - } - }, - "response": { - "status": 200, - "jsonBody": { - "ID": 237, - "site_ID": 106707880, - "author": { - "ID": 68646169, - "login": "thenomadicwordsmith", - "email": "thenomadicwordsmith@wordpress.com", - "name": "thenomadicwordsmith", - "first_name": "Nomadic", - "last_name": "Wordsmith", - "nice_name": "thenomadicwordsmith", - "URL": "http://thenomadicwordsmith.wordpress.com", - "avatar_URL": "https://0.gravatar.com/avatar/9ba48385fc40dfd9a55a3348d8e7f4d9?s=96&d=identicon&r=G", - "profile_URL": "http://en.gravatar.com/thenomadicwordsmith", - "site_ID": 71769073 - }, - "date": "2019-03-13T23:48:58+00:00", - "modified": "2019-03-21T17:19:25+00:00", - "title": "Photo Contest", - "URL": "http://infocusphotographers.com/2019/03/13/some-news-to-share-2/", - "short_URL": "https://wp.me/p7dJAQ-3P", - "content": "\n

In Focus Photography was nominated for an international photo award!

\n\n\n\n

Please vote for us!

\n", - "excerpt": "", - "slug": "some-news-to-share-2", - "guid": "http://infocusphotographers.com/?p=237", - "status": "private", - "sticky": false, - "password": "", - "parent": false, - "type": "post", - "discussion": { - "comments_open": true, - "comment_status": "open", - "pings_open": true, - "ping_status": "open", - "comment_count": 0 - }, - "likes_enabled": true, - "sharing_enabled": true, - "like_count": 0, - "i_like": false, - "is_reblogged": false, - "is_following": false, - "global_ID": "9dc6f7941b6a68fc2323b652c4e9516b", - "featured_image": "https://infocusphotographers.files.wordpress.com/2019/03/art-bright-celebration-1313817.jpg", - "post_thumbnail": { - "ID": 238, - "URL": "https://infocusphotographers.files.wordpress.com/2019/03/art-bright-celebration-1313817.jpg", - "guid": "http://infocusphotographers.files.wordpress.com/2019/03/art-bright-celebration-1313817.jpg", - "mime_type": "image/jpeg", - "width": 4256, - "height": 2628 - }, - "format": "standard", - "geo": false, - "menu_order": 0, - "page_template": "", - "publicize_URLs": [ - - ], - "terms": { - "category": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880" - } - } - } - }, - "post_tag": { - }, - "post_format": { - }, - "mentions": { - } - }, - "tags": { - }, - "categories": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880" - } - } - } - }, - "attachments": { - "238": { - "ID": 238, - "URL": "https://infocusphotographers.files.wordpress.com/2019/03/art-bright-celebration-1313817.jpg", - "guid": "http://infocusphotographers.files.wordpress.com/2019/03/art-bright-celebration-1313817.jpg", - "date": "2019-03-20T23:44:49+00:00", - "post_ID": 237, - "author_ID": 14151046, - "file": "art-bright-celebration-1313817.jpg", - "mime_type": "image/jpeg", - "extension": "jpg", - "title": "art-bright-celebration-1313817", - "caption": "", - "description": "", - "alt": "", - "thumbnails": { - "thumbnail": "https://infocusphotographers.files.wordpress.com/2019/03/art-bright-celebration-1313817.jpg?w=150", - "medium": "https://infocusphotographers.files.wordpress.com/2019/03/art-bright-celebration-1313817.jpg?w=300", - "large": "https://infocusphotographers.files.wordpress.com/2019/03/art-bright-celebration-1313817.jpg?w=1024" - }, - "height": 2628, - "width": 4256, - "exif": { - "aperture": "0", - "credit": "", - "camera": "", - "caption": "", - "created_timestamp": "0", - "copyright": "", - "focal_length": "0", - "iso": "0", - "shutter_speed": "0", - "title": "", - "orientation": "0", - "keywords": [ - - ] - }, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/media/238", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/media/238/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880", - "parent": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/237" - } - } - } - }, - "attachment_count": 1, - "metadata": [ - { - "id": "493", - "key": "email_notification", - "value": "1553125740" - }, - { - "id": "486", - "key": "jabber_published", - "value": "1553125739" - }, - { - "id": "491", - "key": "timeline_notification", - "value": "1553125810" - }, - { - "id": "484", - "key": "_thumbnail_id", - "value": "238" - } - ], - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/237", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/237/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880", - "replies": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/237/replies/", - "likes": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/237/likes/" - } - }, - "capabilities": { - "publish_post": true, - "delete_post": true, - "edit_post": true - }, - "revisions": [ - 269, - 263, - 239 - ], - "other_URLs": { - "permalink_URL": "http://infocusphotographers.com/2019/03/13/%postname%/", - "suggested_slug": "some-news-to-share-2" - } - } - } -} \ No newline at end of file diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_265.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_265.json deleted file mode 100644 index d9353f7b5fed..000000000000 --- a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_265.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "request": { - "method": "GET", - "urlPath": "/rest/v1.1/sites/106707880/posts/265/", - "queryParameters": { - "context": { - "equalTo": "edit" - }, - "locale": { - "matches": "(.*)" - } - } - }, - "response": { - "status": 200, - "jsonBody": { - "ID": 265, - "site_ID": 106707880, - "author": { - "ID": 68646169, - "login": "thenomadicwordsmith", - "email": "thenomadicwordsmith@wordpress.com", - "name": "thenomadicwordsmith", - "first_name": "Nomadic", - "last_name": "Wordsmith", - "nice_name": "thenomadicwordsmith", - "URL": "http://thenomadicwordsmith.wordpress.com", - "avatar_URL": "https://0.gravatar.com/avatar/9ba48385fc40dfd9a55a3348d8e7f4d9?s=96&d=identicon&r=G", - "profile_URL": "http://en.gravatar.com/thenomadicwordsmith", - "site_ID": 71769073 - }, - "date": "2019-04-17T10:40:39+00:00", - "modified": "2019-04-17T10:41:03+00:00", - "title": "What we've been doing lately", - "URL": "http://infocusphotographers.com/?p=265", - "short_URL": "https://wp.me/p7dJAQ-4h", - "content": "\r\n

The last few weeks have been a blur! Here are a few shots we really like. What do you think?

\r\n\r\n\r\n\r\n\r\n", - "excerpt": "", - "slug": "", - "guid": "http://infocusphotographers.com/?p=265", - "status": "draft", - "sticky": false, - "password": "", - "parent": false, - "type": "post", - "discussion": { - "comments_open": true, - "comment_status": "open", - "pings_open": true, - "ping_status": "open", - "comment_count": 0 - }, - "likes_enabled": true, - "sharing_enabled": true, - "like_count": 0, - "i_like": false, - "is_reblogged": false, - "is_following": false, - "global_ID": "2f7a8f8da665b6469d91f96108fb24c6", - "featured_image": "", - "post_thumbnail": null, - "format": "standard", - "geo": false, - "menu_order": 0, - "page_template": "", - "publicize_URLs": [ - - ], - "terms": { - "category": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880" - } - } - } - }, - "post_tag": { - }, - "post_format": { - }, - "mentions": { - } - }, - "tags": { - }, - "categories": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880" - } - } - } - }, - "attachments": { - }, - "attachment_count": 0, - "metadata": [ - { - "id": "567", - "key": "geo_public", - "value": "0" - } - ], - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/265", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/265/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880", - "replies": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/265/replies/", - "likes": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/265/likes/" - } - }, - "capabilities": { - "publish_post": true, - "delete_post": true, - "edit_post": true - }, - "revisions": [ - 294, - 293, - 266 - ], - "other_URLs": { - "permalink_URL": "http://infocusphotographers.com/2019/04/17/%postname%/", - "suggested_slug": "what-weve-been-doing-lately" - } - } - } -} \ No newline at end of file diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_387.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_387.json deleted file mode 100644 index d0d103a3d30b..000000000000 --- a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_387.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "request": { - "method": "GET", - "urlPath": "/rest/v1.1/sites/106707880/posts/387/", - "queryParameters": { - "context": { - "equalTo": "edit" - }, - "locale": { - "matches": "(.*)" - } - } - }, - "response": { - "status": 200, - "jsonBody": { - "ID": 387, - "site_ID": 106707880, - "author": { - "ID": 68646169, - "login": "thenomadicwordsmith", - "email": "thenomadicwordsmith@wordpress.com", - "name": "thenomadicwordsmith", - "first_name": "Nomadic", - "last_name": "Wordsmith", - "nice_name": "thenomadicwordsmith", - "URL": "http://thenomadicwordsmith.wordpress.com", - "avatar_URL": "https://0.gravatar.com/avatar/9ba48385fc40dfd9a55a3348d8e7f4d9?s=96&d=identicon&r=G", - "profile_URL": "http://en.gravatar.com/thenomadicwordsmith", - "site_ID": 71769073 - }, - "date": "2019-05-28T21:03:22+00:00", - "modified": "2019-05-28T21:03:22+00:00", - "title": "Time to Book Summer Sessions", - "URL": "http://infocusphotographers.com/?p=387", - "short_URL": "https://wp.me/p7dJAQ-6f", - "content": "Blue skies and warm weather, what's not to love about summer?\n\nIt's a great season for outdoor family portrait sessions and now is the time to book them!\n\nWe offer a number of family portrait packages and for a limited time are offering 15% off packages booked before May 1.\n\n\"beach-clouds-daytime-994605\"\n\nHow to book\nEmail us to set up a time to visit our studio.", - "excerpt": "", - "slug": "", - "guid": "http://infocusphotographers.com/?p=387", - "status": "draft", - "sticky": false, - "password": "", - "parent": false, - "type": "post", - "discussion": { - "comments_open": true, - "comment_status": "open", - "pings_open": true, - "ping_status": "open", - "comment_count": 0 - }, - "likes_enabled": true, - "sharing_enabled": true, - "like_count": 0, - "i_like": false, - "is_reblogged": false, - "is_following": false, - "global_ID": "a9037bde04073835b078a1b1bb48b7de", - "featured_image": "", - "post_thumbnail": null, - "format": "standard", - "geo": false, - "menu_order": 0, - "page_template": "", - "publicize_URLs": [ - - ], - "terms": { - "category": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880" - } - } - } - }, - "post_tag": { - }, - "post_format": { - }, - "mentions": { - } - }, - "tags": { - }, - "categories": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880" - } - } - } - }, - "attachments": { - }, - "attachment_count": 0, - "metadata": false, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/387", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/387/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880", - "replies": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/387/replies/", - "likes": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/387/likes/" - } - }, - "capabilities": { - "publish_post": true, - "delete_post": true, - "edit_post": true - }, - "revisions": [ - 390 - ], - "other_URLs": { - "permalink_URL": "http://infocusphotographers.com/2019/05/28/%postname%/", - "suggested_slug": "time-to-book-summer-sessions" - } - } - } -} \ No newline at end of file diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_396.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_396.json deleted file mode 100644 index c864647c6a79..000000000000 --- a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_396.json +++ /dev/null @@ -1,154 +0,0 @@ -{ - "request": { - "method": "GET", - "urlPath": "/rest/v1.1/sites/106707880/posts/396/", - "queryParameters": { - "context": { - "equalTo": "edit" - }, - "locale": { - "matches": "(.*)" - } - } - }, - "response": { - "status": 200, - "jsonBody": { - "ID": 396, - "site_ID": 106707880, - "author": { - "ID": 742098, - "login": "jkmassel", - "email": "jeremy.massel@gmail.com", - "name": "Jeremy Massel", - "first_name": "Jeremy", - "last_name": "Massel", - "nice_name": "jkmassel", - "URL": "https://jkmassel.wordpress.com", - "avatar_URL": "https://2.gravatar.com/avatar/58fc51586c9a1f9895ac70e3ca60886e?s=96&d=identicon&r=G", - "profile_URL": "http://en.gravatar.com/jkmassel", - "site_ID": 1562023 - }, - "date": "2019-05-28T21:06:45+00:00", - "modified": "2019-05-28T21:08:03+00:00", - "title": "Now Booking Summer Sessions", - "URL": "http://infocusphotographers.com/?p=396", - "short_URL": "https://wp.me/p7dJAQ-6o", - "content": "
“One must maintain a little bit of summer, even in the middle of winter.”\n\n– Henry David Thoreau
\nBlue skies and warm weather, what's not to love about summer? It's a great season for outdoor family portrait sessions and now is the time to book them!\n\nWe offer a number of family portrait packages and for a limited time are offering 15% off packages booked before April 1.\n\nHow to book\n\nEmail us to set up a time to visit our studio.", - "excerpt": "", - "slug": "", - "guid": "http://infocusphotographers.com/?p=396", - "status": "draft", - "sticky": false, - "password": "", - "parent": false, - "type": "post", - "discussion": { - "comments_open": true, - "comment_status": "open", - "pings_open": true, - "ping_status": "open", - "comment_count": 0 - }, - "likes_enabled": true, - "sharing_enabled": false, - "like_count": 0, - "i_like": false, - "is_reblogged": false, - "is_following": false, - "global_ID": "276e4cea0342ec68e69a0ca537acfce1", - "featured_image": "", - "post_thumbnail": null, - "format": "standard", - "geo": false, - "menu_order": 0, - "page_template": "", - "publicize_URLs": [ - - ], - "terms": { - "category": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880" - } - } - } - }, - "post_tag": { - }, - "post_format": { - }, - "mentions": { - } - }, - "tags": { - }, - "categories": { - "Uncategorized": { - "ID": 1, - "name": "Uncategorized", - "slug": "uncategorized", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:uncategorized/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880" - } - } - } - }, - "attachments": { - }, - "attachment_count": 0, - "metadata": [ - { - "id": "742", - "key": "sharing_disabled", - "value": [ - - ] - }, - { - "id": "741", - "key": "switch_like_status", - "value": "" - } - ], - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/396", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/396/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880", - "replies": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/396/replies/", - "likes": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/396/likes/" - } - }, - "capabilities": { - "publish_post": true, - "delete_post": true, - "edit_post": true - }, - "revisions": [ - 399, - 398 - ], - "other_URLs": { - "permalink_URL": "http://infocusphotographers.com/2019/05/28/%postname%/", - "suggested_slug": "now-booking-summer-sessions-2" - } - } - } -} \ No newline at end of file diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_90.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_90.json deleted file mode 100644 index c9e49d952aee..000000000000 --- a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/posts_90.json +++ /dev/null @@ -1,171 +0,0 @@ -{ - "request": { - "method": "GET", - "urlPath": "/rest/v1.1/sites/106707880/posts/90/", - "queryParameters": { - "context": { - "equalTo": "edit" - }, - "locale": { - "matches": "(.*)" - } - } - }, - "response": { - "status": 200, - "jsonBody": { - "ID": 90, - "site_ID": 106707880, - "author": { - "ID": 100907762, - "login": "leahelainerand", - "email": "andreazoellner+leahrand@gmail.com", - "name": "Leah Elaine Rand", - "first_name": "Leah", - "last_name": "Rand", - "nice_name": "leahelainerand", - "URL": "", - "avatar_URL": "https://0.gravatar.com/avatar/62937c26a2a79bae5921ca9e85be8040?s=96&d=identicon&r=G", - "profile_URL": "http://en.gravatar.com/leahelainerand", - "site_ID": 106523982 - }, - "date": "2016-03-07T18:32:11+00:00", - "modified": "2016-03-16T02:01:50+00:00", - "title": "Martin and Amy's Wedding", - "URL": "http://infocusphotographers.com/2016/03/07/martin-and-amys-wedding/", - "short_URL": "https://wp.me/p7dJAQ-1s", - "content": "Martin and Amy are a wonderful couple that John and I were lucky to photograph. The theme for their wedding was sophisticated but warm and everything had a clearly personal touch.\n\nThey decided they wanted the bulk of their wedding photos to be black and white. While some couples like personal, goofy photos, Amy and Martin found a perfect balance between classic elegance and shots with personality.\n\n \n\nhttps://www.instagram.com/p/BCF4Z6UjRjE/?taken-by=photomatt\n\n \n\nhttps://www.instagram.com/p/8qwIAWDRum/?taken-by=photomatt\n\n ", - "excerpt": "", - "slug": "martin-and-amys-wedding", - "guid": "https://infocusphotographers.wordpress.com/?p=90", - "status": "publish", - "sticky": false, - "password": "", - "parent": false, - "type": "post", - "discussion": { - "comments_open": true, - "comment_status": "open", - "pings_open": true, - "ping_status": "open", - "comment_count": 0 - }, - "likes_enabled": true, - "sharing_enabled": true, - "like_count": 0, - "i_like": false, - "is_reblogged": false, - "is_following": false, - "global_ID": "8ffbda2c616a90c6b92efe4fb016fe95", - "featured_image": "https://infocusphotographers.files.wordpress.com/2016/02/photo-1453857271477-4f9a4081966e1.jpeg", - "post_thumbnail": { - "ID": 82, - "URL": "https://infocusphotographers.files.wordpress.com/2016/02/photo-1453857271477-4f9a4081966e1.jpeg", - "guid": "http://infocusphotographers.files.wordpress.com/2016/02/photo-1453857271477-4f9a4081966e1.jpeg", - "mime_type": "image/jpeg", - "width": 3853, - "height": 2384 - }, - "format": "standard", - "geo": false, - "menu_order": 0, - "page_template": "", - "publicize_URLs": [ - - ], - "terms": { - "category": { - "Wedding": { - "ID": 1674, - "name": "Wedding", - "slug": "wedding", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:wedding", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:wedding/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880" - } - } - } - }, - "post_tag": { - }, - "post_format": { - }, - "mentions": { - } - }, - "tags": { - }, - "categories": { - "Wedding": { - "ID": 1674, - "name": "Wedding", - "slug": "wedding", - "description": "", - "post_count": 1, - "parent": 0, - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:wedding", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/categories/slug:wedding/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880" - } - } - } - }, - "attachments": { - }, - "attachment_count": 0, - "metadata": [ - { - "id": "201", - "key": "jabber_published", - "value": "1457375532" - }, - { - "id": "198", - "key": "_thumbnail_id", - "value": "82" - }, - { - "id": "234", - "key": "_wpas_done_13895248", - "value": "1" - }, - { - "id": "231", - "key": "_wpas_mess", - "value": "An amazing weekend, a wonderful couple, and beautiful photos to match! Check it out!" - } - ], - "meta": { - "links": { - "self": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/90", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/90/help", - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880", - "replies": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/90/replies/", - "likes": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/90/likes/" - } - }, - "capabilities": { - "publish_post": true, - "delete_post": true, - "edit_post": true - }, - "revisions": [ - 102, - 101, - 100, - 93, - 92, - 91 - ], - "other_URLs": { - } - } - } -} \ No newline at end of file diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_v11_sites_106707880_posts_439_replies.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_sites_106707880_posts_439_replies.json similarity index 100% rename from API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_v11_sites_106707880_posts_439_replies.json rename to API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_sites_106707880_posts_439_replies.json diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_v11_sites_106707880_posts_439_replies_new.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_sites_106707880_posts_439_replies_new.json similarity index 100% rename from API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_v11_sites_106707880_posts_439_replies_new.json rename to API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_sites_106707880_posts_439_replies_new.json diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_v12_sites_181851495_posts-draft,pending.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_sites_181851495_posts-draft,pending.json similarity index 100% rename from API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_v12_sites_181851495_posts-draft,pending.json rename to API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_sites_181851495_posts-draft,pending.json diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_v12_sites_181977606_posts-draft,pending.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_sites_181977606_posts-draft,pending.json similarity index 100% rename from API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_v12_sites_181977606_posts-draft,pending.json rename to API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_sites_181977606_posts-draft,pending.json diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_v12_sites_181977606_posts-scheduled.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_sites_181977606_posts-scheduled.json similarity index 95% rename from API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_v12_sites_181977606_posts-scheduled.json rename to API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_sites_181977606_posts-scheduled.json index 814834a89655..b4054b30aeef 100644 --- a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_v12_sites_181977606_posts-scheduled.json +++ b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_sites_181977606_posts-scheduled.json @@ -1,7 +1,7 @@ { "request": { "method": "GET", - "urlPath": "/rest/v1.2/sites/181977606/posts", + "urlPattern": "/rest/v1.2/sites/181977606/posts", "queryParameters": { "locale": { "matches": "(.*)" @@ -44,8 +44,8 @@ "profile_URL": "https://en.gravatar.com/appstorescreens", "site_ID": 181977606 }, - "date": "{{now offset='+2 days'}}", - "modified": "2020-10-05T15:04:51+00:00", + "date": "{{#assign 'customformat'}}yyyy-MM-dd'T'HH:mm:ss{{/assign}}{{now offset='+2 hours' format=customformat}}", + "modified": "{{now offset='+2 hours' format=customformat}}", "title": "Lemon Cheesecake Tartlets", "URL": "https://weekendbakesblog.wordpress.com/easy-blueberry-muffins/", "short_URL": "https://wp.me/pcjyGG-e", diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_v11_sites_posts_subscribers_mine.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_v11_sites_posts_subscribers_mine.json deleted file mode 100644 index a5d3d70cf98b..000000000000 --- a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/posts/rest_v11_sites_posts_subscribers_mine.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "request": { - "method": "GET", - "urlPath": "/rest/v1.1/sites/106707880/posts/439/subscribers/mine" - }, - "response": { - "status": 200, - "jsonBody": { - "i_subscribe": false, - "receives_notifications": false, - "meta": { - "links": { - "site": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880", - "posts": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/439", - "help": "{{request.requestLine.baseUrl}}/rest/v1.1/sites/106707880/posts/439/subscribers/help" - } - } - } - } -} From ba97a832fa6770bfcef78bfbc81920795719a770 Mon Sep 17 00:00:00 2001 From: jos <17252150+jostnes@users.noreply.github.com> Date: Mon, 10 Jul 2023 18:53:34 +0800 Subject: [PATCH 70/72] update blog url to match what's displayed in ui --- .../main/assets/mocks/mappings/wpcom/me/rest_v11_me_sites.json | 2 +- .../JetpackScreenshotGeneration.swift | 2 +- .../WordPressScreenshotGeneration.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/me/rest_v11_me_sites.json b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/me/rest_v11_me_sites.json index 68c2dc010113..1a523d55e311 100644 --- a/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/me/rest_v11_me_sites.json +++ b/API-Mocks/WordPressMocks/src/main/assets/mocks/mappings/wpcom/me/rest_v11_me_sites.json @@ -359,7 +359,7 @@ "ID": 181977606, "description": "Site with everything enabled", "name": "Weekend Bakes", - "URL": "yourjetpack.blog", + "URL": "weekendbakesblog.wordpress.com", "user_can_manage": false, "capabilities": { "edit_pages": true, diff --git a/WordPress/JetpackScreenshotGeneration/JetpackScreenshotGeneration.swift b/WordPress/JetpackScreenshotGeneration/JetpackScreenshotGeneration.swift index 6b0c6cbc9e71..00ecd1c24c0d 100644 --- a/WordPress/JetpackScreenshotGeneration/JetpackScreenshotGeneration.swift +++ b/WordPress/JetpackScreenshotGeneration/JetpackScreenshotGeneration.swift @@ -25,7 +25,7 @@ class JetpackScreenshotGeneration: XCTestCase { try LoginFlow.login(email: WPUITestCredentials.testWPcomUserEmail, password: WPUITestCredentials.testWPcomPassword, - selectedSiteTitle: "yourjetpack.blog") + selectedSiteTitle: "weekendbakesblog.wordpress.com") } override func tearDown() { diff --git a/WordPress/WordPressScreenshotGeneration/WordPressScreenshotGeneration.swift b/WordPress/WordPressScreenshotGeneration/WordPressScreenshotGeneration.swift index 379e0109d919..9f8d7839d337 100644 --- a/WordPress/WordPressScreenshotGeneration/WordPressScreenshotGeneration.swift +++ b/WordPress/WordPressScreenshotGeneration/WordPressScreenshotGeneration.swift @@ -58,7 +58,7 @@ class WordPressScreenshotGeneration: XCTestCase { if XCUIDevice.isPad { let ipadScreenshot = try MySiteScreen() .showSiteSwitcher() - .switchToSite(withTitle: "yourjetpack.blog") + .switchToSite(withTitle: "weekendbakesblog.wordpress.com") .gotoPostsScreen() .showOnly(.drafts) .selectPost(withSlug: "easy-blueberry-muffins") From d9b9b1d1ac071db2a8f2c0820b0ab2931eada922 Mon Sep 17 00:00:00 2001 From: kean Date: Mon, 10 Jul 2023 11:38:33 -0400 Subject: [PATCH 71/72] Fix Blaze dashboard card not reloading when switching blogs --- .../BlogDashboardViewController.swift | 5 +---- .../Blaze/DashboardBlazeCardCellViewModel.swift | 2 +- .../ViewModel/BlogDashboardViewModel.swift | 15 ++++++++++++--- .../Blog/My Site/MySiteViewController.swift | 2 +- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/BlogDashboardViewController.swift b/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/BlogDashboardViewController.swift index e6b2a62a5aea..3e5bd432ca8b 100644 --- a/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/BlogDashboardViewController.swift +++ b/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/BlogDashboardViewController.swift @@ -112,10 +112,7 @@ final class BlogDashboardViewController: UIViewController { } self.blog = blog - viewModel.blog = blog - BlogDashboardAnalytics.shared.reset() - viewModel.loadCardsFromCache() - viewModel.loadCards() + self.viewModel.update(blog: blog) } @objc func refreshControlPulled() { diff --git a/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Blaze/DashboardBlazeCardCellViewModel.swift b/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Blaze/DashboardBlazeCardCellViewModel.swift index fecbb50eaac3..6b829bef2c4a 100644 --- a/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Blaze/DashboardBlazeCardCellViewModel.swift +++ b/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Blaze/DashboardBlazeCardCellViewModel.swift @@ -4,7 +4,7 @@ import WordPressKit final class DashboardBlazeCardCellViewModel { private(set) var state: State = .promo - private let blog: Blog + private var blog: Blog private let service: BlazeServiceProtocol private let store: DashboardBlazeStoreProtocol private var isRefreshing = false diff --git a/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/ViewModel/BlogDashboardViewModel.swift b/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/ViewModel/BlogDashboardViewModel.swift index 9f7335f6ce2b..41a9b92b6ae5 100644 --- a/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/ViewModel/BlogDashboardViewModel.swift +++ b/WordPress/Classes/ViewRelated/Blog/Blog Dashboard/ViewModel/BlogDashboardViewModel.swift @@ -19,12 +19,12 @@ enum DashboardItem: Hashable { typealias DashboardSnapshot = NSDiffableDataSourceSnapshot typealias DashboardDataSource = UICollectionViewDiffableDataSource -class BlogDashboardViewModel { +final class BlogDashboardViewModel { private weak var viewController: BlogDashboardViewController? private let managedObjectContext: NSManagedObjectContext - var blog: Blog + private var blog: Blog private var currentCards: [DashboardCardModel] = [] @@ -78,7 +78,7 @@ class BlogDashboardViewModel { } }() - private let blazeViewModel: DashboardBlazeCardCellViewModel + private var blazeViewModel: DashboardBlazeCardCellViewModel init(viewController: BlogDashboardViewController, managedObjectContext: NSManagedObjectContext = ContextManager.shared.mainContext, blog: Blog) { self.viewController = viewController @@ -93,6 +93,15 @@ class BlogDashboardViewModel { loadCardsFromCache() } + /// Update to display the selected blog. + func update(blog: Blog) { + BlogDashboardAnalytics.shared.reset() + self.blog = blog + self.blazeViewModel = DashboardBlazeCardCellViewModel(blog: blog) + self.loadCardsFromCache() + self.loadCards() + } + /// Call the API to return cards for the current blog func loadCards(completion: (([DashboardCardModel]) -> Void)? = nil) { viewController?.showLoading() diff --git a/WordPress/Classes/ViewRelated/Blog/My Site/MySiteViewController.swift b/WordPress/Classes/ViewRelated/Blog/My Site/MySiteViewController.swift index 4812d2cf0152..9aeaebd7d58c 100644 --- a/WordPress/Classes/ViewRelated/Blog/My Site/MySiteViewController.swift +++ b/WordPress/Classes/ViewRelated/Blog/My Site/MySiteViewController.swift @@ -145,7 +145,7 @@ class MySiteViewController: UIViewController, NoResultsViewHost { blogDetailsViewController?.presentationDelegate = self } } - private(set) var blogDashboardViewController: BlogDashboardViewController? + private var blogDashboardViewController: BlogDashboardViewController? /// When we display a no results view, we'll do so in a scrollview so that /// we can allow pull to refresh to sync the user's list of sites. From ba5e5c2ea34136c067b5f58e8cf81a501df6e486 Mon Sep 17 00:00:00 2001 From: Momo Ozawa Date: Mon, 10 Jul 2023 17:49:27 +0100 Subject: [PATCH 72/72] update bar button item for blaze campaigns screen --- .../Blaze Campaigns/BlazeCampaignsViewController.swift | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Blaze Campaigns/BlazeCampaignsViewController.swift b/WordPress/Classes/ViewRelated/Blaze Campaigns/BlazeCampaignsViewController.swift index 9fdc053487f0..a003f51a6a00 100644 --- a/WordPress/Classes/ViewRelated/Blaze Campaigns/BlazeCampaignsViewController.swift +++ b/WordPress/Classes/ViewRelated/Blaze Campaigns/BlazeCampaignsViewController.swift @@ -5,8 +5,8 @@ import WordPressFlux final class BlazeCampaignsViewController: UIViewController, NoResultsViewHost, BlazeCampaignsStreamDelegate { // MARK: - Views - private lazy var plusButton = UIBarButtonItem( - image: UIImage(systemName: "plus"), + private lazy var createButton = UIBarButtonItem( + title: Strings.createButtonTitle, style: .plain, target: self, action: #selector(buttonCreateCampaignTapped) @@ -169,7 +169,7 @@ final class BlazeCampaignsViewController: UIViewController, NoResultsViewHost, B private func setupNavBar() { title = Strings.navigationTitle - navigationItem.rightBarButtonItem = plusButton + navigationItem.rightBarButtonItem = createButton } private func setupNoResults() { @@ -245,6 +245,7 @@ private extension BlazeCampaignsViewController { enum Strings { static let navigationTitle = NSLocalizedString("blaze.campaigns.title", value: "Blaze Campaigns", comment: "Title for the screen that allows users to manage their Blaze campaigns.") static let promoteButtonTitle = NSLocalizedString("blaze.campaigns.promote.button.title", value: "Promote", comment: "Button title for the button that shows the Blaze flow when tapped.") + static let createButtonTitle = NSLocalizedString("blaze.campaigns.create.button.title", value: "Create", comment: "Button title for the button that shows the Blaze flow when tapped.") enum NoResults { static let loadingTitle = NSLocalizedString("blaze.campaigns.loading.title", value: "Loading campaigns...", comment: "Displayed while Blaze campaigns are being loaded.")