Gaetan Craig-Riou
07a3e83dc6
Fix enterprise specs
...
Plus small refactor
2025-11-03 14:25:48 +11:00
Gaetan Craig-Riou
38f58b168a
Fix tag rules spec
...
Make sure the autocomplete dropdown list is hidden by default
2025-11-03 14:25:48 +11:00
Gaetan Craig-Riou
34abca5ff1
Add missing js unit test got TagListInput component
2025-11-03 14:25:48 +11:00
Gaetan Craig-Riou
145764a921
Add testing library
...
See :https://testing-library.com/docs/
It allows us to query DOM node in way that's similar to how a user would
interect with element on the page. It's particularly usefull for
elements that trigger AJAX request.
2025-11-03 14:25:40 +11:00
Gaetan Craig-Riou
9bbe573335
Fix test to match the improved controller
2025-11-03 14:25:05 +11:00
Gaetan Craig-Riou
c5d5694f24
Tweaked jest configuration
...
- include app/components in the directories to search for modules, ie we
can require view component js controller like this :
`import tag_list_input_controller from "tag_list_input_component/tag_list_input_controller";`
- fixed the regexp to skip transformation so it skips any modules
starting by "stimulus"
2025-11-03 14:25:05 +11:00
Gaetan Craig-Riou
ab194a0e80
Add styling for the dropdown
...
It's mostly the same styling as the AngularJs version but with updated
colors
2025-11-03 14:25:05 +11:00
Gaetan Craig-Riou
749944fc25
Rework TagListInputComponent to integrate autocomplete
...
The component now will try to load a list of existing tag if you give an
`autocomplete_url`. I tried to keep the tag input and the autocomplete
functionality decoupled but is wasn't really possible. Instead I opted
to sub class the Autocomplete stimulus controller, but it only gets
initialised if we pass an `autocomplete_url`.
2025-11-03 14:25:05 +11:00
Gaetan Craig-Riou
3cffc5538a
Add tag filtering for tag autocomplete
2025-11-03 14:25:05 +11:00
Gaetan Craig-Riou
6d7908e1f8
Style formatting
2025-11-03 14:25:05 +11:00
Gaetan Craig-Riou
965b34318f
Add new component to provide tag autocomplete for variant tag
...
It uses composition and inject the TagListInputComponent as a depency,
which should be more flexible that creating a sub class. This new
component could potentially be made more generic if needed
2025-11-03 14:25:05 +11:00
Gaetan Craig-Riou
3bb9eb9765
Add endpoint to provide autocomplete tag for variant
...
It return a list of available tags and number of related rules, based on
the given enterprise and a partial match on the given tag
2025-11-03 14:25:05 +11:00
Gaetan Craig-Riou
bd39595917
Add ability to pass option to the tag input field
...
And also render any content given to the component via block
2025-11-03 14:25:05 +11:00
Gaetan Craig-Riou
81e16a9cdf
Add stimulus-autocomplete package
...
https://github.com/afcapel/stimulus-autocomplete/tree/main
2025-11-03 14:25:05 +11:00
Gaetan Craig-Riou
c38c8bcff2
Pass the variant_tag_enbabled options to relevant services
...
Plus add integration testing for variant tag rule filtering.
2025-11-03 14:25:05 +11:00
Gaetan Craig-Riou
7633af8ff2
Call VariantTagRulesFilterer when variant_tag feature is enabled
...
We only support either inventory or variant_tag feature, with the later
taking precedence if both are turned on.
2025-11-03 14:25:05 +11:00
Gaetan Craig-Riou
94c0ebd897
Fix error in the muliple tag rules spec
2025-11-03 14:25:05 +11:00
Gaetan Craig-Riou
7b3db4bae4
Add VariantTagRuleFilterer to filter variants by tag rule
2025-11-03 14:25:05 +11:00
Gaetan Craig-Riou
b1d95cac7f
Display filter by variant tag rule
...
We only support one of filter by inventory variants or filter by variants
at any given time, based on enabled feature. If both features inventory
and variant tag are enabled, variant tag takes precedence.
2025-11-03 14:25:05 +11:00
Gaetan Craig-Riou
3f297a8afa
Add tag rule to filter by variant
2025-11-03 14:25:05 +11:00
Gaetan Craig-Riou
af111a9625
Clean up tag rules specs
...
Remove unnecessary use mocking and use of `__send__`
2025-11-03 14:25:05 +11:00
Gaetan Craig-Riou
96f715b62b
Merge pull request #13661 from deivid-rodriguez/ruby-3.2
...
Bump Ruby from 3.1.7 to 3.2.9
2025-11-03 13:29:40 +11:00
Maikel
33b4e38fc5
Merge pull request #13664 from openfoodfoundation/dependabot/npm_and_yarn/jasmine-core-5.12.1
...
Bump jasmine-core from 5.12.0 to 5.12.1
2025-11-03 13:11:49 +11:00
Maikel
27e4ae9892
Merge pull request #13639 from deivid-rodriguez/verify-latest-reviewdog
...
Upgrade to latest reviewdog
2025-11-03 12:28:01 +11:00
Gaetan Craig-Riou
f434d8b066
Merge pull request #13658 from openfoodfoundation/dependabot/bundler/paranoia-2.6.4
...
Bump paranoia from 2.6.3 to 2.6.4
2025-11-03 12:05:44 +11:00
Gaetan Craig-Riou
43d471f93d
Merge pull request #13657 from openfoodfoundation/dependabot/npm_and_yarn/hotwired/turbo-8.0.20
...
Bump @hotwired/turbo from 8.0.13 to 8.0.20
2025-11-03 12:03:58 +11:00
David Rodríguez
0c392d5302
Drop version constraints for pg and pry entirely, so their versions can be fully managed by Dependabot
...
Co-authored-by: Maikel <maikel@email.org.au >
2025-10-31 09:18:12 +01:00
David Rodríguez
e71a2603bd
Bump pry to a version that plays nice with Ruby 3.2
...
Otherwise you get the following error when starting RSpec:
```
(...)
An error occurred while loading base_spec_helper.
Failure/Error: require 'pry' unless ENV['CI']
NameError:
undefined method `=~' for class `Pry::Code'
# ./spec/base_spec_helper.rb:10:in `<top (required)>'
No examples found.
(...)
```
2025-10-31 09:18:11 +01:00
David Rodríguez
5aea527962
Use Bundler version that comes with Ruby 3.2.9 by default
2025-10-31 09:18:11 +01:00
David Rodríguez
05b3e97a0e
Bump Ruby from 3.1.7 to 3.2.9
...
Release announcements:
* https://www.ruby-lang.org/en/news/2025/07/24/ruby-3-2-9-released/
* https://www.ruby-lang.org/en/news/2025/03/26/ruby-3-2-8-released/
* https://www.ruby-lang.org/en/news/2025/02/04/ruby-3-2-7-released/
* https://www.ruby-lang.org/en/news/2024/10/30/ruby-3-2-6-released/
* https://www.ruby-lang.org/en/news/2024/07/26/ruby-3-2-5-released/
* https://www.ruby-lang.org/en/news/2024/04/23/ruby-3-2-4-released/
* https://www.ruby-lang.org/en/news/2024/01/18/ruby-3-2-3-released/
* https://www.ruby-lang.org/en/news/2023/03/30/ruby-3-2-2-released/
* https://www.ruby-lang.org/en/news/2023/02/08/ruby-3-2-1-released/
* https://www.ruby-lang.org/en/news/2022/12/25/ruby-3-2-0-released/
Also autocorrect new offenses.
2025-10-31 09:18:11 +01:00
Maikel Linke
f9b76fadbd
Update all locales with the latest Transifex translations
v5.3.4
2025-10-31 16:05:11 +11:00
Maikel
64f44b8a9b
Merge pull request #13571 from pacodelaluna/update_sum_calcultation
...
Update sum calculation in order_cycle_customer_totals spec
2025-10-31 16:03:11 +11:00
Maikel Linke
5dfb7645cb
Avoid enabling rubocop rule listed in todo file
2025-10-31 15:39:58 +11:00
Maikel Linke
74927dd03d
Regenerate Rubocop todo file
2025-10-31 15:30:17 +11:00
François Turbelin
71dd398131
Apply cosmetics and fix specs
2025-10-31 15:20:44 +11:00
François Turbelin
245f0caedb
Adjust sum for remaining reports
2025-10-31 15:20:44 +11:00
François Turbelin
18bc95c6a3
Update sum calculation in order_cycle_customer_totals spec
2025-10-31 15:20:44 +11:00
dependabot[bot]
7213dcf124
Bump jasmine-core from 5.12.0 to 5.12.1
...
Bumps [jasmine-core](https://github.com/jasmine/jasmine ) from 5.12.0 to 5.12.1.
- [Release notes](https://github.com/jasmine/jasmine/releases )
- [Changelog](https://github.com/jasmine/jasmine/blob/main/RELEASE.md )
- [Commits](https://github.com/jasmine/jasmine/compare/v5.12.0...v5.12.1 )
---
updated-dependencies:
- dependency-name: jasmine-core
dependency-version: 5.12.1
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-10-30 09:02:08 +00:00
David Rodríguez
e90569bdcc
Adjust error format to latest prettier output
...
To avoid generating an unnecessary annotation.
2025-10-29 11:55:11 +01:00
David Rodríguez
404e27ab71
Run reviewdog directly
...
So that we can control the version we run without depending on external
actions, and so that we use a consistent version for all linters.
At the same time, unify to running the latest version of reviewdog,
0.21.0, which also involves changing the deprecated `fail_on_error` flag
previously used by prettier action to `fail_level`.
2025-10-29 11:55:10 +01:00
David Rodríguez
5af6d534df
Use "nofilter" for prettier
...
Now that we fixed all prettier issues.
2025-10-29 11:55:03 +01:00
David Rodríguez
65410aabad
Speed up rubocop reviewdog by skipping install
...
Since we already run `bundle install` at the beginning of the job.
2025-10-29 11:55:03 +01:00
David Rodríguez
2e78ea62b6
Change linters workflow label to reviewdog
2025-10-29 11:55:03 +01:00
David Rodríguez
201461918d
Fix prettier offense
...
I accidentally introduced this, not sure how, when correcting all
prettier issues.
2025-10-29 11:55:03 +01:00
dependabot[bot]
3efe0c7835
Bump paranoia from 2.6.3 to 2.6.4
...
Bumps [paranoia](https://github.com/rubysherpas/paranoia ) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/rubysherpas/paranoia/releases )
- [Changelog](https://github.com/rubysherpas/paranoia/blob/core/CHANGELOG.md )
- [Commits](https://github.com/rubysherpas/paranoia/compare/v2.6.3...v2.6.4 )
---
updated-dependencies:
- dependency-name: paranoia
dependency-version: 2.6.4
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-10-29 09:02:20 +00:00
dependabot[bot]
e3d453e397
Bump @hotwired/turbo from 8.0.13 to 8.0.20
...
Bumps [@hotwired/turbo](https://github.com/hotwired/turbo ) from 8.0.13 to 8.0.20.
- [Release notes](https://github.com/hotwired/turbo/releases )
- [Commits](https://github.com/hotwired/turbo/compare/8.0.13...v8.0.20 )
---
updated-dependencies:
- dependency-name: "@hotwired/turbo"
dependency-version: 8.0.20
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-10-29 09:01:59 +00:00
Maikel
0ecfc23c67
Merge pull request #13644 from deivid-rodriguez/more-rspec-fixes
...
Fix Rspec warnings and the broken Stripe intent API specs that fixing them revealed
2025-10-29 15:04:22 +11:00
Maikel
ff16b575c4
Merge pull request #13653 from deivid-rodriguez/bump-rubocop
...
Bump rubocop to 1.86.6
2025-10-29 12:00:31 +11:00
Maikel
faa826a76e
Merge pull request #13647 from deivid-rodriguez/remove-obsoleted-gem
...
Remove obsolete gem
2025-10-29 11:44:59 +11:00
Maikel
1e02084f95
Merge pull request #13646 from deivid-rodriguez/bump-ruby
...
Bump Ruby from 3.1.4 to 3.1.7
2025-10-29 11:43:04 +11:00