Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ struct MockAppSettingsActionHandler: MockActionHandler {
case .upsertProductsSettings(_, _, _, _, _, _, _, let onCompletion):
onCompletion(nil)
case .resetEligibilityErrorInfo,
.setTelemetryAvailability
:
.setTelemetryAvailability,
.getAppPasswordsExperimentSettingState,
.getPOSSurveyCurrentMerchantNotificationScheduled,
.getPOSSurveyPotentialMerchantNotificationScheduled,
.getHasPOSBeenOpenedAtLeastOnce:
break
default: unimplementedAction(action: action)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. Should we actually have this default, if this is causing issues?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm in the middle about it:

I think we shouldn't use default in general to just hide from the compiler that the action hasn't been handled, despite being a mock it just forces a runtime error for no reason imho.

On the other side is not causing much trouble since only runs when we have to trigger the screenshot tests. I had to add a couple more actions here on a separate PR while working with WooCommerceScreenshots but that's about it. Updating it now means adding 67 actions to the switch statement that are missing 😅

}
Expand Down
Loading