PMM-14109 Improve Advisor UX - #1083
Conversation
Advisor settings moved out of the Advanced settings tab into a dedicated Advisors tab (/pmm-ui/settings/advisors) in pmm-ui. Point the codeceptjs settings page object and specs, plus the Playwright HA settings page, at the new tab and the renamed advisors-* test ids.
WalkthroughTests and page objects now use the dedicated Advisors settings page for Advisors and STT settings. Advanced settings checks remain for telemetry and update checks. Advisor alerting setup and verification use the new page and apply button. ChangesAdvisors settings routing
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@codeceptjs-e2e/tests/configuration/pages/pmmSettingsPage.js`:
- Around line 127-128: Update getSubpageTooltips() so the stt tooltip is removed
from the advancedSettingsUrl entry and mapped under a separate
advisorsSettingsUrl entry, matching the Advisors tooltip locators defined by
nativeTextLocator and nativeLinkLocator.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 43b79a74-a8af-4711-b296-8770ddec6111
📒 Files selected for processing (6)
codeceptjs-e2e/tests/advisors/stt/sttSettings_test.jscodeceptjs-e2e/tests/configuration/pages/pmmSettingsPage.jscodeceptjs-e2e/tests/configuration/verifyPMMSettingsPageElements_test.jscodeceptjs-e2e/tests/configuration/verifyPMMSettingsPageFunctionality_test.jscodeceptjs-e2e/tests/upgrade/advisorsAlerting_test.jse2e_tests/pages/ha/settings.page.ts
| nativeTextLocator: locate('$advisors-label-description').as('Advisors tooltip'), | ||
| nativeLinkLocator: locate('$advisors-label-description').find('a').as('Advisors tooltip Read more link'), |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Map the STT tooltip to the Advisors subpage.
Line 127-128 uses an Advisors-only locator, but getSubpageTooltips() still attaches this tooltip to advancedSettingsUrl at Line 680-685. A subpage tooltip test will open Advanced Settings and fail to find $advisors-label-description.
Remove stt from the Advanced Settings entry and add a separate advisorsSettingsUrl entry.
Proposed mapping
{
subPage: this.advancedSettingsUrl,
tooltips: {
dataRetention: this.tooltips.advancedSettings.dataRetention,
telemetry: this.tooltips.advancedSettings.telemetry,
- stt: this.tooltips.advancedSettings.stt,
},
},
+ {
+ subPage: this.advisorsSettingsUrl,
+ tooltips: {
+ stt: this.tooltips.advancedSettings.stt,
+ },
+ },🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@codeceptjs-e2e/tests/configuration/pages/pmmSettingsPage.js` around lines 127
- 128, Update getSubpageTooltips() so the stt tooltip is removed from the
advancedSettingsUrl entry and mapped under a separate advisorsSettingsUrl entry,
matching the Advisors tooltip locators defined by nativeTextLocator and
nativeLinkLocator.
Companion to percona/pmm#5656, which moves the Advisor settings out of the Advanced settings tab into a dedicated Advisors tab (
/pmm-ui/settings/advisors).Changes
codeceptjs-e2e/tests/configuration/pages/pmmSettingsPage.js: addadvisorsSettingsUrlandopenAdvisorsSettings(), add theadvisorsentry tosectionTabsList/expandSection, add theadvisorsButton($advisors-button) field, and rename the section test ids ($advanced-advisors→$advisors-settings,$advanced-advisors-label-description→$advisors-label-description).verifyPMMSettingsPageElements_test.js: split the advisor assertions into a new "Verify Advisors Section Elements" scenario that opens the Advisors tab.verifyPMMSettingsPageFunctionality_test.js,advisors/stt/sttSettings_test.js,upgrade/advisorsAlerting_test.js: navigate to the Advisors tab and apply changes viaadvisorsButton.e2e_tests/pages/ha/settings.page.ts: route theadvisorstoggle to the Advisors tab and apply viaadvisors-button.Field-level test ids (interval inputs, retention, severity threshold,
switch-input-stt) are unchanged — they just live under the new tab now.Note:
databaseChecks_test.js(skipped) still asserts the legacy "checks disabled" link points at/settings/advanced-settings; that link is rendered by the legacy Grafana checks UI and is out of scope for this change.Summary by CodeRabbit