Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable RTE by default #169

Merged
merged 2 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ 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`.

### 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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,7 @@ data class ActionType<out T>(
@JvmField val VIEW_BOARD = ActionType("View Board") { IssuesOnBoard(it) }
@JvmField val LOG_IN = ActionType("Log In") { Unit }
@JvmField val SET_UP = ActionType("Set Up") { Unit }
@JvmField val DISABLE_RTE = ActionType("Disable Rich Text Editor") { Unit }
@JvmField val HIDE_HEALTH_NOTIFICATIONS = ActionType("Hide Instance Health Notifications") { Unit }
dagguh marked this conversation as resolved.
Show resolved Hide resolved
@JvmField val VIEW_COMMENT = ActionType("View Comment") { Unit }
@JvmField val VIEW_HISTORY_TAB = ActionType("View History Tab") { IssueObservation(it) }
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.atlassian.performance.tools.jiraactions.api.action

import com.atlassian.performance.tools.jiraactions.api.DISABLE_RTE
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_RTE) {
jira.configureRichTextEditor().disable()
}
}
}
Original file line number Diff line number Diff line change
@@ -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()
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,8 @@ class SetUpAction(
) : 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()
dagguh marked this conversation as resolved.
Show resolved Hide resolved
HideHealthNotifications(jira, meter).run()
}
}
}