Commit graph

8666 commits

Author SHA1 Message Date
Andy Allan
b83271de92 Refactor the friend_users test, and remove the tests which duplicate the (renamed) test_friends_with above. 2017-02-02 13:24:46 +00:00
Andy Allan
f96c563c10 Convert test_friend_with to use factories, and use alice/bob/charlie for easier understanding. 2017-02-02 13:20:51 +00:00
Andy Allan
584748fe0a User factory for uniqueness tests 2017-02-02 13:09:39 +00:00
Andy Allan
df6469c76b Convert class method tests to use User factory.
Also improve the tests by being explicit about which results should
be returned, rather than just hoping that the fixtures cover all
possibilities.
2017-02-02 13:05:43 +00:00
Andy Allan
0bd2e9ea8c Add status traits to user factory. 2017-02-02 12:55:32 +00:00
Andy Allan
38fc6331af Add moderator_user and administrator_user factories. 2017-02-02 12:38:19 +00:00
Andy Allan
c55169659c Add a user_role factory
Naming the association in the model makes the relationship easier
to express in the factory.
2017-02-02 12:35:29 +00:00
Andy Allan
9e591d8ccb Add with_home_location trait for user factories. 2017-02-02 12:08:36 +00:00
Andy Allan
589e9802a9 Create a simple user factory, and convert some basic tests. 2017-02-01 17:42:05 +00:00
Frederik Ramm
ad2b4fe12a Reduce maximum changeset size to 10k changes
Ten thousand changes ought to be enough for any normal mapping activity.

Automatic edits and imports are controlled by scripts anyway so it doesn't
make a difference to them as they just have to adapt the limit.

The reason for my suggestion is that large changesets are becoming
increasingly difficult to handle due to frequent timeouts when trying
to load and process them.

The changeset size limit is returned by the API in the "capabilities" request
so client software that honours that information will automatically pick up
the new limit.

Closes #1259
2017-01-31 18:15:42 +00:00
Tom Hughes
34d663f01a Remove fake qqq locale 2017-01-30 16:01:52 +00:00
Niklas Laxström
3eb5a9568b Localisation updates from https://translatewiki.net. 2017-01-30 16:50:12 +01:00
Herve Saint-Amand
223a12caf8 That new message in the HTML version of the mail should also be added to the plain text version of the mail
Duh.
2017-01-28 23:29:44 +00:00
Herve Saint-Amand
74e28f8bd0 Use each_with_object and make the code pithier 2017-01-28 23:27:04 +00:00
Herve Saint-Amand
a371aad9ac Renamed apply_inline_css to style_message as suggested 2017-01-28 23:08:25 +00:00
Herve Saint-Amand
f83b719f03 Set border=0 on that img
IE9 shows a big nasty blue border on linked images if you don't specify border=0
2017-01-27 23:20:11 +00:00
Andy Allan
8a6e8ae128 Convert client applications fixtures into a factory
Closes #1415
2017-01-26 18:03:51 +00:00
Tom Hughes
e1cac818b1 Merge remote-tracking branch 'openstreetmap/pull/1416' 2017-01-26 17:51:13 +00:00
Tom Hughes
ba092de0ac Load user fixtures for ChangesetComment model tests 2017-01-26 17:50:11 +00:00
Niklas Laxström
552ae3bcb5 Localisation updates from https://translatewiki.net. 2017-01-26 11:16:34 +01:00
Herve Saint-Amand
1def88b5d2 Left-align logo 2017-01-25 23:01:37 +00:00
Herve Saint-Amand
cf11913d58 Apply inline styling to all <p> tags
Solved the problem of <p> tags being given different padding or color by different clients, without having to copy-paste a string of CSS into every <p> tag in the templates.
2017-01-25 22:50:52 +00:00
Andy Allan
7b0b09a527 Remove unused user_tokens fixture and pointless test. 2017-01-25 16:43:04 +00:00
Herve Saint-Amand
25d80789dd Put the user avatar in a <p> block
This improves rendering on those clients that set the margin to 0 on <p> blocks.
2017-01-23 22:26:34 +00:00
Tom Hughes
5bcf82d865 Update to leaflet 1.0.3 2017-01-23 12:30:11 +00:00
Niklas Laxström
c4488a0e54 Localisation updates from https://translatewiki.net. 2017-01-23 13:15:00 +01:00
Tom Hughes
c985c2d4ce Update Potlatch 2 to 2.4-32-gecf1e0b build 2017-01-19 15:03:56 +00:00
Niklas Laxström
3993415cd9 Localisation updates from https://translatewiki.net. 2017-01-19 05:47:17 +01:00
Herve Saint-Amand
774e583b20 Rubocop says to use "hash rockets"
Rubocop will have its way.
2017-01-16 23:12:59 +00:00
Herve Saint-Amand
1285c9f14b Convert those <nobr> tags to CSS 2017-01-16 22:53:04 +00:00
Herve Saint-Amand
e3e5ad4c5f Refactored the code to invoke the message body partial layout, as suggested in the PR 2017-01-16 22:50:01 +00:00
Herve Saint-Amand
e5152c3931 Move attach_project_logo to be its own before_action filter, as suggested 2017-01-16 21:21:55 +00:00
Herve Saint-Amand
1e19e80d0e Renamed @user_message_author to @author as suggested 2017-01-16 21:13:52 +00:00
Niklas Laxström
2e66950029 Localisation updates from https://translatewiki.net. 2017-01-16 03:38:06 +01:00
Herve Saint-Amand
a0627ec0c6 Revert "Added a greeting to the changeset comment message"
This reverts commit 39c3fa427e.
2017-01-14 21:48:46 +00:00
Herve Saint-Amand
433b7c5dfa Remove that ugly style="margin: 0"
It's really only needed for rendering in Yahoo. Let's try to do without having to copy-paste that into every html template.
2017-01-13 22:58:57 +00:00
Herve Saint-Amand
c94213847b Simplified the partial layout
Rather than wrap the body in a :body block, just make it the default, unnamed block, which keeps the markup more lightweight.
2017-01-13 22:43:23 +00:00
Herve Saint-Amand
75f96fcc9a Logo was being attached twice on changeset comment notifications 2017-01-13 21:45:52 +00:00
Herve Saint-Amand
7ef57b2fe8 Dressed up note comment messages 2017-01-12 23:02:57 +00:00
Herve Saint-Amand
235e77fc26 Dressed up lost password mail 2017-01-12 22:30:31 +00:00
Herve Saint-Amand
6d1c10afbc Dressed up gpx notification mails 2017-01-12 22:28:09 +00:00
Herve Saint-Amand
22f7c1f721 Dressed up friend_notification mail 2017-01-12 22:11:23 +00:00
Herve Saint-Amand
39c3fa427e Added a greeting to the changeset comment message
The greeting includes the recipient's user name (as for the message notification mail), which should increase the recipient's trust that the message isn't spam. Greetings were reused from each language's respective locale flie.
2017-01-12 21:52:17 +00:00
Herve Saint-Amand
e59d6c567b Rubocop finds 'return' statements redundant 2017-01-11 23:26:56 +00:00
Herve Saint-Amand
0449024ca0 Modify tests to search only text parts
The tests assumed that every part in the multipart emails that we send were either plain text or HTML. Now we have image attachments, against whose contents the tests were still trying to match regexes. The tests have been modified to only run regexes on the text parts of the mails.
2017-01-11 23:17:24 +00:00
Herve Saint-Amand
31778fd155 Removed unbalanced tag HTML tag 2017-01-11 22:03:00 +00:00
Tom Hughes
96c91757fc Don't try and look up traces until the user is logged in
Fixes #1411
2017-01-11 21:11:37 +00:00
Niklas Laxström
3f59e82926 Localisation updates from https://translatewiki.net. 2017-01-11 19:37:30 +01:00
Herve Saint-Amand
3aa69ffbdd Dressed up a few more messages.
email_confirm, message_notification and signup_confirm now use the new templates. This fixes some, but not all, of the currently broken tests.
2017-01-09 23:42:43 +00:00
Herve Saint-Amand
417176f868 Moved message table HTMl to a partial template
Several notifications are about a message having been sent from one user to another via OSM. I've moved the code for the HTML table that holds the actual user message, with the avatar and the body text, to its own partial template, so that it can be reused. I've updated a second notifier message to the new template, diary_comment_notification.
2017-01-08 22:09:10 +00:00