Skip to content

Add a button to send a newsletter to the admin#10896

Merged
andreslucena merged 14 commits intodecidim:developfrom
openpoke:feature/send_email_test_for_newsletters
Jun 21, 2023
Merged

Add a button to send a newsletter to the admin#10896
andreslucena merged 14 commits intodecidim:developfrom
openpoke:feature/send_email_test_for_newsletters

Conversation

@ElviaBth
Copy link
Copy Markdown
Contributor

@ElviaBth ElviaBth commented May 23, 2023

🎩 What? Why?

To have the option of sending a test email to the logged user email account.

I add a button to the index and show views, by clicking it a newsletter test will be sent to the logged user.

fixes #6539

Testing

  1. Send a test email to the logged user.
  2. Admin clicks on this index button and receives the test newsletter email.

📷 Screenshots

image
image

♥️ Thank you!

@ElviaBth ElviaBth marked this pull request as draft May 23, 2023 11:51
@microstudi microstudi changed the title add a test for mails newsletter Add a button to send a newsletter to the admin May 25, 2023
@ElviaBth ElviaBth marked this pull request as ready for review May 26, 2023 12:19
@andreslucena
Copy link
Copy Markdown
Member

Hi @ElviaBth, sorry for missing this one!

We didn't check out that this was ready to be reviewed until now, that I was checking out old PRs.

I think the failing specs are related to #10916, could you please merge with develop so they are fixed 🙏🏽 ?

Also @microstudi tyou

Copy link
Copy Markdown
Member

@andreslucena andreslucena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried it locally and it works correctly 👏🏽 👏🏽

There are a couple suggestions for improving this and it should be ready to be merged

Comment thread decidim-admin/config/locales/en.yml Outdated
Comment thread decidim-admin/app/views/decidim/admin/newsletters/show.html.erb
Comment thread decidim-admin/app/views/decidim/admin/newsletters/show.html.erb Outdated
Comment thread decidim-admin/app/views/decidim/admin/newsletters/index.html.erb
Comment thread decidim-admin/app/views/decidim/admin/newsletters/index.html.erb Outdated
Comment thread decidim-admin/app/views/decidim/admin/newsletters/show.html.erb
Copy link
Copy Markdown
Member

@andreslucena andreslucena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last set of really small changes and it should be ready. Can you check them out please?

Comment thread yarn.lock Outdated
Comment thread decidim-admin/spec/system/admin_manages_newsletters_spec.rb Outdated
Comment thread decidim-admin/spec/system/admin_manages_newsletters_spec.rb Outdated
Comment thread decidim-admin/spec/system/admin_manages_newsletters_spec.rb Outdated
Comment thread decidim-admin/spec/system/admin_manages_newsletters_spec.rb Outdated
@ElviaBth
Copy link
Copy Markdown
Contributor Author

Hi @andreslucena, I think is ready. Can you take a look, please? Thanks.

Copy link
Copy Markdown
Member

@andreslucena andreslucena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏽 great, thanks for the PR!

@andreslucena andreslucena merged commit 2678e74 into decidim:develop Jun 21, 2023
entantoencuanto added a commit that referenced this pull request Jul 3, 2023
* redesign/sync-develop-2: (150 commits)
  Adapt tests to redesign
  Fix stylelint offenses
  Fix linter offenses
  Fix sanitizer
  Recover deleted translation
  Recover test fix
  Fix method definition and syntax
  Check for supported locale in Emoji picker (#11079)
  Fix configuration param and documentation links in CSP (#11098)
  Show all projects if none is selected when the voting has finished (#11090)
  Add Content Security Policy support (#10700)
  Replace `bootstrap-tagsinput` npm package with `tom-select` (#11076)
  Avoid password change to be requested when user registration mode is disabled (#11070)
  Lock sass-embedded to 1.62 (#11074)
  Add a button to send a newsletter to the admin (#10896)
  Fixing more tests
  Fixing more specs
  Fixing most of the failings specs
  Fixing most of the failings specs
  Bump doorkeeper from 5.5.4 to 5.6.6 (#11002)
  ...
ElviaBth added a commit to openpoke/decidim that referenced this pull request Jul 12, 2023
* add test send a test mail to the logged user

* test it will check email has been sent

* test it will check email has been sent

* test admin send emails from index

* test admin receives the test newsletter

* Update code after review suggestions

* remove restriction to send a newsletter email

* fix string error in newsletters test

* add context to test title and remove yarn.lock file

* add context to test description

* replace if ! condition by unless

---------

Co-authored-by: Ivan Vergés <ivan@pokecode.net>
andreslucena pushed a commit that referenced this pull request Jul 18, 2023
* add test send a test mail to the logged user

* test it will check email has been sent

* test it will check email has been sent

* test admin send emails from index

* test admin receives the test newsletter

* Update code after review suggestions

* remove restriction to send a newsletter email

* fix string error in newsletters test

* add context to test title and remove yarn.lock file

* add context to test description

* replace if ! condition by unless

---------

Co-authored-by: Ivan Vergés <ivan@pokecode.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Send mail test for newsletters

3 participants