David Rodríguez
4792040240
Cover tax category removal with a spec
2025-11-26 12:18:05 +01:00
David Rodríguez
4c6d894bc0
Bump RuboCop to 1.86.6
...
There were a few changes needed:
* Plugins are now specified through `plugin:` config keyword.
* All plugin gems need to be specified explicitly in Gemfile since they
are no longer dependencies of plugins already specified explicitly.
* All plugin gems need to be updated in other to use the new APIs.
* One cop was renamed.
* New offenses safe to correct were corrected directly with `bundle exec
rubocop -a`.
* New offenses unsafe to correct were added to the TODO configuration
with `bundle exec rubocop --auto-gen-config --auto-gen-only-exclude
--exclude-limit 1400 --no-auto-gen-timestamp`.
2025-10-27 11:30:33 +01:00
filipefurtad0
589315780c
Adds coverage to homepage alert HTML content
2025-09-04 19:07:29 +01:00
filipefurtad0
e3fff0869e
Adds test case on pagination for zones index page
2025-04-23 19:45:06 +01:00
piyush828-design
ed0b7f88a4
updated specs
2025-04-22 11:26:56 +05:30
piyush828-design
5849ae57de
Added tests for edit and delete
2025-04-16 12:11:52 +05:30
Filipe
32c4b4557b
Merge pull request #13086 from rioug/fix-tax-rate-refund
...
Remove tax rate refund code path
2025-01-30 21:54:30 -06:00
Gaetan Craig-Riou
cd7e92c6ca
Fix various spec
2025-01-27 11:02:41 +11:00
Gaetan Craig-Riou
d4a060c6a2
Fix Zone system spec
2025-01-27 11:01:07 +11:00
Maikel Linke
d49cea5e3d
Use admin flag instead of user role
2025-01-22 14:59:49 +11:00
wandji20
a85cfab506
Remove awesome nested set gem and dependencies [OFN-11636]
2024-08-12 18:47:16 +01:00
David Cook
a95aa1b3e9
Submit blank value if nothing selected
...
If a checkbox is not selected, the browser does not submit it at all.
2024-08-07 10:30:45 +10:00
David Cook
5d732d80a6
Add connected apps settings screen
...
I considered adding a request spec, but figured it still doesnt' test the form, so better to use a full system spec.
2024-08-06 11:26:03 +02:00
filipefurtad0
308c559810
Fixes case on assertions, on failing specs
...
Selects white_label tab with trigger(click)
Scrolling down did no fix it, it still fails https://github.com/openfoodfoundation/openfoodnetwork/actions/runs/6526149195/job/17719815533?pr=11645 , selecting the element with trigger(click) should work
Updates invoice tests
2024-07-01 12:09:14 +10:00
Maikel Linke
6317fe1b71
Disable RSpec monkey patching
2024-05-09 12:24:41 +10:00
David Cook
18c2b2512b
Safely autocorrect Style/RedundantLineContinuation
...
Inspecting 1530 files
.................................................................................................................................................................................C................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................C.......................................................................................................................
Offenses:
app/helpers/shop_helper.rb:48:43: C: [Corrected] Layout/TrailingWhitespace: Trailing whitespace detected.
no_open_order_cycles?(order_cycles) &&
^
app/helpers/shop_helper.rb:48:44: C: [Corrected] Style/RedundantLineContinuation: Redundant line continuation.
no_open_order_cycles?(order_cycles) && \ ...
^
spec/system/admin/configuration/content_spec.rb:35:64: C: [Corrected] Layout/TrailingWhitespace: Trailing whitespace detected.
expect(page).to have_selector :link, "markdown link", href:
^
spec/system/admin/configuration/content_spec.rb:35:65: C: [Corrected] Style/RedundantLineContinuation: Redundant line continuation.
expect(page).to have_selector :link, "markdown link", href: \ ...
^
1530 files inspected, 4 offenses detected, 4 offenses corrected
2024-01-10 09:29:37 +11:00
Maikel Linke
f6e9bfe15d
Further simplify Terms of Service spec
...
Since system specs are expensive, the standard workflow can be tested in
one "smoke test", as one scenario.
Run time reduced from 5.8s to 4.9s.
2023-11-29 12:21:38 +11:00
Maikel Linke
d3f2c72730
DRY Terms of Service spec to save time
...
The test conditions were already checked in the normal file upload.
Run time reduced from 7.2s to 5.8s.
2023-11-29 12:21:37 +11:00
Maikel Linke
6ce3572b24
Stabilise spec with sleep
...
I didn't look into what's going wrong here. A sleep is not ideal but
better than a retry.
That page needs a rewrite anyway and therefore I don't want to invest
more work now.
2023-11-13 14:21:10 +11:00
Neal Chambers
57d2f04330
Fix Style/HashSyntax
2023-09-29 08:51:48 +09:00
Mohamed ABDELLANI
f9e6f8bfa5
fix existing tests
2023-08-23 11:50:33 +01:00
Neal Chambers
728926cc9a
Fix Layout/LineLength
2023-07-19 08:39:26 +09:00
Maikel Linke
dae8703b02
Remove unused feature to intercept emails
...
This option came from Spree and we never used it. The config input field
is disabled in the admin interface and I checked our managed databases.
I don't think that we will want this feature in the future either.
Staging sends unmodified emails which is more realistic and we haven't
had a use case to intercept those emails. There's still the BCC option
if we need additional access.
2023-04-26 13:50:31 +10:00
Maikel Linke
5c6d9a092e
Simplify login spec helpers, avoid long lines
...
The `login_as_admin_and_visit` helper was used a lot but isn't really
shorter than:
login_as_admin
visit path_visit
Calling those methods separately reduces line length. It also removes
the potential impression that it may be more efficient to use the
helper. Now we have less indirection if one of the calls fails and see
the failing spec line straight away.
2023-04-17 11:08:32 +10:00
Maikel
ef841b161f
Merge pull request #10660 from MadisonBowron/master
...
Fix bug #10596 , missing translation for editing shipping category
2023-04-05 16:12:20 +10:00
Maikel Linke
8bbc545e39
Cover untranslated text by spec
2023-04-05 15:03:42 +10:00
emiliecm
5abda22831
Fix bug #10596 , missing translation for editing shipping category
2023-04-04 19:48:16 -04:00
Neal Chambers
940f806e5f
Fix Rubocop Layout/LineLength
2023-04-04 09:44:15 +09:00
Maikel Linke
4461b33491
Sort zones by name again
...
Zones were intended to be sorted by name. But I guess that the syntax of
Ransack changed one day and we didn't notice because the spec was
creating entries in the right order already (which often reflects the
query result order without parameters). So the spec is fixed to fail if
the sorting doesn't happen and Ransack is configured to sort correctly.
The previous sort value was ignored.
2023-03-27 16:36:04 +11:00
Maikel Linke
5ae9016f09
Speed up spec by skipping additional page load
...
The login_as_admin helper has to load a page to log in. Providing the
page we want to go to avoids going to the default page first.
2023-03-27 16:36:04 +11:00
Maikel Linke
67ab8f63e0
Remove superfluous test setup
...
There are no zones at the start of the test. This is probably a
left-over from old times when specs were not encapsulated in
transactions.
2023-03-27 16:36:04 +11:00
Maikel Linke
cb64361096
Remove old feature spec tag
...
Nowadays all system specs are run in a real browser.
2023-02-24 15:10:19 +11:00
filipefurtad0
d728424859
Asserts on page redirect, after Update click
2022-11-16 12:19:02 +00:00
Maikel Linke
122fe8253e
Avoid image load error and show errors in spec
...
I stumbled across some spec code which was hiding an unexpected error. So I
fixed it properly. This code is to be replaced soon anyway and this is a tiny
step in that direction.
2022-11-07 16:07:41 +11:00
filipefurtad0
7b33405530
Replaces translation with actual string
...
DRY: creates update_and_assert_message
2022-09-23 13:00:39 +01:00
filipefurtad0
6e3c0858c1
Adds decimal and thousands separator test
2022-09-23 12:47:18 +01:00
filipefurtad0
fb8d2827d2
Adds number localization preferences test
2022-09-23 12:03:18 +01:00
Jean-Baptiste Bellet
cf8bab97e8
Fix spec by not raising the error image not found
...
`GET http://localhost:3000/throbber.gif 404 (Not Found)`
In the meantime, open an issue to remove jquery.jstree from this page: 9677
2022-09-16 11:04:08 +02:00
Jean-Baptiste Bellet
ba2ad4a0c4
Since #9126 , replacing Paperclip with ActiveStorage, some methods changed
2022-09-16 10:51:04 +02:00
Lucas da Costa
35030bfd02
Fix button labels on terms of service
2022-07-19 22:53:30 -03:00
Matt-Yorkley
9afc002286
Refactor use of image files in specs
2021-12-27 17:45:06 +00:00
Matt-Yorkley
63f6567637
Use new image path when uploading files in specs
2021-12-27 17:45:06 +00:00
Luis Azcuaga
e8fd89a6d2
Run rubocop over existing todo
2021-10-25 21:28:28 -05:00
filipefurtad0
9ba4a79e85
Moves/Updates zones_spec into system
2021-10-15 10:19:00 +01:00
filipefurtad0
fcde3f8ee4
Moves/Updates terms_of_service_files_spec into system
2021-10-15 10:19:00 +01:00
filipefurtad0
e4be81f76f
Moves/Updates taxonomies_spec into system
2021-10-15 10:19:00 +01:00
filipefurtad0
65e93c7010
Moves/Updates tax_rates_spec into system
2021-10-15 10:19:00 +01:00
filipefurtad0
b5bcb71c0e
Moves/Updates tax_categories_spec into system
2021-10-15 10:19:00 +01:00
filipefurtad0
23e3ce2399
Moves/Updates states_spec into system
2021-10-15 10:19:00 +01:00
filipefurtad0
06cc30230b
Moves/Updates shipping_categories_spec into system
2021-10-15 10:19:00 +01:00