Commit Graph

60 Commits

Author SHA1 Message Date
mini-bomba
3e74a0da58 Remove warning expiry, save warning history 2025-09-10 18:54:56 +02:00
Ajay
06f83cd8d4 Allow voting and viewing with partial UUID 2025-01-18 02:04:27 -05:00
mini-bomba
777944665d Make voting requirements more strict
This aims to reduce the amount of false votes by users with no valid segments of the category they're voting for.
New tests included, one modified to work under new requirements.
Also merged userAbleToVote and ableToVote in voteOnSponsorTime.ts to skip unnecessary queries for VIPs.
2023-06-08 16:50:31 +02:00
Michael C
b652102c42 move mocks to subfolder 2022-09-24 22:45:23 -04:00
Ajay Ramachandran
0ca134dc8f Merge pull request #500 from mchangrh/fix-tests
fix tests
2022-09-07 12:03:05 -04:00
Michael C
d1d7675a8c test fixes
test fixes
- fix timeout in redis (by @ajayyy)
- allow "errors" in tempVIP test
- remove duplicate warning in postSkipSegments
- remove duplicate VIP in tempVIP
- run tests against different user once tempVIP removed
- fix typo in getHashCache fetching

syntax and wording
- use standard syntax in redisTest
- fix spacing in getLockReason
- typo in npm script name

test cases
- add getHashCache test case
- add more tests to redisTest

configuration
- update config to use redis timeout
- update docker-compose to use newest pinned version

Co-Authored-By: Ajay Ramachandran <dev@ajay.app>
2022-09-07 02:16:23 -04:00
Ajay
9c72e20d1b test for changing chapter category 2022-09-07 01:31:38 -04:00
Ajay
6239e53091 Fix flaky test 2022-07-29 12:06:38 -04:00
mini-bomba
55a8b5d514 voteOnSponsorTime: add test cases for categoryVote as warned/banned user 2022-07-14 21:31:43 +02:00
Ajay Ramachandran
972cb96259 Merge pull request #476 from mchangrh/fullvideo-revive-nonvip
add tests for #454
2022-07-12 23:14:03 -04:00
Ajay
f9de547b95 Add malicious vote type for chapters 2022-07-04 16:18:58 -04:00
Michael C
8560c3f673 add tests for #454 2022-06-28 15:02:09 -04:00
Ajay
fe0afd58bc Save userid with votes 2022-03-30 16:02:30 -04:00
Michael C
0ff38b918b fix tests, add add actionType tests 2022-02-04 00:40:13 -05:00
Michael C
5713b96d13 add test for downvote videoDuration change 2022-02-04 00:21:15 -05:00
Michael C
0854ad1f65 rewrite voteOnSponsorTimes 2022-02-03 06:06:54 -05:00
Ajay
6fe7200481 don't allow category vote for full video segment 2022-01-14 00:21:13 -05:00
Michael C
5cf7a61de1 restructure for postgres 2021-10-19 23:14:52 -04:00
Michael C
d0deb6fe27 finish tests and remove extra console.logs 2021-10-19 23:06:47 -04:00
FlorianZahn
69e321c405 Improved formatting 2021-10-03 19:03:49 +02:00
FlorianZahn
178c4d9792 Remove comment
Co-authored-by: Ajay Ramachandran <dev@ajay.app>
2021-10-03 18:53:34 +02:00
FlorianZahn
7135aa3369 removing console.log() commands 2021-10-02 05:11:26 +02:00
FlorianZahn
aacd297b3b Fixed bugs where normal users could cirumvent vip locks by changing categories 2021-10-02 05:04:18 +02:00
FlorianZahn
bb2a007ed1 first changes and timeout on 2nd test 2021-10-02 04:39:54 +02:00
Michael C
28d637f620 remove extra async and extra utils 2021-09-22 23:34:46 -04:00
Michael C
4e50f0ab4b remaining tests 2021-09-22 23:18:31 -04:00
Michael C
a028eaa41a object-curly-spacing 2021-09-22 18:52:35 -04:00
Michael C
5758f6512d move utils to seperate files and folder, update imports 2021-09-21 02:02:17 -04:00
Michael C
e7d55d1e1b everything after postClearCache 2021-09-16 23:05:16 -04:00
Ajay Ramachandran
c070e5f40d Fix falsey values getting through tests 2021-07-20 17:21:22 -04:00
Michael C
5f2bc37e96 Merge branch 'master' of https://github.com/ajayyy/SponsorBlockServer into stricter-eslint 2021-07-13 15:55:03 -04:00
Michael C
8b3ffe5d0d fix eslint for tests 2021-07-12 02:43:46 -04:00
Michael C
178ed1e5af replace if tests with assert 2021-07-08 00:39:57 -04:00
Michael C
d89b26b77d fix eslint-errors 2021-07-04 01:36:03 -04:00
Ajay Ramachandran
cf592554f1 Merge branch 'master' into unhide-vote 2021-07-03 22:37:23 -04:00
Michael C
931b3fdc68 disallow vote types 10/11 2021-07-02 23:07:17 -04:00
Michael C
36a5b4e1d3 VIP upvotes unhide segments
also added test for undo-vote
2021-07-02 22:54:54 -04:00
Nanobyte
a005a961f9 Fix test cases 2021-06-22 00:59:56 +02:00
Nanobyte
11e6c93932 Merge remote-tracking branch 'upstream/master' into fix/prepare-statements 2021-06-21 18:19:50 +02:00
Ajay Ramachandran
48d88614fb Move shadow ban list to public db
Warning: Migration is not automatic
2021-06-20 13:41:35 -04:00
Ajay Ramachandran
4225d9b3b3 Silently reject votes 2021-06-08 20:20:05 -04:00
Ajay Ramachandran
590ed037dd Merge branch 'master' of https://github.com/ajayyy/SponsorBlockServer into export 2021-05-23 11:17:10 -04:00
Nanobyte
78a7f8a207 Fix test case prepare statements 2021-05-07 01:51:11 +02:00
Nanobyte
f561388a1f Rename noSegments to lockCategories 2021-04-24 01:54:42 +02:00
Ajay Ramachandran
9d06bda4f8 Don't allow downvoting dead submissions 2021-04-17 16:37:39 -04:00
Ajay Ramachandran
5b2f05741e Fix no segments votes being allowed 2021-04-17 16:23:45 -04:00
Ajay Ramachandran
7bf09906d3 Prevent voting for highlight category 2021-04-05 22:33:28 -04:00
Ajay Ramachandran
8729796e87 Make tests pass running with postgres 2021-03-07 00:21:56 -05:00
Ajay Ramachandran
46b42da5bd Update tests to use promises 2021-03-01 21:37:35 -05:00
Ajay Ramachandran
ff4af3786e Switch to postgres + promises 2021-03-01 20:40:31 -05:00