Skip to content

@W-21532895 Additional UI test automation for authentication#4004

Open
wmathurin wants to merge 10 commits intoforcedotcom:devfrom
wmathurin:more_automation
Open

@W-21532895 Additional UI test automation for authentication#4004
wmathurin wants to merge 10 commits intoforcedotcom:devfrom
wmathurin:more_automation

Conversation

@wmathurin
Copy link
Contributor

New test coverage

  • MU-03: Revoke User B's refresh token --> testLogoutUserWithDynamicConfig_OtherUserUnaffected, testDifferentAppTypes_LogoutCaUser_EcaUserUnaffected
  • NEG-01: Invalid consumer key in dynamic config --> testDynamicConfigurationWithInvalidClientId
  • NEG-02: Invalid scope in dynamic config --> testDynamicConfigurationWithInvalidScope
  • 2.7: Migrate CA (user agent) → ECA-Extended (web server) --> testMigrateCAUserAgentToECAWebServer
  • 2.8: Migrate CA (user agent) → Beacon-Extended (web server) --> testMigrateCAUserAgentToBeaconWebServer

Also renamed existing revocation tests for clarity:

  • testRevokeUserWithDynamicConfig_OtherUserUnaffected --> testRevokeAccessForUserWithDynamicConfig_OtherUserUnaffected
  • testDifferentAppTypes_RevokeCaUser_EcaUserUnaffected --> testDifferentAppTypes_RevokeAccessForCaUser_EcaUserUnaffected

Other changes

Auth Flow Types Configuration

  • Added import button to AuthFlowTypesView with JSON-based configuration (similar to BootConfigEditor)
  • Created AuthFlowTypesPageObject to encapsulate auth flow type interactions
  • Showing a AuthFlowTypesView in the "Change Key" sheet (used to migrate refresh token)

More balanced test suites (for faster parallel execution)

  • Split up LegacyLoginTests into LegacyLoginTests and LegacyLoginTestsNotHbyrid

UI Testing Environment Variable

  • Added IS_UI_TESTING environment variable to conditionally show/hide UI elements during tests
  • DiscoveryResultEditor now only visible during automated tests, hidden from production users
  • Set in BaseAuthFlowTester.launch() via app.launchEnvironment["IS_UI_TESTING"] = "1"

- login with invalid client id in dynamic configuration
- login with invalid scope in dynamic configuration
…erver)

Using accessibility identifier to auth flow type toggles
Import button to set auth flow types by providing a JSON string (toggling was not working all the time)
@github-actions
Copy link

github-actions bot commented Mar 12, 2026

TestsPassed ☑️SkippedFailed ❌️
SalesforceSDKCore iOS ^18 Test Results599 ran597 ✅2 ❌
TestResult
SalesforceSDKCore iOS ^18 Test Results
DomainDiscoveryCoordinatorTests.testSpecialCharactersInLoginHint()❌ failure
SalesforceRestAPITests.testCreateQuerySearchDelete❌ failure

@codecov
Copy link

codecov bot commented Mar 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.91%. Comparing base (3b43b4d) to head (27e49e5).
⚠️ Report is 18 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #4004      +/-   ##
==========================================
+ Coverage   66.85%   66.91%   +0.05%     
==========================================
  Files         254      254              
  Lines       22427    22462      +35     
==========================================
+ Hits        14994    15030      +36     
+ Misses       7433     7432       -1     
Components Coverage Δ
Analytics 70.78% <ø> (ø)
Common 69.76% <ø> (ø)
Core 59.68% <100.00%> (+0.10%) ⬆️
SmartStore 74.70% <ø> (ø)
MobileSync 87.41% <ø> (ø)
Files with missing lines Coverage Δ
...re/Classes/Login/DevConfig/AuthFlowTypesView.swift 96.22% <100.00%> (+5.31%) ⬆️
...s/Login/DevConfig/LoginOptionsViewController.swift 98.73% <100.00%> (+0.02%) ⬆️

... and 1 file 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

github-actions bot commented Mar 12, 2026

TestsPassed ☑️SkippedFailed ❌️
SalesforceSDKCore iOS ^26 Test Results599 ran595 ✅4 ❌
TestResult
SalesforceSDKCore iOS ^26 Test Results
DomainDiscoveryCoordinatorTests.testExtraQueryParameters()❌ failure
SFUserAccountManagerTests.testAuthHandler❌ failure
SFUserAccountManagerTests.testUserAccountEncoding❌ failure
SalesforceRestAPITests.testUpdateWithIfUnmodifiedSince (failure 1/2)❌ failure
SalesforceRestAPITests.testUpdateWithIfUnmodifiedSince (failure 2/2)❌ failure

@github-actions
Copy link

github-actions bot commented Mar 12, 2026

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

@wmathurin
Copy link
Contributor Author

Locally, all the tests are passing.
Screenshot 2026-03-11 at 8 00 45 PM

- Add check_retries: false to prevent counting retried tests separately
- Add group_suite: true to group tests by test suite in report
- Ensures test counts show actual test count (71) not inflated retry counts
@wmathurin wmathurin requested review from brandonpage and sfdctaka and removed request for brandonpage March 12, 2026 20:38
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.

1 participant