53 Commits

Author SHA1 Message Date
Eric Schubert f3f8625434 [chore] removed docs and code insertions for custom header
- X-Requested-With header no longer needed to prevent CSRF for session
  based auth
- removed occurences and mentions from code and docs
2026-05-12 08:13:14 +02:00
Dombi Attila a57de7a6da Correct spec name typos, filter out non spec files from CI spec runs
Update the spec running globs to include specs in the root spec folder.
2026-05-05 22:40:15 +03:00
Dombi Attila a8e966a95b Correct expectation in formerly ignored spec file. 2026-05-05 22:40:00 +03:00
Henriette Darge 313127fb5c Fix tests
Update config/locales/en.yml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update app/views/my/account.html.erb

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update app/forms/my/account_form.rb

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>

Update app/forms/my/account_form.rb

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>

Update app/forms/my/account_form.rb

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>

Apply suggestion from @myabc

Co-authored-by: Alexander Brandon Coles <a.coles@openproject.com>
2025-11-26 16:29:25 +01:00
Jan Sandbrink 0b87e7543f Freeze string literals in specs
Rolling out frozen string literals further by freezing all
string literals in core specs.
2025-05-05 09:29:55 +02:00
Oliver Günther f791d33b72 Replace specs 2025-01-14 10:20:35 +01:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Oliver Günther aec8632d38 Add spec 2024-05-22 11:31:10 +02:00
Oliver Günther 9adc0ec751 Prevent plain text from being inlinable 2024-05-22 10:39:38 +02:00
ulferts 3b2121f733 Revert "Merge remote-tracking branch 'origin/release/13.4' into dev"
This reverts commit 40b2bbeb09, reversing
changes made to b4c6cb17cc.
2024-03-21 11:31:17 +01:00
Ivan Kuchin 7787e457a3 Revert "Merge branch 'dev' into release/13.4"
This reverts commit a901541269, reversing
changes made to e573ca00b7.
2024-03-20 20:19:08 +01:00
Ivan Kuchin 9e4934cd0a change quotes using rubocop --only Style/StringLiterals,Style/QuotedSymbols -a 2024-03-20 18:05:22 +01:00
Christophe Bliard 8fa8584538 Run rubocop --autocorrect on all files
Only the safe cops have run. rubocop version is 1.59.0.
2024-01-05 15:27:09 +01:00
Christophe Bliard c795874f7f Update copyright year for 2024
command used: `rg -l 'Copyright \(C\) 2012-202\d the OpenProject' | xargs -n 100 sed -i -r 's/Copyright \(C\) 2012-202. the OpenProject/Copyright (C) 2012-2024 the OpenProject/'`
2024-01-02 16:23:54 +01:00
Oliver Günther aea036079f Proper logout tests 2023-11-23 10:45:54 +01:00
Christophe Bliard 4c2a9d0aa8 Enable RSpec zero monkey patching mode
The plan for RSpec 4.0 is to disable monkey patching.

See https://github.com/rspec/rspec-core/blob/main/features/configuration/zero_monkey_patching_mode.feature for details.
2023-05-31 19:22:29 +02:00
Oliver Günther 8cd6e1ef64 Remove cache_store support for sessions
https://community.openproject.org/wp/48029
2023-05-02 10:17:02 +02:00
Christophe Bliard aa23106c11 lint: autocorrect RSpec/FactoryBot/ConsistentParenthesesStyle
command is

    rubocop -A --only RSpec/FactoryBot/ConsistentParenthesesStyle modules spec
2023-03-07 15:04:32 +01:00
Christophe Bliard 85b3258a29 Autocorrect with some rubocop cops
RSpec/Rails/InferredSpecType and Style/RedundantConstantBase

rubocop --autocorrect-all --only RSpec/Rails/InferredSpecType,Style/RedundantConstantBase spec modules/*/spec
2023-01-13 14:28:59 +01:00
Christophe Bliard 21a696ef9b Update copyright information for 2023 2022-12-30 15:51:26 +01:00
Christophe Bliard bc8d423ec2 update copyright information for 2022 2022-03-01 17:05:59 +01:00
Oliver Günther f08bea3467 Remove FactoryBot.* prefix where applicable 2022-01-25 08:19:06 +01:00
Oliver Günther ccfa29c728 Move license and copyright docs to root, fix names and references 2021-09-02 21:50:46 +02:00
Oliver Günther 8f5006a51b Rename ActiveRecord class to UserSession for clarity 2021-04-13 14:06:24 +02:00
Oliver Günther 0d71772c37 User SqlBypass sessions to avoid ActiveRecord for session storage (#9142)
* Use SqlBypass sessions to avoid ActiveRecord for session storage

* Set default host if Capybara.app_host does not exist
2021-04-01 13:57:28 +01:00
ulferts 1bdd2ab9ae safe automatic fixes by rubocop (#8994) 2021-02-11 16:02:18 +01:00
Oliver Günther 2cde433326 Remove usages of AnyFixture (#8987)
AnyFixture will create once instance of a factory for reuse in a number of specs.
This will work fine until we require a clean slate for a specific example.

As we have numerous tests that test like the database is empty,
we get a number of disadvantages:

  - After an example with `with_clean_fixture` metadata, the fixture will only be regenerated
    after the next example that uses it. This means the order of execution will change
    the number of objects in the DB.

  - The more `with_clean_fixture` we have, the smaller the performance advantage of AnyFixture will
    result in.

  - You cannot use an AnyFixture in a spec that needs a clean slate. This should be obvious but was overlooked
    by myself.
2021-02-10 08:59:15 +01:00
ulferts 6140f4c7e9 update copyright to 2021 (#8925)
Updates the copyright to 2021 for all files that have a copyright. Files in our source code without the copyright header still do not receive one automatically. Additionally, backlisted files are also excluded.

Previously the copyright of chiliproject which references redmine stated a copyright of redmine up to and including 2017 which is not true for the code we have in here. Because of that I changed that to 2013
2021-01-13 17:47:45 +01:00
Oliver Günther 53f2d694ff Use AnyFixtures to generate fixtures from factories (#7230)
Uses FactoryBot to keep and maintain specific records in a special transaction that does not get removed after each spec.
They automatically are created whenever first hitting them.
This makes an excellent time saver for items that are commonly used, such as an admin user account
2020-04-09 11:54:26 +02:00
Henriette Dinger bd7f4e4814 Update copyright notice 2020-01-15 11:31:26 +01:00
Oliver Günther 6b73dbfa03 Merge pull request #6579 from opf/fix/expire-sessions-spec
Use active_record_store in testing to fix expire session spec

[ci skip]
2018-08-24 13:19:46 +02:00
Oliver Günther d79f5cd7b1 Fix expire_sessions spec 2018-08-24 10:35:08 +02:00
Jens Ulferts 92fbd0bebe linting 2018-08-23 16:22:57 +02:00
Jens Ulferts ae5636b754 remove angular-xss gem as angularjs is no longer loaded globally 2018-06-15 11:04:15 +02:00
Oliver Günther 059770f533 FactoryGirl => FactoryBot
Removes the deprecation
2018-05-07 22:38:20 +02:00
Oliver Günther 78c363951a Merge remote-tracking branch 'origin/release/7.4' into dev 2018-05-07 11:11:33 +02:00
Oliver Günther 46563e1a70 [27462] Pass wiki title to new page if it does not exist (#6299)
When creating a wiki page from the text with, e.g., `[[Foo Bar]]`,
the user gets redirected to wiki#show for a page `foo-bar` (the slug of
the title above).

He thus loses the title attribute he entered previously. Instead we can
pass the title to the new wiki page IFF the page does not exist.

https://community.openproject.com/wp/27462

[ci skip]
2018-05-07 11:07:23 +02:00
Oliver Günther 1cd13c9d48 Merge remote-tracking branch 'origin/dev' into feature/commonmark-and-ckeditor 2018-04-03 08:53:05 +02:00
Oliver Günther 43fce6f768 Fix expected alert error class 2018-03-19 07:54:57 +01:00
Oliver Günther 88a5e787ce CKEditor5 config and bundle for OP 2018-02-12 15:38:10 +01:00
Oliver Günther 6ef4211e77 Bump copyright to 2018 (#6171)
[ci skip]
2018-02-12 08:51:12 +01:00
Oliver Günther a5a5b60235 Don't set the header for feature specs
It doesn't make sense since we won't send direct API requests anywhere.
2017-09-12 09:19:35 +02:00
Oliver Günther 5d84add246 Expire sessions in warden auth scope 2017-06-29 10:13:39 +02:00
Wieland Lindenthal a3167b3b39 Fix specs for not having onbeforeunload anymore. 2017-04-13 11:43:25 +02:00
Oliver Günther 7cf11bb689 Update copyright notice 2017-01-10 15:11:43 +01:00
Oliver Günther 60cbf95b44 Fix escaping angular expressions when in isolated scope
Isolated scopes do not inherit from rootScope and thus do not have
`DOUBLE_LEFT_CURLY_BRACE`.

However, every scope has a reference to the rootScope with
`scope.$root` (https://docs.angularjs.org/api/ng/type/$rootScope.Scope)
2016-11-14 13:27:45 +01:00
Jens Ulferts 6ba275ad7a Merge branch 'release/6.0' into dev 2016-10-26 13:54:47 +02:00
Oliver Günther 1832ff91f0 [24050] Unescape formattable html strings inserted as ng-bind-html
The description and all other formattable fields are applied to the dom
with `ng-bind-html`. These directives never compile their contents, thus
any escaped expression `{{ ... }}` entered by the user is never evaluated.

We can either:

1. Compile the content needlessly just to remove escaped expressions.

2. Remove the escaped expression explicitly.

This PR implements the second approach.

https://community.openproject.com/work_packages/24050/activity
2016-10-14 13:38:12 +02:00
Jens Ulferts 571b2098c7 Merge branch 'release/6.0' into dev 2016-10-06 11:17:09 +02:00
Oliver Günther 7fe77ac223 Add spec for correct escaping in wiki preview 2016-09-07 14:16:09 +02:00