diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fac8e0d..cbec0a18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,16 @@ Dropping a requirement of a major version of a dependency is a new contract. ## [Unreleased] [Unreleased]: https://github.com/atlassian/jira-actions/compare/release-3.27.0...master +### Added +- Split `SetUpAction` into `DisableRichTextEditor` and `HideHealthNotifications`. + +### Deprecated +- Deprecate `SetUpAction` and `SET_UP`. It's too vague to interpret and track performance changes. + Use specific UXes instead, like `DisableRichTextEditor` or `HideHealthNotifications`. + +### Fixed +- Stop disabling Rich Text Editor by default in `Scenario`. RTE is supported since [3.5.0]. + ## [3.27.0] - 2023-01-12 [3.27.0]: https://github.com/atlassian/jira-actions/compare/release-3.26.0...release-3.27.0 diff --git a/src/main/java/com/atlassian/performance/tools/jiraactions/api/scenario/Scenario.java b/src/main/java/com/atlassian/performance/tools/jiraactions/api/scenario/Scenario.java index 5cf54309..a57d5a44 100644 --- a/src/main/java/com/atlassian/performance/tools/jiraactions/api/scenario/Scenario.java +++ b/src/main/java/com/atlassian/performance/tools/jiraactions/api/scenario/Scenario.java @@ -2,9 +2,7 @@ import com.atlassian.performance.tools.jiraactions.api.SeededRandom; import com.atlassian.performance.tools.jiraactions.api.WebJira; -import com.atlassian.performance.tools.jiraactions.api.action.Action; -import com.atlassian.performance.tools.jiraactions.api.action.LogInAction; -import com.atlassian.performance.tools.jiraactions.api.action.SetUpAction; +import com.atlassian.performance.tools.jiraactions.api.action.*; import com.atlassian.performance.tools.jiraactions.api.measure.ActionMeter; import com.atlassian.performance.tools.jiraactions.api.memories.UserMemory; @@ -39,6 +37,6 @@ default Action getLogInAction(WebJira jira, ActionMeter meter, UserMemory userMe * @param meter Measures setup action. */ default Action getSetupAction(WebJira jira, ActionMeter meter) { - return new SetUpAction(jira, meter); + return new HideHealthNotifications(jira, meter); } } diff --git a/src/main/kotlin/com/atlassian/performance/tools/jiraactions/api/ActionType.kt b/src/main/kotlin/com/atlassian/performance/tools/jiraactions/api/ActionType.kt index 4bf1b3b1..1b796237 100644 --- a/src/main/kotlin/com/atlassian/performance/tools/jiraactions/api/ActionType.kt +++ b/src/main/kotlin/com/atlassian/performance/tools/jiraactions/api/ActionType.kt @@ -48,6 +48,9 @@ data class ActionType( @JvmField val VIEW_DASHBOARD = ActionType("View Dashboard") { Unit } @JvmField val VIEW_BOARD = ActionType("View Board") { IssuesOnBoard(it) } @JvmField val LOG_IN = ActionType("Log In") { Unit } +@Deprecated("Use [HIDE_HEALTH_NOTIFICATIONS] and/or [DISABLE_RICH_TEXT_EDITOR] for fine-grained measurement. When you hear 'Set Up' takes 20 seconds, it's not clear what is really involved or what the UX is.") @JvmField val SET_UP = ActionType("Set Up") { Unit } +@JvmField val DISABLE_RICH_TEXT_EDITOR = ActionType("Disable Rich Text Editor") { Unit } +@JvmField val HIDE_HEALTH_NOTIFICATIONS = ActionType("Hide Instance Health Notifications") { Unit } @JvmField val VIEW_COMMENT = ActionType("View Comment") { Unit } @JvmField val VIEW_HISTORY_TAB = ActionType("View History Tab") { IssueObservation(it) } diff --git a/src/main/kotlin/com/atlassian/performance/tools/jiraactions/api/action/DisableRichTextEditor.kt b/src/main/kotlin/com/atlassian/performance/tools/jiraactions/api/action/DisableRichTextEditor.kt new file mode 100644 index 00000000..2fcdf55f --- /dev/null +++ b/src/main/kotlin/com/atlassian/performance/tools/jiraactions/api/action/DisableRichTextEditor.kt @@ -0,0 +1,16 @@ +package com.atlassian.performance.tools.jiraactions.api.action + +import com.atlassian.performance.tools.jiraactions.api.DISABLE_RICH_TEXT_EDITOR +import com.atlassian.performance.tools.jiraactions.api.WebJira +import com.atlassian.performance.tools.jiraactions.api.measure.ActionMeter + +class DisableRichTextEditor( + private val jira: WebJira, + private val meter: ActionMeter +) : Action { + override fun run() { + meter.measure(DISABLE_RICH_TEXT_EDITOR) { + jira.configureRichTextEditor().disable() + } + } +} diff --git a/src/main/kotlin/com/atlassian/performance/tools/jiraactions/api/action/HideHealthNotifications.kt b/src/main/kotlin/com/atlassian/performance/tools/jiraactions/api/action/HideHealthNotifications.kt new file mode 100644 index 00000000..42d75446 --- /dev/null +++ b/src/main/kotlin/com/atlassian/performance/tools/jiraactions/api/action/HideHealthNotifications.kt @@ -0,0 +1,23 @@ +package com.atlassian.performance.tools.jiraactions.api.action + +import com.atlassian.performance.tools.jiraactions.api.HIDE_HEALTH_NOTIFICATIONS +import com.atlassian.performance.tools.jiraactions.api.WebJira +import com.atlassian.performance.tools.jiraactions.api.measure.ActionMeter + +class HideHealthNotifications( + private val jira: WebJira, + private val meter: ActionMeter +) : Action { + override fun run() { + meter.measure(HIDE_HEALTH_NOTIFICATIONS) { + val systemAdministrationPage = jira.administrate().system() + jira.accessAdmin().runWithAccess { + systemAdministrationPage + .troubleshootingAndSupportTools() + .instanceHealth() + .notifications() + .dontShowAny() + } + } + } +} diff --git a/src/main/kotlin/com/atlassian/performance/tools/jiraactions/api/action/SetUpAction.kt b/src/main/kotlin/com/atlassian/performance/tools/jiraactions/api/action/SetUpAction.kt index 68bf8df9..b3fb6970 100644 --- a/src/main/kotlin/com/atlassian/performance/tools/jiraactions/api/action/SetUpAction.kt +++ b/src/main/kotlin/com/atlassian/performance/tools/jiraactions/api/action/SetUpAction.kt @@ -4,21 +4,16 @@ import com.atlassian.performance.tools.jiraactions.api.SET_UP import com.atlassian.performance.tools.jiraactions.api.WebJira import com.atlassian.performance.tools.jiraactions.api.measure.ActionMeter +@Deprecated("Use [HideHealthNotifications] and/or [DisableRichTextEditor] for fine-grained control and measurements") class SetUpAction( private val jira: WebJira, private val meter: ActionMeter ) : Action { + override fun run() { meter.measure(SET_UP) { - jira.configureRichTextEditor().disable() - val systemAdministrationPage = jira.administrate().system() - jira.accessAdmin().runWithAccess { - systemAdministrationPage - .troubleshootingAndSupportTools() - .instanceHealth() - .notifications() - .dontShowAny() - } + DisableRichTextEditor(jira, meter).run() + HideHealthNotifications(jira, meter).run() } } }