Repository navigation
E2E: same flows as the native SDKs - #31
Merged
Merged
Conversation
Ports the native Android and iOS SDK e2e rows to the wrapper, driven by one environment table (e2e/e2e-env.json) and one flow table (e2e/e2e-flows.json): custom-domain and subdomain click-token installs, probabilistic installs, the link-type matrix (general, campaign, influencer, partner) with per_install reward checks, re-engagement on link-type links (openCount, no second reward), and the per_event / rev_share event-reward rows. Prod is the default; links a run's environment doesn't have are skipped with a notice. e2e/targets.py resolves the tables for the runners and validates them, e2e/verify.py holds the backend rules (as the native scripts/e2e-verify.py). The example app's e2e panel gains a deny-consent and a track-install button and a kickflip://e2e/events hook for the reward rows (e2e builds only).
…n CI The retry flag sat before the subcommand, where Maestro rejects it, so every iOS retry failed at once. The config job now also runs maestro check-syntax on every flow.
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.
Brings the React Native wrapper's Maestro e2e up to the native Android and iOS SDK suites. It uses the same data-driven setup: one environment table (
e2e/e2e-env.json) and one flow table (e2e/e2e-flows.json). Prod is the default. When an environment has no link for a link type or reward, those rows are skipped with a notice, never failed.Flows (per platform)
consent_promptconsent_promptreengagement(allow)reengagement_allow,reengagement_denytrack_eventtrack_eventsummer-sale)deferred_custom_allow,deferred_custom_denydiscounted-product)deferred_allow,deferred_denydeferred_subdomain_allow,deferred_subdomain_denycustom-problistic,ios-problistic)deferred_{custom,subdomain}_{allow,deny}_problistic(4)e2e-general,-campaign,-influencer,-partner)deferred_custom_{allow,deny}__<type>(8):linkType/sourcein customData; reward: per_install earned on influencer/partner allow, nothing on deny,reward: nullon the othersreengagement_type_{allow,deny}__<type>(8):openCount+1 / unchanged;installCountand earning unchangede2e-event)deferred_event_{allow,deny}: dev only, skipped on prod (no link yet)e2e-revshare)deferred_revshare_{allow,deny}Left out on purpose:
How it works
e2e/targets.pyresolves the tables (resolve,jobs) and checks that they match the flow files (validate).e2e/verify.pyholds the backend rules from the nativescripts/e2e-verify.py: install, fraud, reward, re-engagement, and event earning by the contract formula.e2e/lib.shis one runner for both platforms.e2e/android.shande2e/ios.shonly add each platform's steps: staging the click, installing, opening the link, driving Maestro.backend_checks(earning, open_count, events) say which verify fields each backend has. A check that is off is noted as skipped on the row. On prod: earning and open_count are on, events is off (same as the native configs).e2e-deny-consentande2e-track-installbuttons and thee2e-install/e2e-eventslines.kickflip://e2e/events?list=<JSON>hook sends the reward events.linkDomainstakes the run's hosts from the e2e config.configjob runs validate, the unit tests and shellcheck. A manual run can pickenvironment(prod | dev) andlink_types. The jobs write a results table to the job summary and uploadresults-*.jsonl. Timeouts are raised for the longer suite. Runners are GitHub-hosted only.devmatches the native dev config. Android points the debug app at the dev backend. iOS skips the real rows on dev with a notice, because the binary SDK has no backend override.Secrets needed
LINKTRAIL_KEY: SDK key of the prod workspace "Starter - Oldest - E2E". Already referenced, but not set on this repo.E2E_TOKEN:X-E2E-TokenforGET /v1/e2e/clicks/:token. Already referenced, but not set on this repo.LINKTRAIL_TEST_KEY: new, dev workspace key, only for manual dev runs.Without the environment's key and
E2E_TOKEN(forks, or today), onlyconsent_promptruns. Every other row is skipped with a notice. Both app ids must be in the backend'sE2E_APP_IDENTIFIERS.Checks run locally
python3 -I e2e/targets.py validate: OK, 32 rows per platform and environment.python3 -I -m unittest discover -s e2e/tests: 18 tests OK.shellcheck -x e2e/*.shandactionlint: clean.npm run lint: 0 errors, 3 warnings, all insrc/, which this PR doesn't touch.npm run typecheck, the example'stsc --noEmit,npm test(69 tests) and the Android JS bundle: all pass.e2e/lib.shwith a stubbed device and backend covered the click, link-type reward, re-engagement and rev_share rows, plus the prod skip ofdeferred_event_*.Impact
CI only. There is no change to the published package (
src/,android/,ios/untouched) and no database change. The example app changes only render or act in e2e builds (e2eConfig.enabled). Once the secrets are set, the real rows make real clicks and installs on the prod E2E workspace. That is about 15 counted installs per platform per run. This stays under the backend's 20-per-IP-per-hourip_velocityrule, but several runs in an hour from one runner could trip it.