OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Remove UI stuff from mail digest spec, fix linting errors
Benjamin Bädorf457e1ce9d94f
diff --git a/frontend/src/app/shared/components/forms/checkbox-field/checkbox-field.component.ts b/frontend/src/app/shared/components/forms/checkbox-field/checkbox-field.component.tsindex 4bffe1978ce..1677d5962d7 100644--- a/frontend/src/app/shared/components/forms/checkbox-field/checkbox-field.component.ts+++ b/frontend/src/app/shared/components/forms/checkbox-field/checkbox-field.component.ts@@ -12,7 +12,7 @@ export class OpCheckboxFieldComponent {@HostBinding('class.op-checkbox-field') classNameCheckbox = true;- @HostBinding('class.op-form-field_invalid') get errorClassName() {+ @HostBinding('class.op-form-field_invalid') get errorClassName():boolean {return this.showErrorMessage;}@@ -56,7 +56,7 @@ export class OpCheckboxFieldComponent {}if (this.showValidationErrorOn === 'submit') {- return this.formControl.invalid && this._formGroupDirective?.submitted;+ return this.formControl.invalid && this.formGroupDirective?.submitted;} if (this.showValidationErrorOn === 'blur') {return this.formControl.invalid && this.formControl.touched;} if (this.showValidationErrorOn === 'change') {@@ -67,6 +67,6 @@ export class OpCheckboxFieldComponent {}constructor(- @Optional() private _formGroupDirective:FormGroupDirective,+ @Optional() private formGroupDirective:FormGroupDirective,) {}}diff --git a/spec/features/notifications/digest_mail_spec.rb b/spec/features/notifications/digest_mail_spec.rbindex 4672736f649..20c70a18236 100644--- a/spec/features/notifications/digest_mail_spec.rb+++ b/spec/features/notifications/digest_mail_spec.rb@@ -15,24 +15,24 @@ describe "Digest email", type: :feature, js: true doFactoryBot.create :user,notification_settings: [FactoryBot.build(:mail_notification_setting,- involved: false,- watched: false,- mentioned: false,- work_package_commented: false,- work_package_created: false,- work_package_processed: false,- work_package_prioritized: false,- work_package_scheduled: false,+ involved: true,+ watched: true,+ mentioned: true,+ work_package_commented: true,+ work_package_created: true,+ work_package_processed: true,+ work_package_prioritized: true,+ work_package_scheduled: true,all: false),FactoryBot.build(:in_app_notification_setting,- involved: false,- watched: false,- mentioned: false,- work_package_commented: false,- work_package_created: false,- work_package_processed: false,- work_package_prioritized: false,- work_package_scheduled: false,+ involved: true,+ watched: true,+ mentioned: true,+ work_package_commented: true,+ work_package_created: true,+ work_package_processed: true,+ work_package_prioritized: true,+ work_package_scheduled: true,all: false),FactoryBot.build(:mail_digest_notification_setting,involved: true,@@ -56,49 +56,6 @@ describe "Digest email", type: :feature, js: true doendit 'sends a digest mail based on the configuration', with_settings: { journal_aggregation_time_minutes: 0 } do- # Configure the digest- notification_settings_page.visit!-- notification_settings_page.expect_setting channel: :mail_digest,- project: nil,- involved: true,- mentioned: true,- watched: true,- work_package_commented: true,- work_package_created: true,- work_package_processed: true,- work_package_prioritized: true,- work_package_scheduled: true,- all: false-- notification_settings_page.configure_channel :mail_digest,- project: nil,- involved: false,- mentioned: true,- watched: true,- work_package_commented: false,- work_package_created: false,- work_package_processed: false,- work_package_prioritized: false,- work_package_scheduled: false,- all: false-- notification_settings_page.add_row(mute_project)-- notification_settings_page.configure_channel :mail_digest,- project: mute_project,- involved: false,- mentioned: false,- watched: false,- work_package_commented: false,- work_package_created: false,- work_package_processed: false,- work_package_prioritized: false,- work_package_scheduled: false,- all: false-- notification_settings_page.save-# Perform some actions the user listens toUser.execute_as other_user donote = <<~NOTEdiff --git a/spec/features/users/notifications/shared_examples.rb b/spec/features/users/notifications/shared_examples.rbindex 7ca328a3848..b9be6349ce4 100644--- a/spec/features/users/notifications/shared_examples.rb+++ b/spec/features/users/notifications/shared_examples.rb@@ -4,7 +4,7 @@ shared_examples 'notification settings workflow' dolet!(:project_alt) { FactoryBot.create :project }let!(:role) { FactoryBot.create :role, permissions: %i[view_project] }let!(:member) { FactoryBot.create :member, user: user, project: project, roles: [role] }- let!(:member_2) { FactoryBot.create :member, user: user, project: project_alt, roles: [role] }+ let!(:member_two) { FactoryBot.create :member, user: user, project: project_alt, roles: [role] }it 'allows to control notification settings' do# Expect default settingsdiff --git a/spec/support/pages/notifications/settings.rb b/spec/support/pages/notifications/settings.rbindex 9e89ad5137d..a61fe6746d1 100644--- a/spec/support/pages/notifications/settings.rb+++ b/spec/support/pages/notifications/settings.rb@@ -86,9 +86,7 @@ module Pagesenddef configure_project(project: nil, **types)- types.each { |type|- set_project_option(*type, project);- }+ types.each { |type| set_project_option(*type, project) }enddef set_project_option(type, checked, project)