about summary refs log tree commit diff
path: root/spec/helpers
AgeCommit message (Collapse)Author
2017-09-23Add emoji autosuggest (#5053)Eugen Rochko
* Add emoji autosuggest Some credit goes to glitch-soc/mastodon#149 * Remove server-side shortcode->unicode conversion * Insert shortcode when suggestion is custom emoji * Remove remnant of server-side emojis * Update style of autosuggestions * Fix wrong emoji filenames generated in autosuggest item * Do not lazy load emoji picker, as that no longer works * Fix custom emoji autosuggest * Fix multiple "Custom" categories getting added to emoji index, only add once
2017-09-08Fix language filter codes (#4841)Eugen Rochko
* Fix language filter codes CLD3 returns BCP-47 language identifier, filter settings expect identifiers in the ISO 639-1 format. Convert between formats, and exclude duplicate languages from filter choices (zh-CN->zh) * Fix zh name
2017-08-21Use URI.join even when S3 enabled (#4652)Yamagishi Kazutoshi
2017-08-17use existing inflections instead of custom helper (#4624)nightpool
* use existing inflections instead of custom helper * use ActiveSupport versions
2017-08-17Show what protocol is used for accounts in admin/accounts#index (#4622)nullkal
* Show what protocol used for in admin/accounts#index * Add frozen_string_literal
2017-08-08Add ActivityPub inbox (#4216)Eugen Rochko
* Add ActivityPub inbox * Handle ActivityPub deletes * Handle ActivityPub creates * Handle ActivityPub announces * Stubs for handling all activities that need to be handled * Add ActivityPub actor resolving * Handle conversation URI passing in ActivityPub * Handle content language in ActivityPub * Send accept header when fetching actor, handle JSON parse errors * Test for ActivityPub::FetchRemoteAccountService * Handle public key and icon/image when embedded/as array/as resolvable URI * Implement ActivityPub::FetchRemoteStatusService * Add stubs for more interactions * Undo activities implemented * Handle out of order activities * Hook up ActivityPub to ResolveRemoteAccountService, handle Update Account activities * Add fragment IDs to all transient activity serializers * Add tests and fixes * Add stubs for missing tests * Add more tests * Add more tests
2017-07-27Fallback to site_hostname when site_title is empty (#4394)Yamagishi Kazutoshi
2017-07-27Fix multipoint shortcode bug (#4387)Ondřej Hruška
* Fix multipoint shortcode bug * Added testcase for composite emoji shortcode
2017-07-15Improve ActivityPub representations (#3844)Eugen Rochko
* Improve webfinger templates and make tests more flexible * Clean up AS2 representation of actor * Refactor outbox * Create activities representation * Add representations of followers/following collections, do not redirect /users/:username route if format is empty * Remove unused translations * ActivityPub endpoint for single statuses, add ActivityPub::TagManager for better URL/URI generation * Add ActivityPub::TagManager#to * Represent all attachments as Document instead of Image/Video specifically (Because for remote ones we may not know for sure) Add mentions and hashtags representation to AP notes * Add AP-resolvable hashtag URIs * Use ActiveModelSerializers for ActivityPub * Clean up unused translations * Separate route for object and activity * Adjust cc/to matrices * Add to/cc to activities, ensure announce activity embeds target status and not the wrapper status, add "id" to all collections
2017-07-14HTTP signatures (#4146)Eugen Rochko
* Add Request class with HTTP signature generator Spec: https://tools.ietf.org/html/draft-cavage-http-signatures-06 * Add HTTP signature verification concern * Add test for SignatureVerification concern * Add basic test for Request class * Make PuSH subscribe/unsubscribe requests use new Request class Accidentally fix lease_seconds not being set and sent properly, and change the new minimum subscription duration to 1 day * Make all PuSH workers use new Request class * Make Salmon sender use new Request class * Make FetchLinkService use new Request class * Make FetchAtomService use the new Request class * Make Remotable use the new Request class * Make ResolveRemoteAccountService use the new Request class * Add more tests * Allow +-30 seconds window for signed request to remain valid * Disable time window validation for signed requests, restore 7 days as PuSH subscription duration (which was previous default due to a bug)
2017-07-14Fix #4149, fix #1199 - Store emojis as unicode (#4189)Eugen Rochko
- Use unicode when selecting emoji through picker - Convert shortcodes to unicode when storing text input server-side - Do not convert shortcodes in JS anymore
2017-06-20Fix RTL detection on Ruby side (#3867)unarist
This fixes below bugs: * pipe characters being counted as RTL character * only first word being checked
2017-06-12Fix locale related specs (#3707)unarist
* Use I18n.locale instead of ":en" * Reset I18n.locale value after locale changing tests
2017-05-31Hold value of I18n.locale with ApplicationHelperSpec (#3474)Yamagishi Kazutoshi
2017-05-30Use around hook to restore context in InstanceHelper spec (#3429)Akihiko Odaki
2017-05-30Use around hook to restore context in ApplicationHelper spec (#3432)Akihiko Odaki
2017-05-29Cover ApplicationHelper more (#3412)Akihiko Odaki
2017-05-29Spec Activitystreams2BuilderHelper (#3413)Akihiko Odaki
2017-05-29Spec FlashesHelper (#3414)Akihiko Odaki
2017-05-29Spec HomeHelper (#3415)Akihiko Odaki
2017-05-29Spec HttpHelper (#3416)Akihiko Odaki
2017-04-23Ensure i18n matches options (#2358)Matt Jankowski
* Add failing spec showing that human_locales does not match what i18n knows about * Add missing `ar` key for arabic to human locales * Remove duplicate `id` key from available locales * Sort keys in human locales list * Add spec for human_locale helper
2017-04-23Test embedded_view related code in a helper (#2282)Joël Quenneville
The two methods `StreamEntriesHelper#stream_link_target` and `StreamEntriesHelper#acct` are based on checking whether we are running in an embedded view. This adds some test helper code to make the testing easier. We extracted some "magic strings" to constants to lower the coupling in the specs.
2017-04-23Add test coverage to CSS class generation (#2285)Joël Quenneville
The code that generates CSS is based on a lot of boolean conditions. The possible combinations of these grows exponentially as we add more conditions. Since most of the code is conditional on a single boolean, we tested the following: 1. All `false` 2. All `true` 3. Each individual flag set to `true` The methods tested are: * `StreamEntriesHelper#style_classes` * `StreamEntriesHelper#microformats_classes` * `StreamEntriesHelper#microformats_h_class`
2017-04-22Add tests for StreamEntriesHelper#rtl? (#2286)Joël Quenneville
We used some random Arabic characters to test that the various RTL conditions got triggered.
2017-04-18Instance helper to replace site title helper (#2038)Matt Jankowski
* Move site title helper to instance helper (name change only) * Remove newline in <title> tag * Add site_hostname helper method to wrap up local_domain value * Use site_hostname helper in places that need local_domain value
2017-04-16View spec fix (#1888)Matt Jankowski
* Add option to disable verify partial doubles * Add show_landing_strip? helper method * Use show_landing_strip? helper in accounts and stream entries views * Fix naming in view specs
2017-04-15Rename admin/accounts_helper to admin/filter_helper (#1816)Matt Jankowski
- Add some spec coverage for both methods - Add explicit constant call-outs for where the params are from
2017-04-13Remove pending specs for methods that dont exist (#1658)Matt Jankowski
* Remote spec for non-existent entry_classes helper method This method no longer exists, and is handled by a local variable in a partial instead. * Remove spec for non-existent Account#ping! method
2017-04-11Remove unused methods from StreamEntriesHelper (#1365)Matt Jankowski
Removes: - avatar_for_status_url - relative_time - reblogged_by_me_class - favourited_by_me_class
2017-04-11Remove unused AtomBuilderHelper (#1364)Matt Jankowski
This was used in the views/atom/user_stream.xml.ruby file, which no longer is used.
2017-04-11Pagination improvements (#1445)Matt Jankowski
* Replace will_paginate with kaminari * Use #page instead of #paginate in controllers * Replace will_paginate.page_gap with pagination.truncate in i18n * Customize kaminari views to match prior styles * Set kaminari options to match prior behavior * Replace will_paginate with paginate in views
2017-04-09Helper cleanup (#1348)Matt Jankowski
* Remove unused helper files * Add coverage for application helper * Add coverage for StreamEntriesHelper #display_name
2017-04-08Use Setting.site_title value for `og:site_name` occurrences (#1194)Matt Jankowski
* Add helper method to return Setting.site_title * Use site_title helper in application layout * Use site_title value for og:site_name
2017-02-11Make follow requests federateEugen Rochko
2016-12-29Add API for retrieving blocked accountsEugen Rochko
2016-12-29Add ability to use remote follow function on other sitesEugen Rochko
2016-12-26Replacing follow requests in the settings area with in-UI columnEugen Rochko
2016-12-26Adding follow requests APIEugen Rochko
2016-12-23Add page for authorizing/rejecting follow requestsEugen Rochko
2016-12-13Improved admin UIEugen Rochko
2016-12-04Do not autoplay videos, display play button instead. Use expiring links when ↵Eugen Rochko
using S3. Do not keep originals for avatars/headers, resize avatars down to 120x120 instead of 300x300. Set cache headers on S3 stuff, also make it private (aka only accessible via expiring links to prevent hotlinking)
2016-11-30Add basic OEmbed provider API, fix #247Eugen Rochko
2016-11-30Per-status control for unlisted mode, also federation for unlisted modeEugen Rochko
Fix #233, fix #268
2016-11-30Normalize localizations, add stub for admin/accountsEugen Rochko
2016-11-28Add simple admin overview of PuSH subscriptionsEugen Rochko
2016-11-05Adding hashtagsEugen Rochko
2016-10-14E-mail preferences pageEugen Rochko
2016-09-27Adding landing pageEugen Rochko
2016-09-27Fix #52 - Add API versioning (v1)Eugen Rochko