Commit Graph

144 Commits

Author SHA1 Message Date
Julian Lam
f93a0b83bb test: fix tests so that when user.create is called, email is set prior to confirmation 2022-08-04 14:24:30 -04:00
Barış Soner Uşaklı
d20b07cfea Webpack5 (#10311)
* feat: webpack 5 part 1

* fix: gruntfile fixes

* fix: fix taskbar warning

add app.importScript
copy public/src/modules to build folder

* refactor: remove commented old code

* feat: reenable admin

* fix: acp settings pages, fix sortable on manage categories

embedded require in html not allowed

* fix: bundle serialize/deserizeli so plugins dont break

* test: fixe util tests

* test: fix require path

* test: more test fixes

* test: require correct utils module

* test: require correct utils

* test: log stack

* test: fix db require blowing up tests

* test: move and disable bundle test

* refactor: add aliases

* test: disable testing route

* fix: move webpack modules necessary for build, into `dependencies`

* test: fix one more test

remove 500-embed.tpl

* fix: restore use of assets/nodebb.min.js, at least for now

* fix: remove unnecessary line break

* fix: point to proper ACP bundle

* test: maybe fix build test

* test: composer

* refactor: dont need dist

* refactor: more cleanup

use everything from build/public folder

* get rid of conditional import in app.js

* fix: ace

* refactor: cropper alias

* test: lint and test fixes

* lint: fix

* refactor: rename function to app.require

* refactor: go back to using app.require

* chore: use github branch

* chore: use webpack branch

* feat: webpack webinstaller

* feat: add chunkFile name with contenthash

* refactor: move hooks to top

* refactor: get rid of template500Function

* fix(deps): use webpack5 branch of 2factor plugin

* chore: tagging v2.0.0-beta.0 pre-release version 💥 :shipit: 🎉 🚀

* refactor: disable cache on templates

loadTemplate is called once by benchpress and the result is cache internally

* refactor: add server side helpers.js

* feat: deprecate /plugins shorthand route, closes #10343

* refactor: use build/public for webpack

* test: fix filename

* fix: more specific selector

* lint: ignore

* refactor: fix comments

* test: add debug for random failing test

* refactor: cleanup

remove test page, remove dupe functions in utils.common

* lint: use relative path  for now

* chore: bump prerelease version

* feat: add translateKeys

* fix: optional params

* fix: get rid of extra timeago files

* refactor: cleanup, require timeago locale earlier

remove translator.prepareDOM, it is in header.tpl html tag

* refactor: privileges system to use a Map in the backend instead of separate objects for keys and labels (#10378)

* refactor: privileges system to use a Map in the backend instead of separate objects for keys and labels

- Existing hooks are preserved (to be deprecated at a later date, possibly)
- New init hooks are called on NodeBB start, and provide a one-stop shop to add new privileges, instead of having to add to four different hooks

* docs: fix typo in comment

* test: spec changes

* refactor: privileges system to use a Map in the backend instead of separate objects for keys and labels (#10378)

* refactor: privileges system to use a Map in the backend instead of separate objects for keys and labels

- Existing hooks are preserved (to be deprecated at a later date, possibly)
- New init hooks are called on NodeBB start, and provide a one-stop shop to add new privileges, instead of having to add to four different hooks

* docs: fix typo in comment

* test: spec changes

* feat: allow app.require('bootbox'/'benchpressjs')

* refactor: require server side utils

* test: jquery ready

* change istaller to use build/public

* test: use document.addEventListener

* refactor: closes #10301

* refactor: generateTopicClass

* fix: column counts for other privileges

* fix: #10443, regression where sorted-list items did not render into the DOM in the predicted order [breaking]

* fix: typo in hook name

* refactor: introduce a generic autocomplete.init() method that can be called to add nodebb-style autocompletion but using different data sources (e.g. not user/groups/tags)

* fix: crash if `delay` not passed in (as it cannot be destructured)

* refactor: replace substr

* feat: set --panel-offset style in html element based on stored value in localStorage

* refactor: addDropupHandler() logic to be less naive

- Take into account height of the menu
- Don't apply dropUp logic if there's nothing in the dropdown
- Remove 'hidden' class (added by default in Persona for post tools) when menu items are added

closes #10423

* refactor: simplify utils.params [breaking]

Retrospective analysis of the usage of this method suggests that the options passed in are superfluous, and that only `url` is required. Using a browser built-in makes more sense to accomplish what this method sets out to do.

* feat: add support for returning full URLSearchParams for utils.params

* fix: utils.params() fallback handling

* fix: default empty obj for params()

* fix: remove \'loggedin\' and \'register\' qs parameters once they have been used, delay invocation of messages until ajaxify.end

* fix: utils.params() not allowing relative paths to be passed in

* refactor(DRY): new assertPasswordValidity utils method

* fix: incorrect error message returned on insufficient privilege on flag edit

* fix: read/update/delete access to flags API should be limited for moderators to only post flags in categories they moderate

- added failing tests and patched up middleware.assert.flags to fix

* refactor: flag api v3 tests to create new post and flags on every round

* fix: missing error:no-flag language key

* refactor: flags.canView to check flag existence, simplify middleware.assert.flag

* feat: flag deletion API endpoint, #10426

* feat: UI for flag deletion, closes #10426

* chore: update plugin versions

* chore: up emoji

* chore: update markdown

* chore: up emoji-android

* fix: regression caused by utils.params() refactor, supports arrays and pipes all values through utils.toType, adjusts tests to type check

Co-authored-by: Julian Lam <julian@nodebb.org>
2022-04-29 21:39:33 -04:00
CommanderRoot
200f0b2e4f refactor: replace deprecated String.prototype.substr() (#10432)
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
2022-03-31 13:49:56 -04:00
Julian Lam
1b8eeaf840 feat: more tests for ensuring downvoted posts are added to the :votes zset 2022-02-04 14:33:58 -05:00
Barış Soner Uşaklı
1264dcb555 test: add email interstitial tests 2021-12-15 21:28:46 -05:00
Barış Soner Uşaklı
0e273ab25a test: fix tests 2021-12-14 12:15:08 -05:00
Barış Soner Uşaklı
404a877408 test: add missing tests 2021-11-23 19:47:29 -05:00
Barış Soner Uşaklı
754cdab896 test: debug routes in dev 2021-11-22 23:38:04 -05:00
Barış Soner Uşaklı
c5f08fdc81 breaking: remove socket.io/flags.js
refactor: helpers.loginUser returns a single object {jar, csrf_token}
2021-11-22 19:23:51 -05:00
Barış Soner Uşaklı
ae64b9f495 test: add another assert for random failing test 2021-11-09 11:05:03 -05:00
Barış Soner Uşaklı
e3f5b706a5 test: show body when test fails 2021-11-08 22:36:10 -05:00
Julian Lam
10bb8cf747 test: fix account export test routes 2021-10-29 15:18:40 -04:00
Barış Soner Uşaklı
3605ac811d fix: possible test fix for subfolder redirect 2021-09-24 19:23:46 -04:00
Julian Lam
8cb475482a test: remove debug log 2021-09-24 17:08:36 -04:00
Julian Lam
4eacfef02b fix: missing relative path in test 2021-09-24 17:07:21 -04:00
Julian Lam
58e0a366c8 fix: #9834, missing null email check on new registrations, added tests 2021-09-24 12:15:40 -04:00
Julian Lam
cb69934ad0 test: no need to create fake interstitial as NodeBB comes with some by default 2021-09-24 10:43:45 -04:00
Julian Lam
81611ae1c4 fix(emails): broken test for api/user/email/:email
+ fixed broken tests due to unexpected behaviour for email confirmation
2021-07-30 13:29:13 -04:00
Julian Lam
0960a81468 fix: tests 2021-07-09 12:24:32 -04:00
Barış Soner Uşaklı
36f119a96a fix: #9492, keep query params on redirect 2021-04-15 12:43:28 -04:00
Barış Soner Uşaklı
fc90f32ec0 fix: tests, new categories go to top now 2021-02-11 12:58:59 -05:00
Peter Jaszkowiak
dab3b23575 chore: eslint no-var, vars-on-top 2021-02-08 18:06:44 -05:00
Peter Jaszkowiak
b56d9e12b5 chore: eslint prefer-arrow-callback 2021-02-08 18:06:44 -05:00
Peter Jaszkowiak
707b55b6a5 chore: eslint prefer-template 2021-02-08 18:06:44 -05:00
Julian Lam
5c21c33e58 fix: tests breakage due to 67e3fb6498 2021-02-05 14:31:31 -05:00
Barış Soner Uşaklı
d41ce87334 fix: removed object routes 2021-01-27 17:44:48 -05:00
Barış Soner Uşaklı
647d3ba810 fix: removed methods 2021-01-27 17:36:58 -05:00
Barış Soner Uşaklı
8ece64ab82 fix: test for https://github.com/NodeBB/NodeBB/pull/9180 2021-01-07 21:42:19 -05:00
Barış Soner Uşaklı
5fa098326f fix: https://github.com/NodeBB/NodeBB/pull/8685
fix category link redirect on cold load
fix helpers.redirect if passed in url is external
fix ajaxify so it doesn't slice first character of external url
2020-11-23 12:25:57 -05:00
Julian Lam
ee4d90f68f fix: test breakage from f300c933a5 2020-11-10 14:39:57 -05:00
Julian Lam
f300c933a5 refactor: move session revocation route to write api 2020-11-10 14:27:38 -05:00
Barış Soner Uşaklı
255cf43ea9 fix: show msg on fail 2020-11-07 22:40:34 -05:00
Barış Soner Uşaklı
bf480ee58b refactor: setupApiRoute signature 2020-10-15 23:12:19 -04:00
Barış Soner Uşaklı
872bacf1c4 Admin/users (#8762)
* feat: wip admin/users

* feat: more work

* feat: more fixes

* feat: #8662, verified/unverified user groups

* feat: add filter

* feat: change user search to use filters array

* refactor: remove unused search call

* fix: tests

* fix: cant join system groups

* fix: upgrade script
2020-10-13 22:42:50 -04:00
Barış Soner Uşaklı
7db224f689 fix: timeago test for dev/prod 2020-10-11 22:40:28 -04:00
Barış Soner Uşaklı
cecdd2915e fix: timeago test 2020-10-11 22:39:37 -04:00
Barış Soner Uşaklı
3b231360d3 feat: load jquery-form before using 2020-10-10 21:54:32 -04:00
Julian Lam
229eb2c2d8 fix(writeapi): tests 2020-10-08 15:33:10 -04:00
psychobunny
bf3c1c0878 fix: manifest test + remove duplicate test 2020-09-28 20:55:53 -04:00
Barış Soner Uşaklı
5e8c376115 fix: remove old test 2020-09-13 19:48:41 -04:00
Barış Soner Uşaklı
e3a0b4b1c1 fix: tests 2020-09-06 23:08:00 -04:00
Barış Soner Uşaklı
52718ce0ba fix: remove old test 2020-07-29 09:14:23 -04:00
Barış Soner Uşaklı
f0ce309d03 fix: test 2020-06-26 15:26:15 -04:00
Barış Soner Uşaklı
3be4d5f7d5 feat: redirect /me to user profile 2020-06-08 15:37:20 -04:00
Barış Soner Uşaklı
ec5582b53c feat: add privilege give/rescind hooks (#8336)
* feat: add privilege give/rescind hooks

action:privileges.categories.give/rescind
action:privileges.global.give/rescind

breaking change, privileges.categories.give/rescind and privileges.global.give/rescind use full privilege name for groups ie `groups:find` instead of `find`

* fix: tests, privileges renamed
2020-05-26 21:57:38 -04:00
Barış Soner Uşaklı
e3c9dafa08 fix: tests 2019-11-01 22:13:00 -04:00
Julian Lam
cf7e0cfd2d feat: no more session cookie for guests (#7982)
* feat: no more session cookie for guests

* fix(tests): added additional tests and fixed the broken test
2019-10-22 13:38:36 -04:00
Barış Soner Uşaklı
dec8040c09 feat: widgets/index.js
enable widget-essentials in tests
fix widget test
2019-07-29 19:42:55 -04:00
Julian Lam
79eed9ae60 feat: #7743 meta/templates.js 2019-07-23 14:26:14 -04:00
Barış Soner Uşaklı
cd2e68cb2d feat: remove unused code, add 2 tests 2019-07-12 20:16:05 -04:00