aboutsummaryrefslogtreecommitdiff
path: root/test/pleroma/web/plugs
AgeCommit message (Collapse)Author
2022-08-25Merge branch 'fix_erratic_tests' into 'develop'tusooa
Fix flaky rate_limiter_test.exs test "it restricts based on config values" See merge request pleroma/pleroma!3688
2022-07-16Document way to do notice compatibility routes with Nginx reverse-proxy insteadSean King
2022-07-09Fix rate_limiter_test.exs test "it restricts based on config values"Ilja
It used a timer to sleep. But time also goes on when doing other things, so depending on hardware, the timings could be off. I slightly changed the tests so we still test what we functionally want. Instead of waiting until the cache expires I now have a function to expire the test and use that. That means we're not testing any more if the cache really expires after a certain amount of time, but that's the responsability of the dependency imo, so shouldn't be a problem. I also changed `Pleroma.Web.Endpoint, :http, :ip` to `127.0.0.1` because that's the setting people typically have, and I see no reason to do it differently. Especially since it's an exernal ip, which may come over as weird or suspicious to people.
2022-05-06Allow to skip cache in Cache plugTusooa Zhu
Ref: fix-local-public
2022-03-20Merge branch 'from/upstream-develop/tusooa/translate-pages' into 'develop'Haelwenn
Translate backend-rendered pages See merge request pleroma/pleroma!3634
2022-03-03LintTusooa Zhu
2022-03-03Support multiple locales from userLanguage cookieTusooa Zhu
2022-03-03Support multiple locales formallyTusooa Zhu
elixir gettext current does not fully support fallback to another language [0]. But it might in the future. We adapt it so that all languages in Accept-Language headers are received by Pleroma.Web.Gettext. User.languages is now a comma-separated list. [0]: https://github.com/elixir-gettext/gettext/issues/303
2022-03-02Add test for fallbacking to a general languageTusooa Zhu
2022-03-02Fallback to a variant if the language in general is not supportedTusooa Zhu
For an example, here, zh is not supported, but zh_Hans and zh_Hant are. If the user asks for zh, we should choose a variant for them instead of fallbacking to default. Some browsers (e.g. Firefox) does not allow users to customize their language codes. For example, there is no zh-Hans, but only zh, zh-CN, zh-TW, zh-HK, etc. This provides a workaround for those users suffering from bad design decisions.
2022-02-25Copyright bump for 2022Sean King
2022-02-21Prefer userLanguage cookie over Accept-Language header in detecting localeTusooa Zhu
https://git.pleroma.social/pleroma/pleroma-meta/-/issues/60
2021-12-27EnsureStaffPrivilegedPlug: add testsAlex Gleason
2021-12-25Merge remote-tracking branch 'origin/develop' into notice-routesAlex Gleason
2021-12-22Merge branch 'erratic-tests' into 'develop'Alex Gleason
Skip erratic tests See merge request pleroma/pleroma!3572
2021-12-21Skip erratic testsAlex Gleason
2021-12-19Merge branch 'manifest' into 'develop'Alex Gleason
Expose /manifest.json for PWA Closes #882 See merge request pleroma/pleroma!3544
2021-12-19Merge remote-tracking branch 'origin/develop' into manifestAlex Gleason
2021-12-15Merge remote-tracking branch 'origin/develop' into live-dashboardAlex Gleason
2021-12-15Add Phoenix LiveDashboardAlex Gleason
Co-authored-by: Egor Kislitsyn <egor@kislitsyn.com>
2021-12-03Fix frontend_status_plug_test.exsAlex Gleason
2021-11-24Merge remote-tracking branch 'pleroma/develop' into manifestAlex Gleason
2021-11-24Expose /manifest.json for PWAAlex Gleason
2021-08-06Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into remove/mastofeSean King
2021-08-04Merge remote-tracking branch 'pleroma/develop' into staff-plugAlex Gleason
2021-07-12Moderators: add UserIsStaffPlugAlex Gleason
2021-06-04Fix merge conflicts with upstreamSean King
2021-05-28Pleroma.Web.get_api_routes/0 --> Pleroma.Web.Router.get_api_routes/0Alex Gleason
Reduce recompilation time by breaking compile-time cycles
2021-05-05Add notice compatibility routes for other frontendsAlex Gleason
Fixes: https://git.pleroma.social/pleroma/pleroma/-/issues/1785
2021-04-15Remove no longer necessary unit tests for MastoFESean King
2021-02-25Leave a note for future explorersMark Felder
2021-02-25No need to filter out Mix.env() from the API routes.Mark Felder
2021-02-25Filter out MIX_ENV from route list and add a testMark Felder
2021-02-17Remove `:auth, :enforce_oauth_admin_scope_usage`rinpatch
`admin` scope has been required by default for more than a year now and all apps that use the API seems to request a proper scope by now.
2021-01-27Add testsEgor Kislitsyn
2021-01-27Merge branch 'chore/tests-use-clear_config' into 'develop'lain
Convert tests to all use clear_config instead of Pleroma.Config.put See merge request pleroma/pleroma!3282
2021-01-26Merge branch 'service-worker-allowed-header' into 'develop'feld
Ability to set custom HTTP headers per each frontend See merge request pleroma/pleroma!3247
2021-01-26Convert tests to all use clear_config instead of Pleroma.Config.putMark Felder
2021-01-21Allow to define custom HTTP headers per each frontendeugenijm
2021-01-21Ability to set the Service-Worker-Allowed headereugenijm
2021-01-18Merge branch 'develop' into refactor/deactivated_user_fieldMark Felder
2021-01-15Change user.confirmation_pending field to user.is_confirmedMark Felder
2021-01-15Change user.deactivated field to user.is_activeMark Felder
2021-01-14Pbkdf2: Use it everywhere.Lain Soykaf
2021-01-13Password: Replace Pbkdf2 with Password.lain
2021-01-13Bump Copyright to 2021Haelwenn (lanodan) Monnier
grep -rl '# Copyright © .* Pleroma' * | xargs sed -i 's;Copyright © .* Pleroma .*;Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>;'
2020-12-21Test: More async/sync tweaks.lain
2020-12-21Tests: Make as many tests as possible async.lain
In general, tests that match these criteria can be made async: - Doesn't use real Cachex. - Doesn't write to the Config / Application Environment. - Uses Mock. Using Mox is fine. - Uses the streamer.
2020-12-18Tests: Use NullCache for async tests.lain
Caching can't work in async tests, so for them it is mocked to a null cache that is always empty. Synchronous tests are stubbed with the real Cachex, which is emptied after every test.
2020-12-18Tests: Remove unneeded explicit cachex use.lain
Only use cachex when we're actually testing it.