Commit Graph

12 Commits

Author SHA1 Message Date
Javi Martín
cdef030f15 Add a consistent order in system email previews
Since PostgreSQL doesn't guarantee the order of the records unless an
`ORDER BY` clause is used, the records sometimes had a different order.
This might cause records being present in more than one page.

One test was failing sometimes (when the record created first was
rendered after the record created last) because there seems to be a bug
in chrome/chromedriver 83 and later which causes links not to be clicked
when they're right at the edge of the screen (which was the case for the
notification appearing in the last place):

```
  1) System Emails Preview Pending #moderate_pending
     Failure/Error: click_on "Moderate notification send"

     Selenium::WebDriver::Error::ElementNotInteractableError:
       element not interactable: element has zero size
         (Session info: headless chrome=91.0.4472.114)
```
2021-08-10 22:07:47 +02:00
Javi Martín
a727dcc031 Apply Style/SymbolProc rubocop rule
This style is much more concise.
2019-10-26 20:10:32 +02:00
Javi Martín
db97f9d08c Add and apply rubocop rules for empty lines
We were very inconsistent regarding these rules.

Personally I prefer no empty lines around blocks, clases, etc... as
recommended by the Ruby style guide [1], and they're the default values
in rubocop, so those are the settings I'm applying.

The exception is the `private` access modifier, since we were leaving
empty lines around it most of the time. That's the default rubocop rule
as well. Personally I don't have a strong preference about this one.


[1] https://rubystyle.guide/#empty-lines-around-bodies
2019-10-24 17:11:47 +02:00
lalo
28815cb290 Create new email template for new evaluation comment created and add it to system_emails view 2019-06-05 16:22:12 +02:00
Julian Herrero
00bd7008bb Show all system emails in Admin section 2019-02-22 16:13:49 +01:00
Julian Herrero
df08e42c3b Use preferred format for array of strings 2019-02-21 15:18:34 +01:00
María Checa
f1e7b634ba Adds moderate actions to proposal system notifications 2018-07-26 17:55:06 +02:00
María Checa
eb8c021451 Adds button to send pending proposal notifications 2018-07-26 17:55:06 +02:00
María Checa
b7a1599fdf Adds logic to send proposal notifications in batches
WIP batches tests
2018-07-26 17:55:06 +02:00
Bertocq
eb0919d978 Add Preview Pending action to Admin System Emails
Some system emails need to be manually reviewed before being sent. This
new action allows admins to see a preview of all Pending to be sent
Proposal Notification Digest messages.
2018-07-25 20:20:33 +02:00
Bertocq
5c726e0949 Add Admin System Emails view & first system email
Admins need to be able to see what a particular System Email looks like
with dummy data.

Also adding the first system email to be managed: the proposal
notification digest.

In case the current admin doesn't have any Notifications from
 ProposalNotifications there will be a crash. We'll solve this in later
 PR's with a system to "inject" sample text in email templates without
 having to generate records in the database.
2018-07-25 20:20:33 +02:00
Bertocq
b9c6da245a Add System emails menu & list to admin panel
We need a section to list all System Emails to view the templates and
preview an example of what would be sent.
2018-07-25 20:19:58 +02:00