46 Commits

Author SHA1 Message Date
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 b214c61315 Reset some specs 2025-01-14 13:23:57 +01:00
Henriette Darge a4904fb491 Move PageHeader into their own components and fix some tests 2024-12-05 14:00:12 +01:00
Oliver Günther e8b26edbd3 Fix forum upload spec
with turbo: false, the form does not correctly get replaced in the current implementation,
brekaing tests on upload attachment counting.
2024-10-18 10:37:45 +02:00
Oliver Günther 2136574a60 Remove deprecated toast methods 2024-10-03 20:41:38 +02:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +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
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
ulferts 2fda27175a Merge pull request #13703 from opf/fix/target_top_renderer
Default to target=_top for all links rendered in CKEditor
2023-09-21 16:30:58 +02:00
Oliver Günther fd7b78cf3e Default to target=_top for all links rendered in CKEditor 2023-09-21 10:01:42 +02:00
Oliver Günther fbee3b0889 Fix form submissions when mixing primer with named submit buttons
This required us to use a timeout to re-enable a disabled submitter.
In turn, a few specs failed which now no longer did a form submit directly.
2023-09-20 11:59:32 +02:00
Oliver Günther 9af93ee132 Fix quoting first message with stimulus
https://community.openproject.org/work_packages/48629
2023-07-19 10:29:50 +02: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 97600a6c49 refactor: Extract spec uploading code in a class
The flaky test fixed 59eb308cbb was failing because the test was not
waiting for the attachments element to be displayed. In some other
similar tests, the code was waiting for it, and one test ever scrolled
to that element.

If code was properly factored, the above test would never have been
flaky.

This commit is an attempt to factor the interactions with the
attachments list so that the next test written using it will be reliable
by default.
2023-04-06 14:25:55 +02:00
Christophe Bliard c015be66ca Fix flaky test 2023-04-06 14:25:55 +02:00
Eric Schubert 93a19fd57d [#46150] Fixes for tests
- fix ckeditor drag and drop for upload
- remove attachable mixin unit tests on work package
2023-03-21 10:02:39 +01:00
Christophe Bliard 393d71373f lint: Make rubocop happier 2023-03-07 15:47:03 +01:00
Christophe Bliard c43fccf246 lint: autocorrect Style/HashSyntax
command is

    rubocop -A --only Style/HashSyntax app lib lib_static modules spec
2023-03-07 15:07:44 +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
Eric Schubert 2eb54e073f [#43577] Fix drag and drop by counting drag over and leave (#11896)
* [#43577] Fix drag and drop by counting drag over and leave

- https://community.openproject.org/work_packages/43577
- replace action button text for attaching files
- refactored drag and drop behaviour
  - on any global dragenter increase a counter
  - on any global dragleave decrease counter
  - if counter is 0 -> no global dragging is happening (mouse was moved out of window)
  - this way, we are independent from the order in which the DragEvents are fired by the browser (bigger differences between Firefox and Chrome)

Co-authored-by: Benjamin Bädorf <b.baedorf@openproject.com>
2023-01-11 13:17:17 +01:00
Christophe Bliard 21a696ef9b Update copyright information for 2023 2022-12-30 15:51:26 +01:00
Benjamin Bädorf fecb2805f4 Add drop zone to attachment list (#11606)
* Initial attachment list changes

* Merge attachment list and uploads

* Move upload mechanisms to op-attachment

* Refactoring attachment styles

* Fix state handling of attachments

* Drag and drop works

* Improve drop zone styles

* Small style improvement

* Remove debug log

* Finished wiki attachments upload spec

* Attachments upload spec for forum works

* Add feature spec for document drag & drop

* Add feature spec for budget attachment drag & drop

* Add feature spec for workpackge attachment drag & drop

* Add default value for attachment list to fix specs

* Fix attachment list for work package create page, remove unused styles

* Fix linting errors

* Add extra checks in document attachment uplaod spec

* Adress PR comments

* Fix broken selector in spec

* Make sure to blur in the ckeditor instance

* Fix meeting module attachment spec

* Fix qa selector

* Fix eslint errors

* Fix rubocop errors
2022-11-22 10:44:11 +00:00
Christophe Bliard 48a4f1b6ad lint with rubocop --autocorrect (safe cops only) 2022-06-02 10:40:10 +02:00
Eric Schubert 3bc3106a87 [#41340] migrate attachments to files tab
- https://community.openproject.org/work_packages/41340
- added new files tab to wp details view
- added attachments components to files tab
- removed attachments from wp single view, except for wp creation
- fixed a couple of eslint issues in affected files
- migrated attachments to resource store
- added upload to attachment store
- pull in newly built ckeditor
- removed old, hacky regression test
2022-03-22 14:24:12 +01:00
Christophe Bliard a33524ef6d remove ruby magic comment for utf-8
ruby interprets source encoding as utf-8 since 2.0.0, making magic comment redundant and useless
2022-03-10 19:36:58 +01: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
Benjamin Bädorf 3aaac1c7ce Rename most notification to toaster instances (#9765)
* Rename most notification to toaster instances

* Frontend builds

* Fix spec build

* Rename more notification elements to toaster

* Rename toaster-box to op-toast

* Fix op-toast-container

* Rename toasters upload progress

* Try fixing page.rb toaster check

* Fix some specs, break some others

* Correctly overwrite toast_type

* Fix more specs

* Fix one more notification to toaster rename

* Fix linting errors, harmonize naming more

* Remove byebug debugging statement

* Remove byebug debugging statement

* Rename notification in the backend, too

* Rename more instances of notifications to toastService

* Rename backend back to notification since bundle gems expect it there

* expect_toaster -> expect_toast

Co-authored-by: Henriette Darge <h.darge@openproject.com>
2021-11-04 16:25:55 +01:00
Oliver Günther 18e4c37cf3 Fix setting of mail_reminder and mail_alert in create_from_model_service 2021-09-29 18:00:03 +02: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 63ad2e8dd1 Generate IAN near real time (#9570)
* destroy notifications upon journal destruction

* breakup spec by journable

* have a dedicated job for scheduling journal completed events

* generate notifications in delayed job

* route wiki journal events through notifications

* combine mail sending for notifications into single job

* robustness if a journal is deleted

* linting

* differentiate BaseJournal and AssociatedJournal

BaseJournal holds the data of a journal that reflects the columns in the journaled model while AssociatedJournal reflects the columns of a model associated to the journaled model via a has_many/one association

* route news journal events through notifications

This does not yet include notifications for comments on news

* include news comment in notification workflow

* have the whole workflow in a single state machine job

* include forum message in notification workflow

* include document in notification workflow

* less dependencies from acts as watchable

* fix, test and document workflow job
2021-08-23 15:25:47 +02:00
Cyril Rohr b4086b2968 Standalone CI docker container (#8943) 2021-02-02 15:33:33 +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
Aleix Suau 53f8e985ff Fixed: figcaption kept inside the image (#8882)
* Fixed: figcaption kept inside the image

* adapt specs to altered figcaption handling

Co-authored-by: ulferts <jens.ulferts@googlemail.com>
2020-12-14 15:36:23 +01:00
ulferts 6cce947cbd Chore/rename timestamps (#8765)
* rename timestamps on time entry

* add updated_at filter/order for time entries

* rename on cost entries as well

This will make handling in the cost query easier

* adapt specs

* linting

* adapt project activity

* update references to updated_on

* remove outdated docs/code

* global memberships are just memberships

* rewire global membership creation/update/deletion

* delete no longer required code and patches

* move code to core

* move specs to core

* completely remove global roles in the form of a plugin

* adapt specs

* remove unused methods

* migrate existing data

* adapt membership representer to changed timestamps

* global memberships available via API

* implements created/update_at filters on memberships

* update member on roles being added/removed

* specify default value for created_at

* fix project permission check and validation on members

* adapt membership schema

* adapt usage of sort by on members widget

* support created/updated_on for api sort and filter

* remove outdated model file

* rename timestamps

* allow specifying timestamp column for aaj

* reload column information

* further rename of created_on

* include updated_at into journal creation

* adapt document updated_at calculation

* remove references to JournalVersion
2020-12-03 12:00:19 +01:00
Henriette Dinger bd7f4e4814 Update copyright notice 2020-01-15 11:31:26 +01:00
Henriette Dinger 97a2f8477b Adapt tests to new forum redirects && remove doubled possibility to add a new forum 2019-12-19 15:24:18 +01:00
Oliver Günther c5994d3b9b Rename Boards to Forums 2019-03-13 16:24:15 +01:00