[SDK-115] Re-enable BCIT embedded message test#1064
Open
franco-zalamena-iterable wants to merge 1 commit into
Open
[SDK-115] Re-enable BCIT embedded message test#1064franco-zalamena-iterable wants to merge 1 commit into
franco-zalamena-iterable wants to merge 1 commit into
Conversation
franco-zalamena-iterable
added a commit
that referenced
this pull request
Jun 2, 2026
CI run on PR #1064 surfaced four failures that all share the same root cause: the Pixel Launcher ANRs on Ubuntu+KVM during heavy parallel work and steals focus from the activity-under-test, so findObject().exists() returns false even though the view is in the tree (logcat shows `current package: android` instead of `com.iterable.integration.tests`). Three fixes: 1. BaseIntegrationTest.setUp now pressBack/pressHome to dismiss any lingering system dialog before the test runs. Universal CI-emulator hardening; benefits every test class that extends BaseIntegrationTest. 2. EmbeddedMessageIntegrationTest + DeepLinkIntegrationTest now use findObject().waitForExists(5000) instead of bare .exists(). ActivityScenario reports RESUMED before the view tree is fully rendered; waitForExists handles the race. Same pattern as PushNotificationIntegrationTest already uses. 3. activity_main.xml is now wrapped in a ScrollView so the Test Scenario buttons stay reachable even when the override card grows. Local verification: `Tests 7/7 completed. (0 skipped) (0 failed)` for the full non-push suite with `ci=true`. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
franco-zalamena-iterable
added a commit
that referenced
this pull request
Jun 2, 2026
CI run on PR #1064 surfaced four failures that all share the same root cause: the Pixel Launcher ANRs on Ubuntu+KVM during heavy parallel work and steals focus from the activity-under-test, so findObject().exists() returns false even though the view is in the tree (logcat shows `current package: android` instead of `com.iterable.integration.tests`). Three fixes: 1. BaseIntegrationTest.setUp now pressBack/pressHome to dismiss any lingering system dialog before the test runs. Universal CI-emulator hardening; benefits every test class that extends BaseIntegrationTest. 2. EmbeddedMessageIntegrationTest + DeepLinkIntegrationTest now use findObject().waitForExists(5000) instead of bare .exists(). ActivityScenario reports RESUMED before the view tree is fully rendered; waitForExists handles the race. Same pattern as PushNotificationIntegrationTest already uses. 3. activity_main.xml is now wrapped in a ScrollView so the Test Scenario buttons stay reachable even when the override card grows. Local verification: `Tests 7/7 completed. (0 skipped) (0 failed)` for the full non-push suite with `ci=true`. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…:// URLs Two missing pieces vs the iOS BCIT embedded test: 1. The BCIT campaign's audience predicate is on `membershipLevel == "premium"`, not on `isPremium == true`. Android was sending the wrong field, so the audience never matched and /api/embedded-messaging/messages returned `placements: []`. iOS sends `membershipLevel: "premium" / "standard"` (see EmbeddedMessageTestViewModel.swift:90); this commit does the same from both the test and the on-screen toggle. 2. The deeplink button on placement 2157 fires `openUrl` with `tester://testview`. The Iterable SDK drops URLs whose scheme isn't in IterableConfig.allowedProtocols. iOS configures `["tester", "https", "http"]`; Android did not, so the SDK silently dropped the URL and the URL handler never fired. Add the same allowed protocols in BaseIntegrationTest. Removed the @ignore on testEmbeddedMessageMVP. Renamed the isPremium-themed toggle / labels in EmbeddedMessageTestActivity to membership-level wording for parity. Local verification (CI mode, dated user, full non-push suite): Tests 7/7 completed. (0 skipped) (0 failed) BUILD SUCCESSFUL Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
34a515e to
e46e63a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Re-enables
EmbeddedMessageIntegrationTest#testEmbeddedMessageMVPwhich the parent SDK-115 PR@Ignore'd while the diagnosis was outstanding.Three pieces, all of them pulling Android into shape with iOS:
YYYY-MM-DD-integration-test-user@test.com). NewTestUserEmailGenerator(with 4 unit tests) and theBaseIntegrationTest.testUserEmailcompanion property pick the dated email when the workflow passesci=true, otherwise fall back to theBuildConfig.ITERABLE_TEST_USER_EMAILsecret. Avoids state accumulating on a long-lived shared user.membershipLevel == \"premium\", notisPremium == true. Android was sending the wrong field, so the audience never matched and/api/embedded-messaging/messagesreturnedplacements: []. iOS sendsmembershipLevel: \"premium\" / \"standard\"(EmbeddedMessageTestViewModel.swift:90); we now do the same from both the test and the on-screen toggle.openUrlwithtester://testview, butIterableConfig.allowedProtocolsdefaults to[], so the SDK silently dropped the URL. iOS configures[\"tester\", \"https\", \"http\"]. Now Android does too, inBaseIntegrationTest.Local verification
CI mode, dated user
2026-06-02-integration-test-user@test.com, full non-push suite:Plus 8 unit tests (
TestUserEmailGenerator×4,TestUserEmailOverride×4) all green via:integration-tests:testDebugUnitTest.Push test is filtered out here because it lives on the stacked PR #1062.
Test plan
Integration Tests (BCIT)job runs and is green for InApp + Deeplink + Embedded.SDK-115-bcit-ciafter review; PR [SDK-115] BCIT push test on CI #1062 (push tests) rebases onto the result.🤖 Generated with Claude Code