31 Commits

Author SHA1 Message Date
Behrokh Satarnejad 74183943d5 Use test selectors instead of text selector 2026-06-01 18:58:47 +02:00
Behrokh Satarnejad d924c255cf [69524] Primerize Types form configuration page (#22854)
* Create the section component

* Create the form configuration component

* Create a controller

* change form template

* Use primer dialog for reset to defaults button

* show WP configuration modal while creating a related WPs table

* Fix the drag and drop functionality without save button

* Fix renaming functionality

* Use generic drag and drop in form configuration and move all client side action handling to server side

* Fix embedded query form configuration regressions

* Add data test selectors to all elements that we used for test

* update the current tests with the new implementations and design

* Add new tests for new controller of sections and rows

* WP quesry row should only have edit quesry action

* Update transformer spec regarding the new changes

* Fix the failing test in reset form configuration and some tests for actions

* Fix rubocop errors

* Fix eslint errors

* Add spec for removing a section

* Use condensed border boxes

* fix failing specs

* fix failing specs

* Switch the buttons in form configuration component

* Create the section at the top of the list

* Instead of using UUID, use the name of the group as the key

* Add missing check for EE for section actions

* Remove angular components

* Use action list instead of a border box for left side panel

* Reduce the margin between the right side panel and sub header, add some space to the query table left side, span to the whole available space

* Show validation errors while updating and creating a section

* Use a danger dialog for reset to default

* Add a confirmation for removing the section

* Align items in the row

* Use test_selector instead of data-test-selector

* Create move_action in rb file

* Create move_action in rb file

* Simplify section component

* Simplify form configuration component

* Remove dialog for rename and delete section on missing EE

* Create a component for inactive attribute list

* Create a separate component for reset dialog

* Remove EE feedback dialog

* Remove form partial which is not needed anymore

* Remove unused js strings

* Update using update_via_turbo

* Remove form configuration rows controller

* Create a blanksalte component

* Fix failing specs

* Fix failing specs

* Fix failing specs

* Remove unused translation strings

* Align form configuration section routes with actual create flow

* Change section to group

* Change section to group in services and controllers

* Change section to group in en.yml

* Fix rubocop errors

* Move the query group persistence assertion from the JS feature spec
to the synchronous form configuration groups controller spec.

* Reuse query service result in embedded query build

* Keep inactive attribute filter after turbo list refresh

* Extract form configuration group edit state into form model

* Fix the failing test

* Potential fix for pull request finding 'CodeQL / Potentially uninitialized local variable'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Rename inactive attribute component inputs

* Refine reset dialog wording for form configuration

* Use direct Turbo action for adding attribute groups

* Reuse generic filter-list controller for inactive attributes

* Remove focus impelementation in ts

* Group form configuration Stimulus controllers under one namespace

* Use turbo request service in form configuration controller

* Clarify legacy group key normalization in form config contract

* Replace inactive attribute list wrapper via turbo stream

* Extract duplicate untitled group key generation into Type::FormGroup.next_untitled_key

* Auto-generate untitled group name on create instead of returning an error

* Avoid mixed return types in form config group create service

* Extract shared form configuration group service behavior into concern

* Fix spacing for the last group and italic font for the placeholder rows

* Replace Angular no-results component with Primer Banner on form configuration page

* Hide dropped element immediately to prevent flickering before Turbo Stream response

* Reload type before rendering create error to prevent duplicate groups

* Await service initialization before use to prevent potential race condition

* Replace sleep calls with deterministic waits in form configuration spec

* Handle malformed JSON and invalid query errors gracefully in form configuration update

* Make query group label a clickable button and empty group hint italic

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-05-13 12:56:18 +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
as-op a283534b00 Merge branch 'release/15.5' into merge-15.5-into-dev
# Conflicts:
#	config/locales/crowdin/ru.yml
#	modules/boards/config/locales/crowdin/cs.yml
#	modules/reporting/app/workers/cost_query/pdf/timesheet_generator.rb
#	modules/storages/config/locales/crowdin/it.yml
2025-04-24 10:33:22 +02:00
Christophe Bliard 424d873e73 Fix flaky specs
Failing spec is ./spec/features/types/form_configuration_query_spec.rb:174
on job run https://github.com/opf/openproject/actions/runs/14513528848/job/40717420434

The spec seems flaky because the form configuration modal is opened
while the page is reloaded, which closes the modal and then the elements
inside the modal cannot be clicked anymore.

This is fixed by calling `expect_and_dismiss_flash` instead of
`expect_flash` in the specs so that it waits for the save to complete.
If not dismissed, it does not wait the second time, which is the case in
the flaky spec.

I also changed `add_query_group` to yield the modal to the caller so
that the caller can interact with the modal before saving it. It's
better than creating it, closing it, then reopeining it again with
`edit_query_group` to make modifications. I thought it was the culprit
for the flakiness but actually no. But the code read better so I kept
it.
2025-04-22 13:12:33 +02:00
Dombi Attila 7a62dc212f Wait for reload before opening the work package column settings 2025-04-09 16:26:15 +03:00
Dombi Attila f40b37c98a Wait for the type configuration form to appear 2025-04-08 23:39:21 +03: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
Aaron Contreras c8a35f7e88 Switch types/form_configuration_query_spec to cuprite 2023-06-29 12:36:33 -05: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 21a696ef9b Update copyright information for 2023 2022-12-30 15:51:26 +01:00
Christophe Bliard e3f4a6b582 Include Capybara::RSpecMatchers where DSL is included
This is needed to make these two statements equivalent:

    expect(page).not_to have_xpath('a')
    expect(page).to have_no_xpath('a')

So that the both matchers return early on element absence, instead of
timing out.

This is the continuation of e85b47979a.
2022-11-14 11:52:52 +01:00
Christophe Bliard bc8d423ec2 update copyright information for 2022 2022-03-01 17:05:59 +01:00
ulferts 37a49106fe explicit kwargs in spec helpers 2021-12-08 13:24:48 +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 46599dd90e [37274] Remove accessibleClick (#9355)
* Remove accessibleClick from wp-single-card

* Remove accessibleClick directive itself

* Fix context menu with button

* Add common mixin for unset-button-styles

* relations button

* Editable query and toolbar

* Resizer button

* Replace wp-create button

* Replace relation description value

* Replace type form

* Replace pagination links

* Replace button styles for attachment dropzone

* Replace accessibleClick in tile-view

* Replace inline create

* Replace display container with button

* Replace text in notification on boards error

* Replace global search component

* Fix pagination spec

* Fix specs

* Fix triggering display field on enter

* Make search toggle a button

* Review feedback
2021-06-14 11:39:04 +02:00
ulferts 1bdd2ab9ae safe automatic fixes by rubocop (#8994) 2021-02-11 16:02:18 +01: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
Oliver Günther aba8996262 [33592] Add an empty group to ensure the user can remove all groups
https://community.openproject.com/wp/33592
2020-07-16 14:25:33 +02:00
Wieland Lindenthal f3c08797da WIP 2020-02-12 16:09:54 +01:00
Henriette Dinger bd7f4e4814 Update copyright notice 2020-01-15 11:31:26 +01:00
Oliver Günther 73441bfea0 Continued conversion of type form 2019-07-01 11:35:04 +02:00
Wieland Lindenthal fd88776ceb Add relations tables to Types via form configuration (#6773)
* WIP: PrecedesFilter and FollowsFilter for WorkPackages

* Create Type Form Groups per Query Type

* generalize filters on relations avoiding alias

* fix flickering spec

* Rename dependency represeners for Follower and Predecessor Filters

* Allow configuring templated queries within query configuring modal

* Use `{id}` as templated value, instead of a now deprecated `templated` string

* Rewrite ParentFilter to follow same structure as other relation filters.

* Set Follower and Predecessor filters as hidden in Frontend

* Default query shall show closed WPs, too

* Remove relation filter type selection from form configuration view as we extend query configuration modal instead.

* Allow ExternalQueryConfiguration to be more specific and prepend relation filters in its modal.

* Quick unrelated fix on the way: the instruction text should start below the columns input and not to the right of it

* - Add all missing relation filters.
- Use verbs for naming instead of nouns to stay consistent with UI.

* fix typo

* Add relation filters to hidden filters and fix a rebase bug

* Typo in docs

* Fix broken rebase conflict resolution

* Add part of and includes filter

* adding specs for relation filters

* rename RelatesFilter to RelatesToFilter

* Rename shared example as direction does not matter anymore.

* Fix spec for IncludesFilter

* Fix name conflict for `includes` by calling typed_dag's `direct` later.

* Fix shared filter examples as the parent filter does not get added per default anymore.

* Fix spec after renaming PredecessorFilter to PrecedesFilter

* Fix integration spec for type configuration form

* Add filter dependency specs

* Differentiate between WorkPackageFormChildrenQueryGroup and WorkPackageRelationQueryGroup types

* Create inline-create for relation tables

* Rewrite filters to use actual relation_type as key

* Reload relations on change, change symbols

* Fix relation filter i18n strings

* Test presence of all relation filters frontend.

* Extend integration test for form configuration to not only cover hierarchy, but also undirectional and directional relation types.

* Consistent naming of filter dependency representer files

* Satisfy codeclimate

* Add missing copyright notes

* Fixing PartofFilter and its specs

* Reverse relation direction when created inline

* WIP integration test for Relation Query Component and Children Query Component.

* Correctly reload children tables when refreshed

* Fix FilterOnUndirectedMixin

* Fix removing of relation from embedded table after reload

* Adding intergration tests for removing and adding relation or children, initiated form either embedded table or relations tab.

* Fix specs

* Fix implementation of duplicates and duplicated

They are reversed in typed_dag and causes confusion

[ci skip]
2018-11-30 15:45:54 +01:00
Oliver Günther 8bdb8ad172 Add spec for query configuration of subelements 2018-04-24 09:50:36 +02:00
Oliver Günther 565d580106 Extract type configuration helpers into separate spec component 2018-04-24 09:14:51 +02:00