test(plugins): find the bundled SQLite plugin by the name the Installed list shows - #2735
Merged
Conversation
…ed list shows Claude-Session: https://claude.ai/code/session_011THKc9TRHE8xjcxXidDHXP
…whose row can sit below the fold Claude-Session: https://claude.ai/code/session_011THKc9TRHE8xjcxXidDHXP
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.
Problem
PluginDisabledRecoveryUITests.testConnectingWithTheDriverSwitchedOffOffersToSwitchItBackOnhas failed on every "macOS Tests" run onmainsince it landed in #2720, and on every open PR (#2728 to #2731), in shard "UI tests 1/3":Both the first attempt and the retry fail at the same line. Example: run 34581195570, job 103213393785.
Root cause
The test looked for a row named
SQLite Driver. The Installed list never shows that name for the bundled SQLite plugin.SQLite DriverisSQLitePlugin.pluginName, which onlyPluginManager.registerBundlereads, and that is the eager load path. The bundled SQLite plugin declaresTableProProvidesDatabaseTypeIdsin itsInfo.plist, soPluginManifest.supportsLazyLoadis true and it goes throughregisterLazyManifestinstead. That path names the entry from the curated registry snapshot'sdisplayName, which isSQLite. Activating the bundle later on demand does not rename the entry. The detail pane's toggle label is built from the same name (Enable %@), so it readsEnable SQLite, notEnable SQLite Driver.The test was never run before it merged: #2720's PR body records
verify.sh uitest PluginDisabledRecoveryUITestsas INCONCLUSIVE locally (0 cases, automation-mode prompt), so the name was never checked against the running app.This is not a macOS 26 versus 27 accessibility-tree difference, and not state leaking between cases. The naming is plain Swift in
PluginManagerand does not depend on the OS.Evidence
The failing case attaches
element-tree-0to the uploaded result bundle (macos-ui-test-results-1). The Settings window's Installed outline in it, from both the first attempt and the retry:value: SQLiteappears exactly once in the tree, andSQLite Driverappears nowhere in either attempt's tree. The other bundled drivers are named the same way (PostgreSQL,MySQL,ClickHouse).Fix
Match the Installed row by
SQLiteand the toggle byEnable SQLite, the name the lazy path shows. Both are exact matches. The eager path cannot showSQLite Driverfor this bundle, because a bundle that declares a database type id always registers lazily, so the test does not accept both spellings. It is not loosened to a prefix or contains match either.A second problem showed up in the retry's tree: the SQLite row sat at y=883, below the bottom of the 390pt outline. The Installed order comes from iterating a dictionary (
winners.valuesindiscoverAllPlugins), so it changes from launch to launch. The test now typesSQLiteinto the list's filter field (sidebar-filter) and looks for the row inside the outline, so it is reachable whatever the order, and the filter text itself cannot satisfy the query.Test-only change, so no CHANGELOG entry. It unblocks the UI gate on #2728 to #2733.
Verification
verify.sh uitestbuild reached "Running tests" with no errors.swiftlint lint --stricton the changed file: 0 violations.InstalledPluginsViewand the CI element tree.Other findings, not in this PR
discoverAllPluginsbuilds it from a dictionary's values.SQLExportPlugin,CSVImportPlugin,CSVInspectorPlugin,MQLExportPlugin), the same element tree shows.registerLazyManifestonly has a display name for driver plugins, from the registry snapshot, and falls back to the bundle id for everything else. The same plugin loaded eagerly shows itspluginName, so its name depends on which load path took it.com.TablePro.uitestdefaults.UITestCase.setUpWithErrorclears it from the XCUITest runner, which is App-Sandboxed and so only reaches its own container. This test switches the SQLite plugin off and relies on its own Enable Plugin step to switch it back on. If it ever fails between those two steps, SQLite stays off for every later case in the shard that opens the sample database, and on a developer machine for later runs too.https://claude.ai/code/session_011THKc9TRHE8xjcxXidDHXP