habitica-self-host/website/server/controllers/api-v3
Alys fb4d3e44d3 improve code and tests for banned words and slurs (#10211)
* remove removePunctuationFromString function from test code

It's not needed now that the test banned words don't contain underscores.

* prevent tests accidentally throwing messageGroupChatSpam

This commit makes the user for most tests have contributor tiers so
that the user can't trigger the messageGroupChatSpam error message
(for posting messages too quickly).

This is useful when some of the tests fail due to broken code
because that makes more messages be posted than expected. If the user
doesn't have tiers, the messageGroupChatSpam error message would be
triggered, which gives misleading information about the test failure.

* add tests for banned swear and slur words posted in mixed case

* allow banned word error message to show bad words in the same case the user typed them

* stop using randomly-chosen real banned words in tests

The test modified in this commit had been using real banned words,
which meant that those words were being displayed to the contributors
when the test failed.

NB the 'check all banned words are matched' test also uses the real
banned words but the test failure messages don't show the words.

* improve translatability of bannedWordUsed error message
2018-04-08 15:31:37 +02:00
..
tasks Node 8 (WIP) (#9946) 2018-03-15 19:59:36 +01:00
user Bulk spell casting (#10007) 2018-02-23 11:30:15 -07:00
auth.js Fix password reset when querying for emails with upcase characters (fixes #9059) (#9707) 2018-03-17 22:13:54 +01:00
challenges.js Made challenge paging optional 2018-03-30 11:34:00 -05:00
chat.js improve code and tests for banned words and slurs (#10211) 2018-04-08 15:31:37 +02:00
content.js Node 8 (WIP) (#9946) 2018-03-15 19:59:36 +01:00
coupon.js Documentation - coupon 2016-10-19 21:31:07 -05:00
cron.js Added cron check 2017-06-08 17:10:22 -07:00
debug.js Refactor api description with @apiParam groups to make it more explicit (#8919) 2017-08-15 18:06:19 -05:00
groups.js prevents a user who has had their chat privileges revoked from creating a public guild (#10205) 2018-03-31 13:46:14 +02:00
hall.js Upgrade tests tools and lint migrations and scripts (part 2) (#9998) 2018-02-17 18:11:24 +01:00
i18n.js Upgrade tests tools and lint migrations and scripts (part 2) (#9998) 2018-02-17 18:11:24 +01:00
iap.js Format files to adhere to editorconfig (#7977) 2016-09-07 12:58:26 -05:00
members.js Node 8 (WIP) (#9946) 2018-03-15 19:59:36 +01:00
modelsPaths.js apiDoc: meta (#8167) 2017-01-13 14:06:46 -07:00
news.js feat(event): avatar customizations 2018-04-05 21:03:57 +00:00
notifications.js notifications: fixes 2018-02-04 13:28:05 +01:00
pushNotifications.js Refactor api description with @apiParam groups to make it more explicit (#8919) 2017-08-15 18:06:19 -05:00
quests.js Node 8 (WIP) (#9946) 2018-03-15 19:59:36 +01:00
shops.js [WIP] new client - seasonal-shop (#9018) 2017-09-20 19:28:11 -05:00
status.js Api doc status (#8165) 2016-11-03 08:31:30 -05:00
tags.js Notifications v2 and Bailey API (#9716) 2018-01-31 11:55:39 +01:00
tasks.js Node 8 (WIP) (#9946) 2018-03-15 19:59:36 +01:00
user.js Node 8 (WIP) (#9946) 2018-03-15 19:59:36 +01:00
webhook.js Make responce codes uniform (#8865) 2017-07-17 14:28:25 -07:00
world.js feat(event): Spring Fling 2018 2018-03-20 21:30:43 +00:00