core, ui: test app views on the core's recorded responses (#8234)

* core, ui: plan name alert tests against core fixtures

* core: write name lookup responses to app fixtures in name tests

* android, desktop: name alerts tested against core fixtures

* core, ios: plan Swift fixtures and iOS unit tests of name alerts

* core: write name lookup responses in the Swift form to iOS fixtures

* ios: name alerts tested against core fixtures

* core: write both app fixtures of a name test in one run

* ui: add name lookup responses written by the core tests as fixtures

* core: keep the fixture writer of name tests to the forms it receives

* desktop: run name alert tests in the US locale

* ios: one switch for the title and effect of name alert actions

* docs: name alert tests in the app specs, CI guide and plan

* docs: known gaps of the name alert tests in the plan

* ui: restore the name alert code and the iOS project of master

* core: record name lookup responses and name parses for app tests

* android, desktop: test name alerts of planAndConnect on recorded responses

* ci: run the app tests for a change of the name fixtures

* core: name lookup responses and name parses recorded by the core tests

* docs: plan of app views tested on core responses

* ios: test name alerts of planAndConnect on recorded responses

* ci: iOS unit tests in the iOS job, the app launched on stub migrations

* android, desktop: core hooks below the externals, in the specs

* ios: name alert tests compile with the converter at file scope

* ui: the moved name test expects the alert to open a chat with the new address

* core, ui: app test fixtures under tests/fixtures/api

* core: record the responses of the name lookup flows that the apps test

* core: record URI parses, and normalize the random values of fixtures

* android, desktop: URI parse hook and event processing for tests

* ios: URI parse hook for tests

* desktop: full failure messages of tests

* core: domain errors view compiles with GHC 8.10.7

* core: normalize parses and profile send times in fixtures

* core: record the parses of the chat list search

* core: recorded responses of the name flows and the contact address

* android, desktop: test name alerts, buttons, search and name view

* ios: test name alerts, buttons, search and the moved event

* docs: plan, specs and CI guide of the app tests
This commit is contained in:
Evgeny @ SimpleX Chat authored and GitHub committed 2026-11-16 23:36:37 +00:00
1 parent 88767bbc3a
commit 73761e6e0b
42 files changed
+5787 -34

No files matched your search

+24
View File
@@ -20,6 +20,7 @@ on:
- "apps/simplex-directory-service/**"
- "apps/multiplatform/**"
- "apps/ios/**"
- "tests/fixtures/api/**"
- "tests/**"
- "bots/src/**"
- "simplex-chat.cabal"
@@ -1396,6 +1397,29 @@ jobs:
ARCHS=arm64 \
CODE_SIGNING_ALLOWED=NO
- name: Run iOS unit tests
timeout-minutes: 30
shell: bash
run: |
runtime=com.apple.CoreSimulator.SimRuntime.iOS-$(xcrun --sdk iphonesimulator --show-sdk-version | tr . -)
device=$(xcrun simctl list runtimes --json | python3 -c 'import json, sys; r = next(r for r in json.load(sys.stdin)["runtimes"] if r["identifier"] == sys.argv[1]); print(next(t["identifier"] for t in r["supportedDeviceTypes"] if t["productFamily"] == "iPhone"))' "$runtime")
udid=$(xcrun simctl create unit-tests "$device" "$runtime")
xcodebuild test \
-project apps/ios/SimpleX.xcodeproj \
-scheme "SimpleX Unit Tests" \
-configuration Debug \
-destination "id=$udid" \
-onlyUsePackageVersionsFromResolvedFile \
-skipPackagePluginValidation \
-skipMacroValidation \
-testLanguage en \
-testRegion US \
ARCHS=arm64 \
CODE_SIGN_STYLE=Manual \
CODE_SIGN_IDENTITY=- \
DEVELOPMENT_TEAM= \
PROVISIONING_PROFILE_SPECIFIER=
# =========================
# Windows Build
# =========================