Skip to content

Commit

Permalink
NO-JIRA: Make RulesConfigurationTest less error prone
Browse files Browse the repository at this point in the history
  • Loading branch information
thahnen committed Dec 9, 2024
1 parent 194f447 commit c9f2e30
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,13 @@ public void ruleParametersGlobalDefaults() {
public void ruleParametersActivationRoundTrip() {
var ruleConfigurationPreferences = RuleConfigurationPreferences.open();
var cognitiveComplexityRuleItem = ruleConfigurationPreferences.selectRule("java:S3776", "Java", "Cognitive Complexity of methods should not be too high");

assertThat(ruleConfigurationPreferences.getRuleParamSpinner().isEnabled()).isTrue();
await().untilAsserted(() -> assertThat(ruleConfigurationPreferences.getRuleParamSpinner().isEnabled()).isTrue());

new ContextMenu(cognitiveComplexityRuleItem).getItem("Deactivate").select();
assertThat(ruleConfigurationPreferences.getRuleParamSpinner().isEnabled()).isFalse();
await().untilAsserted(() -> assertThat(ruleConfigurationPreferences.getRuleParamSpinner().isEnabled()).isFalse());

new ContextMenu(cognitiveComplexityRuleItem).getItem("Activate").select();
assertThat(ruleConfigurationPreferences.getRuleParamSpinner().isEnabled()).isTrue();
await().untilAsserted(() -> assertThat(ruleConfigurationPreferences.getRuleParamSpinner().isEnabled()).isTrue());

ruleConfigurationPreferences.cancel();
}
Expand Down

0 comments on commit c9f2e30

Please sign in to comment.