313 Commits

Author SHA1 Message Date
Mir Bhatia cc3c3fbdf6 Add component specs 2026-06-09 08:51:19 +02:00
Alexander Brandon Coles d8708d8a62 Rename cuprite wait helper timeout: to wait:
Aligns with Capybara's `wait:` option naming conventions. A falsey value
skips the wait entirely, letting callers opt out of synchronisation.
2026-05-28 17:32:14 +02:00
Mir Bhatia dd092f37cd Add component specs 2026-05-06 09:09:20 +02:00
Oliver Günther c3189f1244 Fix background stubbing 2026-04-28 15:48:28 +02:00
Oliver Günther a9dbedcb9a Fix spec 2026-04-28 15:48:27 +02:00
Pavel Balashou 53e33770c2 Use ssrf filtering in Jira Import. 2026-04-21 10:29:45 +02:00
OpenProject Actions CI 6559ec3342 Merge branch 'release/17.3' into dev 2026-04-01 09:41:14 +00:00
Kabiru Mwenja 5e3dd6a1d1 fix(documents): strip invisible characters from document titles
Documents created with zero-width Unicode characters (e.g. U+200B)
in their titles become unclickable on the index page, making them
hard to manage or delete.

Introduce RemoveInvisibleCharacters normalizer, replacing the former
RemoveAsciiControlCharacters. It strips both ASCII control characters
and Unicode zero-width characters, with each category defined as a
named constant for clarity. Apply it to Document#title and update
existing callers (Project#identifier, CustomField#name).

Add a shared RSpec example "strips invisible characters" to verify
normalization consistently across all three models.
2026-03-31 18:18:41 +03:00
Klaus Zanders 32f5fdec57 Apply more flaky fixes 2026-03-31 15:48:41 +02:00
Kabiru Mwenja d3734a7485 Rename work_packages_identifier setting values to "classic" and "semantic"
The setting previously used "numeric" and "alphanumeric" as its allowed
values. Rename them to "classic" and "semantic" to better align with the
product terminology for the work package identifier modes.

Includes a migration to update any stored setting values in the database,
updated constants and helper methods on Setting::WorkPackageIdentifier,
and all corresponding references across models, components, forms,
frontend controllers, locales, and specs.
2026-03-28 10:01:57 +03:00
Klaus Zanders e7289141f1 Fix cuprite turbo helpers to catch errors 2026-03-25 11:02:21 +01:00
Klaus Zanders e9094aeee9 Also add a helper to wait for turbo frame navigation 2026-03-22 18:32:00 +01:00
Klaus Zanders ce15c5823c Add a sensible timeout to wait for on our turbo actions 2026-03-20 16:21:41 +01:00
Klaus Zanders 6fb0a0e897 Add a cuprite helper that waits for a turbo stream to have rendered 2026-03-20 15:25:01 +01:00
Klaus Zanders 189b28a6a0 Add a cuprite helper that waits for turbo:load to have completed 2026-03-20 15:25:00 +01:00
Tom Hykel 52db271466 Merge branch 'dev' into feature/72856-copy-project-with-semantic-identifiers 2026-03-19 22:53:05 +01:00
Tomas Hykel c2f35aad93 DRY up component specs 2026-03-19 22:33:41 +01:00
Markus Kahl f64e45eec7 SSRF protection update to work with ssrf_filter 1.3, explicitly pin gem version 2026-03-10 16:12:40 +00:00
Alexander Brandon Coles 4d6ccaa5be Merge branch 'dev' into merge-release/17.2-20260310112930
# Conflicts:
#	modules/backlogs/app/components/backlogs/backlog_menu_component.html.erb
#	modules/backlogs/app/views/rb_master_backlogs/_list.html.erb
#	modules/backlogs/spec/controllers/rb_sprints_controller_spec.rb
2026-03-10 08:48:14 -03:00
Markus Kahl 019cc9b63a Merge pull request #22262 from opf/feature/ssrf-protection-part-2-outgoing-webhooks
SSRF protection part 2 outgoing webhooks
2026-03-10 11:09:30 +00:00
Alexander Brandon Coles bb1eb75e20 Merge branch 'dev' into merge-release/17.2-20260310041552
# Conflicts:
#	config/locales/crowdin/uk.yml
#	modules/backlogs/config/locales/crowdin/uk.yml
#	modules/budgets/config/locales/crowdin/ko.yml
#	modules/meeting/config/locales/crowdin/de.yml
2026-03-10 05:37:12 -03:00
Markus Kahl c131ef9737 rubocop 2026-03-09 16:11:33 +00:00
Markus Kahl 333c9c6b46 refactor wh service test 2026-03-09 16:05:59 +00:00
Ivan Kuchin e64368f339 move tests to the right describe block 2026-03-09 17:05:38 +01:00
Ivan Kuchin e2d302216e test custom comments in acts as customizable shared examples 2026-03-09 17:05:37 +01:00
Ivan Kuchin 1b73390da1 user parameters instead of lets for shared acts_as_customizable test parametrization 2026-03-09 17:05:36 +01:00
Ivan Kuchin 683f4b3c25 add test of admin_only_custom_fields_allowed? to shared acts as customizable examples 2026-03-09 17:05:35 +01:00
Ivan Kuchin bfae781b13 add test of can_have_custom_comments? to shared acts as customizable examples 2026-03-09 17:05:35 +01:00
Markus Kahl 47021aa605 fix webhook specs 2026-03-09 15:54:16 +00:00
Markus Kahl 7afb5f92ef fix test_mail_notification_spec 2026-03-05 12:15:36 +00:00
Jens Ulferts 4a6b995f23 Merge pull request #21998 from opf/fix/bump_carrierwave_to_2
bump carrierwave to 2.2.6
2026-02-26 15:43:57 +01:00
Judith Roth b2619e723d Merge pull request #21810 from opf/code-maintenance/70175-better-testing-setup-for-blocknote-hocuspocus
Code maintenance/70175 better testing setup for blocknote hocuspocus
2026-02-23 14:23:43 +01:00
Judith Roth 3b72cce9ce Adapt tests for new Hocuspocus repo location 2026-02-23 13:59:45 +01:00
Judith Roth 3c4e193f7c [#70175] Refactor to make it more reusable
So hopefully more specs will use it.

See https://community.openproject.org/wp/70175
2026-02-20 18:16:27 +01:00
ulferts 2bcccbf277 stabilize flickering spec by prevent failing on loading indicator safeguard
Attempts to fix:
* rspec ./modules/gantt/spec/features/timeline/timeline_dates_spec.rb:205
2026-02-19 16:24:16 +01:00
ulferts 1ac5e14827 bump carrierwave to 2.2.6 2026-02-16 17:54:02 +01:00
Ivan Kuchin 9b7df9aef3 add custom_field_class method for customized models 2026-02-05 14:15:13 +01:00
Klaus Zanders af691683fa Merge branch 'dev' into merge-release/17.0-20260127110839 2026-01-27 13:18:18 +01:00
Christophe Bliard 7c72f0c3a5 Fix slow tests when checking date visible in date picker
941096114c introduced `Components::Datepicker#displays_date?(date)` to
check if a date is visible in the date picker before doing some
assertions on it. Then 84bbf8d549 doubled down on it by calling it
inside each `#expect_non_working(date)`, `#expect_working(date)`,
`#expect_disabled(date)`, `#expect_not_disabled(date)` methods.

The problem is that `#displays_date?(date)` uses `has_css?` so it
returns immediately if the check is positive, but waits for 3 seconds
for the date to become visible if it's not yet. It's missing a `wait:
0`. And the css selector is wrong to: it searches for
`.flatpickr-day.flatpickr-disabled` instead of `.flatpickr-day`, so it
was returning false when the date was visible and enabled.

This commit fixes the problem by:
- Adding `wait: 0` to `has_css?`
- Changing the css selector to `.flatpickr-day`
- Add some `#expect_visible` calls to be sure the date picker is visible
  before doing assertions with `wait: 0`

And same for `#has_previous_month_toggle?`: it missed a `wait: 0` for
the same reasons.

This makes for instance the 2 specs in
`spec/features/work_packages/datepicker/datepicker_follows_relation_spec.rb:84`
run in 11 seconds instead of 1 minute 27 seconds.
2026-01-26 18:29:32 +01:00
Christophe Bliard d284ef733e Improve journal creation service and specs after review
- order methods in the same order as they are used
- suffix predicate methods with ?
- test that JOURNAL_CREATED notification is sent only once even if saved
  multiple times
- add one missed `shared_let` for faster test execution
2026-01-23 11:50:03 +01:00
ulferts 58a8b7e8eb avoid using cached last_journal 2026-01-14 15:41:00 +01:00
ulferts 41c3f1ca22 simplify data journal writing condition
This is made possible by no longer removing the data journal all the time. Because of that, the edge case of having no change becomes a normal case
2026-01-14 10:28:43 +01:00
Alexander Brandon Coles d86d25233a Fix AXE best practice violations: replace UL/LI
`ul` elements should not have the `rowgroup` role.

See https://dequeuniversity.com/rules/axe/4.11/aria-allowed-role?application=AxeChrome
2025-12-31 13:53:12 -03:00
Alexander Brandon Coles 4d84e0aa1b [#70190] Add A11y semantics for Border Box Table
Add WAI-ARIA roles and relevant attributes to ensure Border Box tables
have table-like semantics. This commit makes changes to the structure of
the rendered markup to comply with the strict structure needed for ARIA
tables.

This commit also fixes BEM usage and removes some useless overrides.

https://community.openproject.org/work_packages/70190
2025-12-31 13:53:12 -03:00
Alexander Brandon Coles f72b6e0b3b Add skeleton spec for Webhooks TableComponent
Adds shared examples for "generic tables", similar to Border Box Table
shared examples added in 54347731 but simplified.
2025-12-17 18:41:18 -03:00
Ivan Kuchin cf156d4ca4 make with_ee code allow using single symbol as well as array 2025-11-26 20:12:56 +01:00
Alexander Brandon Coles e309d8a7c6 Introduce new settings input methods
Introduces `text_area`, `check_box_group` and `select_list` inputs.
Makes various refactorings to ensure that handling of explicit `valus`
params is as robust as possible.
2025-11-25 18:47:40 -03:00
Dombi Attila 53b0c14191 Skip validating custom fields when creating a project from a template. 2025-11-19 20:14:10 +02:00
Alexander Brandon Coles 184f0429ba Remove jQuery from spec support files 2025-10-31 15:03:22 +00:00
Dombi Attila f90b2fee27 Validate changed custom fields when executing custom actions 2025-10-14 12:01:58 +02:00