Maikel Linke
7b9577b547
Allow only enterprise managers to connect apps
...
Otherwise it doesn't work because non-managers, like super admins, are
not authorised to access enterprise data via the DFC API.
2024-05-23 13:44:47 +10:00
Maikel Linke
6317fe1b71
Disable RSpec monkey patching
2024-05-09 12:24:41 +10:00
Maikel Linke
bd6b0ddbf3
Enforce RSpec expect(..).not_to over to_not
2024-03-07 16:57:54 +11:00
David Cook
ea0967e22e
Safely autocorrect Capybara/NegationMatcher
2024-03-06 09:20:22 +11:00
Maikel Linke
a9b206f74e
Update Discover Regenerative description
2023-12-20 16:35:01 +11:00
Maikel Linke
67ffb5526e
Display loading status in action button
2023-12-20 16:35:00 +11:00
Maikel Linke
b33910d5b4
Disconnect Connected App as enterprise user
...
The app has to provide a webhook URL to be notified when the app is
disconnected. Once we have better token management, we would have a
unique token per app and could revoke it. But for now it's just a
request to disconnect the app.
2023-12-20 15:29:28 +11:00
Maikel Linke
1d7f96e965
Broadcast connected app to all user tabs
2023-12-15 12:34:40 +11:00
Maikel Linke
e1730f25d6
Show app connection state and update link
2023-12-15 12:34:40 +11:00
Maikel Linke
4eb273b06e
Create ConnectedApp with a reflex
...
I would have like to use a standard form to submit to the reflex but the
whole enterprise settings tab is in a form already and HTML doesn't
allow nested forms. While it does still work in browsers, it would have
added much more HTML to set up a form with a hidden input field instead
of just one additional data attribute.
The whole page is rendered by the controller again but the reflex root
attribute ensures that only parts of this tab are replaced. Otherwise
unsaved data on other tabs could be replaced and the page actually
becomes blank because AngularJS doesn't play well with the morph.
2023-12-15 11:50:04 +11:00
Maikel Linke
ca7b02d3ee
Add basic description of Discover Regen app
2023-12-15 11:50:04 +11:00
Maikel Linke
d4ce3965b1
Connected apps can be enabled per user or enterprise
2023-12-15 11:22:15 +11:00
Maikel Linke
af2b65256f
Add new enterprise settings tab Connected Apps
2023-12-15 11:22:15 +11:00
Neal Chambers
94f1b89a9f
Safely autocorrect Rails/RootPublicPath
...
Inspecting 1484 files
.............................................................................................C........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................C.........................................................................................C..........C..........................................................................................................................................................................................................................................................................................................C....................................................................................................................................................................C...................C.............................................................C.C.......C....................
Offenses:
app/controllers/concerns/request_timeouts.rb:19:22: C: [Corrected] Rails/RootPublicPath: Use Rails.public_path.
file: Rails.root.join("public/500.html"),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/spree/core/controller_helpers/common.rb:45:30: C: [Corrected] Rails/RootPublicPath: Use Rails.public_path.
file: Rails.root.join("public/404.html"),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/controllers/api/v0/product_images_controller_spec.rb:13:22: C: [Corrected] Rails/RootPublicPath: Use Rails.public_path.
let(:pdf_path) { Rails.root.join("public/Terms-of-service.pdf") }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/controllers/api/v0/terms_and_conditions_controller_spec.rb:15:31: C: [Corrected] Rails/RootPublicPath: Use Rails.public_path.
let(:terms_file_path) { Rails.root.join("public/Terms-of-service.pdf") }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/models/terms_of_service_file_spec.rb:6:25: C: [Corrected] Rails/RootPublicPath: Use Rails.public_path.
let(:pdf) { File.open(Rails.root.join("public/Terms-of-service.pdf")) }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/admin/bulk_product_update_spec.rb:907:37: C: [Corrected] Rails/RootPublicPath: Use Rails.public_path.
attach_file 'image-upload', Rails.root.join("public/500.jpg"), visible: false
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/admin/enterprises/terms_and_conditions_spec.rb:27:30: C: [Corrected] Rails/RootPublicPath: Use Rails.public_path.
let(:original_terms) { Rails.root.join("public/Terms-of-service.pdf") }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/admin/enterprises/terms_and_conditions_spec.rb:28:29: C: [Corrected] Rails/RootPublicPath: Use Rails.public_path.
let(:updated_terms) { Rails.root.join("public/Terms-of-ServiceUK.pdf") }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/consumer/shopping/checkout_spec.rb:94:9: C: [Corrected] Rails/RootPublicPath: Use Rails.public_path.
Rails.root.join("public/Terms-of-service.pdf"),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/consumer/shopping/embedded_groups_spec.rb:18:9: C: [Corrected] Rails/RootPublicPath: Use Rails.public_path.
Rails.root.join("public/embedded-group-preview.html")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/consumer/shopping/embedded_groups_spec.rb:26:9: C: [Corrected] Rails/RootPublicPath: Use Rails.public_path.
Rails.root.join("public/embedded-group-preview.html")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/consumer/split_checkout_spec.rb:986:35: C: [Corrected] Rails/RootPublicPath: Use Rails.public_path.
let(:system_terms_path) { Rails.root.join("public/Terms-of-service.pdf") }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/system/consumer/split_checkout_spec.rb:987:33: C: [Corrected] Rails/RootPublicPath: Use Rails.public_path.
let(:shop_terms_path) { Rails.root.join("public/Terms-of-ServiceUK.pdf") }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1484 files inspected, 13 offenses detected, 13 offenses corrected
2023-08-14 17:29:11 +09:00
Neal Chambers
728926cc9a
Fix Layout/LineLength
2023-07-19 08:39:26 +09: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
Neal Chambers
940f806e5f
Fix Rubocop Layout/LineLength
2023-04-04 09:44:15 +09:00
Rachel Arnould
75c3bf8b56
Merge pull request #9630 from binarygit/remove-angular-from-business-details
...
Remove angular from business details
2023-03-21 18:31:40 +01:00
binarygit
8f6fdf3e31
[Admin, Enterprise Settings] Remove Angular from Business Details tab
2023-03-08 10:26:05 +01:00
Maikel Linke
10aa7730e5
Rename user var again for clarity
2023-02-28 12:50:55 +11:00
Maikel Linke
116e844004
Stabilise flaky spec with defined enterprise order
2023-02-28 12:42:55 +11:00
Maikel Linke
16289a62f1
Rename test vars for clarity
2023-02-28 12:42:55 +11:00
Maikel Linke
e9fa360d61
Take test setup as granted and simplify
2023-02-28 12:42:55 +11:00
Maikel Linke
e6eb9412d9
Simplify owner selection in spec
...
Instead of knowing the input id generated by select2, we now rely on the
fact that the owner is in the fifth column. Both could change but this
is less code.
2023-02-28 12:42:55 +11:00
Maikel Linke
401210ef44
DRY and clarify test case
2023-02-28 12:42:55 +11:00
Maikel Linke
f484518ee5
Remove unused test enterprise
2023-02-28 12:42:55 +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
Jean-Baptiste Bellet
edb2645af1
Add a country to test db and modify one spec
...
Check that businness address changes are ok
Test with another county since only one country and one state couldn't spot the fact that when changing country it needs to change also states selector
2022-10-26 11:21:44 +02:00
filipefurtad0
538844a1fb
Removes _visible: true_ from system specs
2022-09-27 17:32:25 +01:00
Jean-Baptiste Bellet
4a8dc37b40
Since #9087 , we don't use a boolean but an enum, 'public' or 'hidden'
2022-09-16 10:02:27 +02:00
Jean-Baptiste Bellet
3942c4d808
Fix failing spec: since #9606 we use tom-select
2022-09-16 09:32:34 +02:00
Maikel Linke
4a0ed99919
Replace Paperclip on Enterprise model
...
We configured Paperclip to convert images to JPG in some cases but I
omitted that here because we don't need it. If an image is better
represented as PNG or another format then the user should be able to
choose that.
Some specs were also testing the generated URL but the Active Storage
URL doesn't contain a style name anymore and it's not helpful to test
the URL.
2022-06-01 17:16:55 +10: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
c7eed5ae57
Adds the system helper to business_address
2021-10-19 15:44:26 +01:00
filipefurtad0
33f374d177
Defines strings for warning accepting with let
2021-10-19 15:38:07 +01:00
filipefurtad0
6639ce416a
Squashes terms_and_conditions_spec edits
...
Moves terms_and_conditions_spec into system
Updates terms_and_conditions_spec into system
2021-10-19 15:34:26 +01:00
filipefurtad0
9ab335302e
Moves/updates index_spec into system
2021-10-19 15:34:26 +01:00
filipefurtad0
f62749e3bf
Wraps alert text in images_spec
2021-10-19 15:34:26 +01:00
filipefurtad0
9579783543
Moves/updates images_spec into system
2021-10-19 15:34:26 +01:00
filipefurtad0
1ed5f2c248
Moves/updates business_address_form_spec into system
2021-10-19 15:34:26 +01:00