Commit Graph

1954 Commits

Author SHA1 Message Date
Joffrey JAFFEUX c1d2fb115c
DEV: prevents staff computed property to be overridden (#7931) 2019-07-24 22:01:08 +02:00
Osama Sayegh 5fc5a7f5ae FEATURE: Add search operator to see all direct messages from a user (#7913)
* FEATURE: Add search operator to see all direct messages from a user

* Only show message if related messages >= 5

* Make "all messages" the hyperlink

* Review
2019-07-22 10:55:49 -04:00
Roman Rizzi eb26bee046
DEV: group_list site settings should store IDs instead of group names (#7860)
* DEV: group_list site settings should store IDs instead of group names

* Ship site setting to know when we should migrate group_list settings

* Migrate existing group_list site settings

* Bump migration timestamp and don't set null when migrating is not possible.
2019-07-19 15:17:58 -03:00
Robin Ward 8dd3cbfcb9
FEATURE: Allow choice of category when making a PM public (#7907)
* FEATURE: Allow choice of category when making a PM public

Previously it would default to uncategorized, which was not ideal on
some forums. This gives the staff member more choice about what they'd
like to do.

* Make the optional category more explicit

* Joffrey's feedback
2019-07-19 11:52:50 -04:00
Bianca Nenciu 9f500a4ff4
FIX: Show same username or name for post notices. (#7862) 2019-07-19 11:05:48 +03:00
Joffrey JAFFEUX 95ad4f9077
FEATURE: new date/time components (#7898) 2019-07-18 17:29:41 +02:00
Penar Musaraj a571efba35
FIX: Rename deprecated icons, allow custom icons in badges
- adds a migration renaming FA4 icon names in badges
- allows all icons to be used in badges (previously was limited to icons prefixed with fa-)
- renames remaining FA 4.7 icons equivalents
2019-07-16 11:13:44 -04:00
Vinoth Kannan 839916aa49
DEV: Debundle plugin javascript assets and don't load if disabled (#7566)
And don't load javascript assets if plugin is disabled.

* precompile auto generated plugin js assets

* SPEC: remove spec test functions

* remove plugin js from test_helper

Co-Authored-By: Régis Hanol <regis@hanol.fr>

* DEV: using equality is slightly easier to read than inequality

Co-Authored-By: Régis Hanol <regis@hanol.fr>

* DEV: use `select` method instead of `find_all` for readability

Co-Authored-By: Régis Hanol <regis@hanol.fr>
2019-07-15 20:22:54 +05:30
Guo Xiang Tan cbb4af124b Fix the build.
Follow up to 4b0cf7f6dd.
2019-07-15 16:38:54 +08:00
Guo Xiang Tan 4b0cf7f6dd SECURITY: XSS when displaying watched words in admin panel.
The XSS here is only possible if CSP is disabled. Low impact since CSP
is enabled by default in SiteSettings.
2019-07-15 10:55:50 +08:00
Bianca Nenciu c4d1833588 FIX: Do not show bootbox if post has no replies. (#7866)
When we delete a post that has replies, we show a modal asking if the user wants to delete the post, the post and its direct replies or the post and all its replies.

If replies are deleted before a post, that modal would ask the user if they want to delete the post and 0 replies.

That commit ensure we skip the modal and directly delete the post in this case.
2019-07-12 11:42:57 +02:00
Vinoth Kannan 1bb258ab49 DEV: use upload short-url in html to markdown conversion if 'base62-sha1' data attr available. 2019-07-05 10:06:41 +05:30
Penar Musaraj c78634284c UI: when in a different topic context, allow dismissing draft without destroying it
This changes the label and behaviour of the "No, keep" button in the confirmation modal when user cancels a draft while on a different topic. The new button label is "No, save draft", and when clicked, the composer will be dismissed without destroying the draft.
2019-07-04 11:45:57 -04:00
Joffrey JAFFEUX a60ec00f7a
fix tests (#7853) 2019-07-03 16:32:27 +02:00
Joffrey JAFFEUX d521959768
DEV: simpler report page test (#7851) 2019-07-03 16:08:48 +02:00
Joffrey JAFFEUX f9f1df7611
DEV: prevents reports key to be time dependant when testing (#7850) 2019-07-03 15:43:01 +02:00
Bianca Nenciu bfdf740a05 FIX: Show 'Export' button for all tabular reports. (#7838) 2019-07-03 14:47:36 +02:00
Joffrey JAFFEUX 1c6bb8748b
fix tests (#7849) 2019-07-03 13:45:03 +02:00
Osama Sayegh 3d64532273 FEATURE: allow disabling theme components (#7812)
This allows you to temporarily disable components without having to remove them from a theme. 

This feature is very handy when doing quick fix engineering.
2019-07-03 18:18:11 +10:00
Joffrey JAFFEUX 39e3162323
DEV: skip click-track to attempt to reduce timeouts in tests (#7836) 2019-07-02 10:08:28 +02:00
Ralph Rooding 4ba35472e6 Don't check for second factor when switching to anonymous account (#7803) 2019-06-27 15:01:26 -07:00
Joffrey JAFFEUX a61147d838
FEATURE: displays tags in search menu results when enabled (#7819) 2019-06-27 19:26:14 +02:00
Gerhard Schlager fe870a1e54 DEV: Respond with error 400 to uploads requested via XHR
follow-up to 13f38055
2019-06-27 11:15:35 +02:00
Joffrey JAFFEUX df9b295510
DEV: skip load-script to prevent timeouts (#7817) 2019-06-27 10:57:40 +02:00
Joffrey JAFFEUX 5b9a3f8acd
DEV: attempts to make load-script more reliable (#7816)
We don't check on script anymore, but we still check on window.ace making very unlikely to regress.
2019-06-27 10:19:55 +02:00
Jeff Wong 79d657203d fix tests 2019-06-26 17:44:23 -07:00
Jeff Wong 88ef5e55fe
FEATURE: add ability to have multiple totp factors (#7626)
Adds a second factor landing page that centralizes a user's second factor configuration.

This contains both TOTP and Backup, and also allows multiple TOTP tokens to be registered and organized by a name. Access to this page is authenticated via password, and cached for 30 minutes via a secure session.
2019-06-26 16:58:06 -07:00
Joffrey JAFFEUX c63268467e
DEV: prettier 1.18.2 (#7810) 2019-06-26 17:09:52 +02:00
Penar Musaraj 76307611dc
UX: new inline button to remove a topic timer (#7790) 2019-06-26 11:08:53 -04:00
Gerhard Schlager 13f38055ac SECURITY: XSS in routes
Co-authored-by: Guo Xiang Tan <tgx_world@hotmail.com>
Co-authored-by: David Taylor <david@taylorhq.com>
2019-06-26 16:34:15 +02:00
Joffrey JAFFEUX cea3a027f3
FIX: category-chooser search should be scoped to category (#7794) 2019-06-24 10:45:30 +02:00
Joffrey JAFFEUX 59e84e8e05
DEV: skip tests instead of commenting them (#7774) 2019-06-17 10:24:20 +02:00
Robin Ward 035e63c81f FIX: Allow the clear callbacks to execute in acceptance tests 2019-06-14 13:29:13 -04:00
Robin Ward a8793d0d9a REFACTOR: Test Memory Usage Fixes (#7769)
* Calling `Discourse.reset()` creates a new container
We should run our de-initializers only after acceptance tests,
since initializers are not run outside of acceptance tests anyway,
and the container at this point can be passed properly to the
`teardown()` method.

* Remove `Discourse.reset` from tests
This would cause a new container to be created which leaks many objects.

* `updateCurrentUser` is more accurate than `replaceCurrentUser`
2019-06-14 14:54:20 +02:00
Guo Xiang Tan 7bb94e8716 DEV: Increase wait duration between smoke test further during edit.
Otherwise, the app detects that we're replying too quickly.
2019-06-14 12:21:54 +08:00
Sam Saffron 62f4284865 DEV: 302 status is normal in smoke test
Login can redirect there are potentially other cases
2019-06-14 14:21:07 +10:00
Guo Xiang Tan 5b55252e10 DEV: Add more wait between edit so we don't end up replying too quickly. 2019-06-13 09:14:17 +08:00
Joffrey JAFFEUX 19ca2d4772
DEV: reset widget clean callback between tests (#7761) 2019-06-12 17:49:02 +02:00
Robin Ward 9daba50d48 FIX: Unsubscribe seemed to be missing some events (#7762)
This forces an unsubscribe from all events.
2019-06-12 17:48:01 +02:00
Maja Komel 621b6493f7 DEV: test badge titles presence on badge page
follow-up on 2863e7c
2019-06-12 15:04:21 +02:00
David Taylor f60451a89d DEV: Fix linting error 2019-06-12 00:19:52 +01:00
Joffrey JAFFEUX 23f457b87d
DEV: disables d-editor emoji test to attempt to fix timeouts (#7755) 2019-06-12 00:30:11 +02:00
Joffrey JAFFEUX 5da91fa8f8
DEV: disable emoji-picker test to attempt to fix timeouts (#7754) 2019-06-12 00:11:21 +02:00
Joffrey JAFFEUX 1feaacaecb
DEV: skip emoji picker opening test to attempt to fix timeouts (#7753) 2019-06-11 23:54:20 +02:00
Joffrey JAFFEUX 58057484fe
DEV: skip ace-editor to attempt to avoid timeouts (#7752) 2019-06-11 23:38:43 +02:00
Joffrey JAFFEUX cb08d3cc26
DEV: adds module debugging to js tests (#7751) 2019-06-11 23:14:42 +02:00
Robin Ward 3d7c26c15e FIX: Memory Leaks w/ Container (#7750)
Gives instance initializers the ability to add a `teardown` method that
will be called between tests to clean up after themselves.
2019-06-11 18:41:27 +02:00
Joffrey JAFFEUX dc15486f0a Revert "DEV: resets csrf ajax prefilter only if present (#7747)"
This reverts commit 6612218a4e.
2019-06-11 13:34:25 +02:00
David Taylor 000a35b219 FIX: Do not live-load posts from ignored users 2019-06-11 12:07:14 +01:00
Joffrey JAFFEUX 6612218a4e
DEV: resets csrf ajax prefilter only if present (#7747) 2019-06-11 12:50:20 +02:00
Joffrey JAFFEUX ebf77f74b7 Revert "DEV: prevents csrf token to leak state between tests (#7746)"
This reverts commit b29d63a52d.
2019-06-11 12:19:49 +02:00
Joffrey JAFFEUX b29d63a52d
DEV: prevents csrf token to leak state between tests (#7746) 2019-06-11 11:54:23 +02:00
Joffrey JAFFEUX 4deb0f6d59
DEV: prevents post-cooked decorators to leak between tests (#7744) 2019-06-11 10:02:10 +02:00
Guo Xiang Tan e5cace9185 FIX: File size text should not be part of link. 2019-06-11 15:21:06 +08:00
Guo Xiang Tan d20ea38f02 Fix the build.
Follow up to bd538f7437.
2019-06-11 10:05:57 +08:00
Guo Xiang Tan 06d974d55c FEATURE: Add base62 sha1 to cooked data attribute
* FEATURE: Add base62 sha1 to data attribute in `Post#cooked`.

* FIX: Use `Upload#short_url` when quoting an image.
2019-06-11 11:15:45 +10:00
Guo Xiang Tan bd538f7437 FIX: Composer preview not caching inline onebox. 2019-06-11 09:14:53 +08:00
Joffrey JAFFEUX fce34aa799
DEV: prevents Pretender Object to leak between tests (#7726) 2019-06-07 11:27:54 +02:00
Gerhard Schlager d1228f47bb FIX: Handle missing plural keys on client 2019-06-07 10:24:17 +02:00
Joffrey JAFFEUX c573fa780b
DEV: prevents asyncTestDiscourse/controllerFor/fixture to leak (#7717) 2019-06-06 13:10:41 +02:00
Joffrey JAFFEUX 60c073ae59
typos (#7716) 2019-06-06 13:00:23 +02:00
Joffrey JAFFEUX 6d02dd6d8c
DEV: attempts to remove message bus callbacks between tests (#7715) 2019-06-06 12:59:02 +02:00
Joffrey JAFFEUX c462c2f271
FIX: prevents appEvents to leak (#7714) 2019-06-06 12:33:52 +02:00
Joffrey JAFFEUX b339d67401
DEV: refactors select-kit helper to prevent it to leak into global state (#7708) 2019-06-06 10:47:10 +02:00
Guo Xiang Tan 782da448a2 FIX: Missing `title` attribute when quoting an image. 2019-06-06 16:45:12 +08:00
Guo Xiang Tan d9d36f241d DEV: Use `this.site.get("notification_types")` instead.
Follow up to fcb7422213.
2019-06-06 08:18:25 +08:00
Joffrey JAFFEUX de013262a7
DEV: refactors textarea-selection helper to prevent leaking (#7709) 2019-06-05 19:20:46 +02:00
Joffrey JAFFEUX df95457468
DEV: d-editor helper should be synchronous (#7706)
Also ensures trigger has happened before assertion and prevents leaking formatTextWithSelection into global context
2019-06-05 14:52:38 +02:00
Guo Xiang Tan fcb7422213 DEV: Avoid hard-coding notification types integer in client side code.
Co-authored-by: Bianca Nenciu <nenciu.bianca@gmail.com>
2019-06-04 17:30:46 +08:00
Joffrey JAFFEUX 43a46df075 Revert "DEV: no-sandbox flag is deprecated (#7660)"
This reverts commit d4d42bc61c.
2019-06-03 23:03:30 +02:00
Régis Hanol b792db9d92 FIX: redirect to top was always redirecting to 'All' 2019-06-03 20:18:14 +02:00
Joffrey JAFFEUX d4d42bc61c
DEV: no-sandbox flag is deprecated (#7660) 2019-05-31 13:22:03 +02:00
Robin Ward c4fa20d644 FIX: Broken test, also typoed property 2019-05-30 14:27:28 -04:00
Joffrey JAFFEUX 11ab3c623a
DEV: removes verbose logging from test_helper (#7648) 2019-05-30 12:08:19 +02:00
Guo Xiang Tan f0620e7118 FEATURE: Support `[description|attachment](upload://<short-sha>)` in MD take 2.
Previous attempt was missing `post_uploads` records.
2019-05-29 09:26:32 +08:00
Penar Musaraj 7c9fb95c15 Temporarily revert "FEATURE: Support `[description|attachment](upload://<short-sha>)` in MD. (#7603)"
This reverts commit b1d3c678ca.

We need to make sure post_upload records are correctly stored.
2019-05-28 16:37:01 -04:00
Joffrey JAFFEUX 7a7d612b23
DEV: skips tests being the possible source of timeouts (#7623) 2019-05-28 20:16:42 +02:00
Guo Xiang Tan b1d3c678ca FEATURE: Support `[description|attachment](upload://<short-sha>)` in MD. (#7603) 2019-05-28 11:18:21 -04:00
Joffrey JAFFEUX bed3560d61
EXPERIMENTAL: more js tests logs (#7620) 2019-05-28 14:49:45 +02:00
Joffrey JAFFEUX 6decdfce5c
DEV: reduces memory footprint of tests - step 1 (#7591) 2019-05-28 12:15:12 +02:00
Guo Xiang Tan 909ec47ada DEV: Close modal so other JS tests don't randomly failed. 2019-05-28 11:40:21 +08:00
Guo Xiang Tan c80ab08e48 DEV: Fix pretenders leaking across acceptance test. 2019-05-28 10:41:22 +08:00
Penar Musaraj dfcc2e7ad8 Revert "FEATURE: Send notification when member was accepted to group. (#7503)"
This reverts commit 42c82d544e.
2019-05-27 15:19:59 -04:00
Joffrey JAFFEUX 192562745f
DEV: uses focus helper for d-editor tests (#7610) 2019-05-27 17:31:11 +02:00
Joffrey JAFFEUX 669bfaba30
DEV: setTextareaSelection helper (#7609) 2019-05-27 16:33:27 +02:00
Bianca Nenciu 42c82d544e
FEATURE: Send notification when member was accepted to group. (#7503) 2019-05-27 17:28:41 +03:00
Joffrey JAFFEUX a2d7eab31d
DEV: more reliable d-editor test (#7607) 2019-05-27 15:41:55 +02:00
Joffrey JAFFEUX d93f753b17
apply prettier on gigantic find and replace (#7604) 2019-05-27 10:42:53 +02:00
Joffrey JAFFEUX bfea922167
DEV: global s/this.get\("(\w+)"\)/this.$1 (#7592) 2019-05-27 10:15:39 +02:00
Joffrey JAFFEUX 049561ac49
FIX: introduces onSelectAny (regroup onSelect and onSelectNone) (#7594) 2019-05-24 13:11:33 +02:00
Gerhard Schlager c1e9a70d59 FIX: Fallback locale was not available for extra translations
Translations from fallback locales were not sent to the client
for admin_js and wizard_js.
2019-05-24 11:38:26 +02:00
Robin Ward e74cd54fc6 REFACTOR: Replace score bonuses with low/med/high priorities
We removed score from the UX so it makes more sense to have sites set
priorities instead of score bonuses.
2019-05-23 11:54:45 -04:00
Gerhard Schlager e224100023 FIX: Don't convert :) into Emoji when emojis or emoji shurtcuts are disabled 2019-05-22 11:44:39 +02:00
Gerhard Schlager e8de30939d DEV: Fix the smoke test 2019-05-21 19:02:19 +02:00
Guo Xiang Tan 92a6f71fd3 DEV: Update smoke test to test editing of a post. 2019-05-21 17:44:46 +08:00
Joffrey JAFFEUX 6c6a6771af
FIX: adds groupBy to lodash available functions list (#7579) 2019-05-21 08:58:57 +02:00
Joffrey JAFFEUX 3e4e3fc7d7
DEV: adds memory/event listeners reporting (#7575) 2019-05-20 16:35:23 +02:00
Gerhard Schlager b788948985 FEATURE: English locale with international date formats
Makes en_US the new default locale
2019-05-20 13:47:20 +02:00
Sam Saffron 50e6ee55a9 DEV: add "WAIT_FOR_URL" env to smoke test
This allows you to wait up to N seconds for the smoke test url to come up
in some cases you want to kick off the smoke test prior to having the smoke
test env ready to accept connections
2019-05-20 17:23:09 +10:00
romanrizzi 3363b84de6 Fix linting errors 2019-05-16 15:33:27 -03:00