Skip to content

Add UI tests for refresh token rotation#4034

Closed
wmathurin wants to merge 44 commits into
forcedotcom:masterfrom
wmathurin:ui_tests_rtr
Closed

Add UI tests for refresh token rotation#4034
wmathurin wants to merge 44 commits into
forcedotcom:masterfrom
wmathurin:ui_tests_rtr

Conversation

@wmathurin
Copy link
Copy Markdown
Contributor

@wmathurin wmathurin commented May 15, 2026

Summary

  • Adds RTRLoginTests — 8 UI tests covering ECA apps with Refresh Token Rotation (RTR) enabled, across hybrid/non-hybrid flows and with/without app restart
  • assertRevokeAndRefreshWorks now asserts the refresh token rotates after a revoke/refresh cycle for RTR apps, and stays stable for non-RTR apps
  • Adds ecaOpaqueRtr and ecaJwtRtr to KnownAppConfig and AppConfig.isRtr computed property in UITestConfigUtils
  • Updates ui_test_config.json.sample with the two new RTR app entries
  • Updates overview.md to document the new test class and app configs

Known failures — W-22512846

testECAJwtRtr_Hybrid and testECAJwtRtr_Hybrid_WithRestart are expected to fail until W-22512846 (Enable Named JWTs for Hybrid Flows) is resolved on the server side.

The server currently returns invalid_grant when RTR is used with JWT-based access tokens in hybrid flow. The four non-hybrid and opaque RTR tests are expected to pass.

wmathurin and others added 30 commits April 2, 2026 10:37
Bump to iOS 18 and add corresponding Claude skill
Switch to #Preview macro for SwiftUI views
…e-update

Update UI Tests for login screen changes.
- Remove SFMobileSyncSyncManager+Instrumentation references from MobileSync.xcodeproj
- Remove SFSmartStore+Instrumentation references from SmartStore.xcodeproj

Fixes build errors where Xcode was trying to copy deleted header files.
…signpost-support

Remove signpost support (W-20481716)
…-warnings

Fix compiler warnings in testLoginHostListViewControllerCreatesUniqueInstances
Update SQLCipher to 4.15.0 and add skill
* Add public API to trigger Login for Admin flow.

* Improve code documentation for loginViewControllerDidSelectLoginForAdmin.
sfdctaka and others added 14 commits May 5, 2026 12:54
Add foregroundRegistrationMode enum to re-register all users on app foreground
- Add eca_jwt_rtr and eca_opaque_rtr to KnownAppConfig enum in UITestConfigUtils
- Add AppConfig.isRtr computed property (mirrors issuesJwt pattern)
- Add RTRLoginTests: 8 tests covering hybrid/no-hybrid × jwt/opaque RTR apps, with and without app restart
- assertRevokeAndRefreshWorks now asserts refresh token rotates for RTR apps and stays stable for non-RTR apps
- Update ui_test_config.json.sample with eca_jwt_rtr and eca_opaque_rtr entries
@github-actions
Copy link
Copy Markdown

1 Error
🚫 Please re-submit this PR to the dev branch, we may have already fixed your issue.
1 Warning
⚠️ Big PR, try to keep changes smaller if you can.

Generated by 🚫 Danger

@wmathurin wmathurin changed the title Add RTR login UI tests (ECA JWT RTR + ECA Opaque RTR) Add UI tests for refresh token rotation May 15, 2026
@wmathurin wmathurin closed this May 15, 2026
@github-actions
Copy link
Copy Markdown

1 Warning
⚠️ Static Analysis found an issue with one or more files you modified. Please fix the issue(s).

Clang Static Analysis Issues

File Type Category Description Line Col
SFOAuthCoordinator Nullability Memory error nil assigned to a pointer which is expected to have non-null value 119 19
SFOAuthCoordinator Nullability Memory error nil assigned to a pointer which is expected to have non-null value 243 15

Generated by 🚫 Danger

@github-actions
Copy link
Copy Markdown

TestsPassed ✅SkippedFailed
SalesforceSDKCommon iOS ^26 Test Results40 ran40 ✅
TestResult
No test annotations available

@github-actions
Copy link
Copy Markdown

TestsPassed ✅SkippedFailed
SalesforceSDKCommon iOS ^18 Test Results40 ran40 ✅
TestResult
No test annotations available

@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

❌ Patch coverage is 80.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.22%. Comparing base (fe97c22) to head (077e540).
⚠️ Report is 344 commits behind head on master.

Files with missing lines Patch % Lines
...ses/PushNotification/PushNotificationManager.swift 75.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4034      +/-   ##
==========================================
+ Coverage   63.35%   68.22%   +4.86%     
==========================================
  Files         250      245       -5     
  Lines       21659    21457     -202     
==========================================
+ Hits        13723    14639     +916     
+ Misses       7936     6818    -1118     
Components Coverage Δ
Analytics 70.78% <ø> (ø)
Common 70.69% <66.66%> (+1.29%) ⬆️
Core 61.69% <73.91%> (+7.91%) ⬆️
SmartStore 73.44% <100.00%> (-0.56%) ⬇️
MobileSync 88.79% <ø> (+1.37%) ⬆️
Files with missing lines Coverage Δ
...rceSDKCore/Classes/Common/SalesforceSDKConstants.h 100.00% <100.00%> (+5.88%) ⬆️
...sforceSDKCore/Classes/Common/UIDevice+SFHardware.m 4.82% <ø> (ø)
...ceSDKCore/Classes/Common/WebViewStateManager.swift 53.12% <ø> (-7.49%) ⬇️
...lesforceSDKCore/Classes/OAuth/SFOAuthCoordinator.m 51.81% <ø> (+8.62%) ⬆️
...SalesforceSDKCore/Classes/OAuth/SFSDKAuthSession.m 90.32% <ø> (ø)
...Classes/Security/ScreenLock/ScreenLockUIView.swift 53.03% <ø> (-29.33%) ⬇️
.../Storage/KeyValueEncryptedFileStoreInspector.swift 0.00% <ø> (ø)
...KCore/SalesforceSDKCore/Classes/Util/SFSDKOAuth2.m 66.56% <ø> (+11.36%) ⬆️
...ses/PushNotification/PushNotificationManager.swift 83.54% <75.00%> (+3.36%) ⬆️

... and 37 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Copy Markdown

TestsPassed ✅SkippedFailed
SalesforceAnalytics iOS ^26 Test Results19 ran19 ✅
TestResult
No test annotations available

@github-actions
Copy link
Copy Markdown

TestsPassed ✅SkippedFailed
SalesforceAnalytics iOS ^18 Test Results19 ran19 ✅
TestResult
No test annotations available

@github-actions
Copy link
Copy Markdown

TestsPassed ✅SkippedFailed
SmartStore iOS ^26 Test Results177 ran177 ✅
TestResult
No test annotations available

@github-actions
Copy link
Copy Markdown

TestsPassed ✅SkippedFailed
SmartStore iOS ^18 Test Results177 ran177 ✅
TestResult
No test annotations available

@github-actions
Copy link
Copy Markdown

TestsPassed ✅SkippedFailed
SalesforceSDKCore iOS ^18 Test Results631 ran631 ✅
TestResult
No test annotations available

@github-actions
Copy link
Copy Markdown

TestsPassedSkippedFailed ❌️
AuthFlowTester UI Test Results all1 ran1 ❌
TestResult
AuthFlowTester UI Test Results all
AuthFlowTesterUITests.xctest
LegacyLoginTests.testCAOpaque_DefaultScopes_WebServerFlow()❌ failure

@github-actions
Copy link
Copy Markdown

TestsPassed ✅SkippedFailed
SalesforceSDKCore iOS ^26 Test Results631 ran631 ✅
TestResult
No test annotations available

@github-actions
Copy link
Copy Markdown

TestsPassed ☑️SkippedFailed ❌️
MobileSync iOS ^18 Test Results234 ran232 ✅2 ❌
TestResult
MobileSync iOS ^18 Test Results
SyncManagerTests.testCleanResyncGhostsForMRUTarget❌ failure
SyncUpTargetTests.testSyncUpWithNoType❌ failure

@github-actions
Copy link
Copy Markdown

TestsPassed ☑️SkippedFailed ❌️
MobileSync iOS ^26 Test Results234 ran233 ✅1 ❌
TestResult
MobileSync iOS ^26 Test Results
BatchSyncUpTargetTests.testSyncUpManyLocallyCreatedRecords❌ failure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants