Skip to content

Add support for testing in-app messages in SwiftUI previews#8351

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
Jul 16, 2021

Conversation

christibbs
Copy link
Contributor

@christibbschristibbs commented Jul 8, 2021

In core FIAM SDK: Opens up initializers for image subclasses

  • See changes in FirebaseInAppMessaging/Sources/Public/FirebaseInAppMessaging/FIRInAppMessagingRendering.h

In core FIAM UI test project, refactor to use open message initializers

  • See changes in test files
    FirebaseInAppMessaging/Tests/Integration/DefaultUITestApp/FiamDisplaySwiftExample/BannerMessageViewController.swift
    FirebaseInAppMessaging/Tests/Integration/DefaultUITestApp/FiamDisplaySwiftExample/ImageOnlyMessageViewController.swift
    FirebaseInAppMessaging/Tests/Integration/DefaultUITestApp/FiamDisplaySwiftExample/ModalMessageViewController.swift
    FirebaseInAppMessaging/Tests/Integration/DefaultUITestApp/FiamDisplaySwiftExample/CardMessageViewController.swift

In FIAM SwiftUI SDK: Adds preview helper methods to create canned in-app messages

  • See changes in new file FirebaseInAppMessaging/Swift/Source/SwiftUIPreviewHelpers.swift

In FIAM SwiftUI integration test project: Updates project to use SwiftUI preview helpers

  • See changes in new file FirebaseInAppMessaging/Swift/Tests/Integration/FIAMSwiftUI/Shared/ModalInAppMessageView.swift
@google-oss-bot
Copy link

google-oss-bot commented Jul 8, 2021

Coverage Report

Affected SDKs

  • FirebaseInAppMessaging-iOS-FirebaseInAppMessaging.framework

    SDK overall coverage changed from 45.31% (6444730) to 46.08% (2d909b5) by +0.77%.

    FilenameBase (6444730)Head (2d909b5)Diff
    FIRIAMDisplayExecutor.m68.73%68.65%-0.08%
    FIRInAppMessagingRenderingDataClasses.m62.69%88.83%+26.15%

Test Logs

@christibbs
Copy link
ContributorAuthor

@ryanwilson Resolved all open items, PTAL!

Copy link
Member

@ryanwilsonryanwilson left a comment

Choose a reason for hiding this comment

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

Just a couple small things with the xcproject but otherwise LGTM. Thanks!

Indiana Jones getting his hat at the last second

@christibbschristibbs merged commit 6e3f659 into masterJul 16, 2021
@christibbschristibbs deleted the fiam-swiftui-previews branch July 16, 2021 20:04
@firebasefirebase locked and limited conversation to collaborators Aug 16, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3 participants
@christibbs@google-oss-bot@ryanwilson
close