66 Commits

Author SHA1 Message Date
ulferts 39e847792f move groups form to primer 2026-02-20 11:52:04 +01:00
Klaus Zanders 71db5df124 Fix errors with the setup for members 2026-02-09 15:08:14 +01:00
Oliver Günther 3473394130 Restrict visibility on groups scope 2025-10-23 12:59:57 +02:00
Dombi Attila 0df9fcc9a0 Use custom_value_for accessors instead of iterating custom field values in specs 2025-10-14 12:01:58 +02:00
Dombi Attila 747819136e Create group custom field validation specs 2025-10-14 12:01:58 +02:00
Jan Sandbrink 8af816b87d Reskin groups index with using Primer components
Using most of the design language that we have been using in other
primerized index views as well, but not changing functionality compared
to the previous version.
2025-07-25 16:35:59 +02: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
Tobias Dillmann 2172610f5e add group members spec 2024-10-28 09:10:03 +01:00
Oliver Günther cd2d0f0e1a Remove primerized_flash prefix in methods 2024-09-30 21:39:36 +02:00
Oliver Günther 1cf49e2c9f Adapt specs 2024-09-30 20:37:00 +02:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Henriette Darge 46860150b1 Adapt tests to new PageHeader structure 2024-07-15 14:28:09 +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
Pavel Balashou faa1bc18a0 [#51679] Can not add invited users to existing groups
https://community.openproject.org/work_packages/51679
2024-01-15 17:35:52 +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
ulferts 5b2bc41f41 Merge remote-tracking branch 'origin/dev' into easier-factory-role-setup 2023-10-12 12:09:27 +02:00
ulferts 2b2abf864a introduce ProjectRole model 2023-10-09 14:34:20 +02:00
Klaus Zanders 78c1e4fadb Switch all uses of principal factories to use new interface 2023-10-09 10:39:44 +02:00
bsatarnejad 85411f20c7 change tests due to replacing .flash with .op-toast 2023-07-18 16:47:45 +02:00
ulferts de4196f227 Merge remote-tracking branch 'origin/release/12.5' into dev 2023-07-18 09:52:24 +02:00
Wieland Lindenthal d7c3040646 Remove archived projects from group project dropdown
https://community.openproject.org/work_packages/48263
2023-07-17 13:42:08 +02:00
Aaron Contreras 69c0d27b73 Switch groups/memberships_spec to cuprite 2023-06-28 05:18:59 -05:00
Aaron Contreras d80a9ca593 Switch groups/groups_spec to cuprite 2023-06-28 05:18:58 -05:00
Aaron Contreras 04c15c5a8c Switch groups/group_memberships_spec to cuprite 2023-06-28 05:18:58 -05: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
Christophe Bliard 9e865b4f7b lint: Run rubocop safe autocorrect
Command is `rubocop --safe --autocorrect app lib lib_static modules spec`
2023-03-09 10:25:57 +01: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 48a4f1b6ad lint with rubocop --autocorrect (safe cops only) 2022-06-02 10:40:10 +02:00
Oliver Günther 4c6e5b4907 Use browser based feature test for CRUD tests
They have form authenticity now and will fail otherwise
2022-04-06 08:05:39 +02:00
Christophe Bliard bc8d423ec2 update copyright information for 2022 2022-03-01 17:05:59 +01:00
Christophe Bliard 47a297daae Fix argument alignment since f08bea3467 (#10129)
* Fix argument alignment since f08bea3467

The FactoryBot.* prefix has been removed in f08bea3467. Since then
rubocop complains about Layout/ArgumentAlignment. This commit fixes it.

* do not fix alignments for modules/*/spec yet

hoping to be under the limit of 65535 characters for reviewdog to report on rubocop errors
2022-02-02 21:48:06 +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
ulferts 9fa5599392 Feature/member notifications (#8958)
* spec with correctly scoped links

* move db check into own file - fix deprecation

* basic spec for member creation service

* use constants for all notifications

* send an OP notification after member has been created

* send an OP notification after member has been updated

* mails on group member added

Depending on whether the membership existed before or not, an updated or
a created notification is send. This is done asynchronously.

* move all mail sender background jobs into namespace

* wip

* wip

* correct handling group member notifications

* add setting enable/disable mail sending on member alterations

* use services in members controller

* move Notifiable to OpenProject

* remove member after save hooks

* cleanup/testing/linting

* render member mails in receiver locale

* remove add_member! method

* use mailer layout for all mailers

* Update app/services/groups/cleanup_inherited_roles_service.rb

Co-authored-by: Oliver Günther <mail@oliverguenther.de>

* use around callback to avoid prepending

* handle nil params

Co-authored-by: Oliver Günther <mail@oliverguenther.de>
2021-04-20 13:45:42 +02:00
Oliver Günther f4dfd6c6c6 [36238] Extract and fix user references in other objects (#9007)
* Move replacing invalid references into separate job for principals

* Write migration to remove existing invalid custom values and responsible

* Fix other specs

* Fix other specs

* rewrite replacing user in records

* consolidate principal deletion

* include placeholder users in spec

Co-authored-by: ulferts <jens.ulferts@googlemail.com>
2021-02-16 08:46:53 +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
Cyril Rohr b4086b2968 Standalone CI docker container (#8943) 2021-02-02 15:33:33 +01:00
Oliver Günther 769be47723 [35815] Add visible show page for all users to groups (#8949)
To that end, move the show group routes out of /admin, that requires we
use a different path helper for it as `group_path` will still link to
the first admin resource.
2021-02-01 09:25:12 +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 3ffadd5b24 Add spec to ensure member is removable after group removed 2020-06-25 16:42:40 +02:00
Oliver Günther 80e747e0c6 Fix test by calling service with system user
Adds this to the factory to avoid using the system user all over the
place
2020-05-05 13:10:09 +02:00
Oliver Günther e4dcc6c5ea Avoid usage of users << pattern in group
This will no longer trigger the addition
2020-05-05 13:10:07 +02: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 57529d73c4 Adapt tests to new tab row structure 2020-01-20 15:34:49 +01:00