workarea-admin 3.4.26 → 3.4.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/workarea/admin/content_helper.rb +3 -2
- data/app/views/workarea/admin/navigation_menus/index.html.haml +1 -1
- data/app/views/workarea/admin/orders/attributes.html.haml +1 -0
- data/app/views/workarea/admin/shipping_services/edit.html.haml +4 -0
- data/app/views/workarea/admin/shipping_services/new.html.haml +4 -0
- data/config/locales/en.yml +1 -0
- data/test/helpers/workarea/admin/content_helper_test.rb +17 -0
- data/test/integration/workarea/admin/assets_integration_test.rb +3 -0
- data/test/integration/workarea/admin/shipping_service_integration_test.rb +3 -1
- data/test/system/workarea/admin/assets_system_test.rb +8 -0
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bb83fb982468b7096266c1fead527458334ed164aec727c6376c73348d92d66
|
4
|
+
data.tar.gz: 729571edf5310fcab460513795bc64b70ecae6b6b7ca791d9e85fa53687ece81
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f0947f2b9ec42924c63e23fbc1eedca69aba17b80700520177f025b2320b70e9606660c1d5c7f6314de5356f9650d4478bc88c45a655faaba467b75e3c10b91
|
7
|
+
data.tar.gz: 075dc9b989988f3dd34848a5bb1e6e2b95504ab0b446627a3193c0128efddfe54bacc25c4b85ee90c17544c6868bd592c453260f079dc5e4aba4561ec5c56f18
|
@@ -34,9 +34,10 @@ module Workarea
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def options_for_category(category_id)
|
37
|
-
|
37
|
+
model = Catalog::Category.where(id: category_id).first
|
38
|
+
|
39
|
+
return '' unless model.present?
|
38
40
|
|
39
|
-
model = Catalog::Category.find(category_id)
|
40
41
|
options_for_select({ model.name => model.id }, model.id)
|
41
42
|
end
|
42
43
|
|
@@ -112,6 +112,7 @@
|
|
112
112
|
%th
|
113
113
|
%span.data-pairs__name= t('workarea.admin.orders.attributes.totals.subtotal')
|
114
114
|
%td= number_to_currency @order.subtotal_price
|
115
|
+
= append_partials('admin.order_attributes_subtotal', order: @order)
|
115
116
|
%tr
|
116
117
|
%th
|
117
118
|
%span.data-pairs__name= t('workarea.admin.orders.attributes.totals.shipping')
|
@@ -25,6 +25,10 @@
|
|
25
25
|
= label_tag 'service_tax_code', t('workarea.admin.fields.tax_code'), class: 'property__name'
|
26
26
|
= text_field_tag 'service[tax_code]', @service.tax_code, class: 'text-box'
|
27
27
|
|
28
|
+
.property
|
29
|
+
= label_tag 'service_service_code', t('workarea.admin.fields.service_code'), class: 'property__name'
|
30
|
+
= text_field_tag 'service[service_code]', @service.service_code, class: 'text-box'
|
31
|
+
|
28
32
|
.property
|
29
33
|
= label_tag 'service_country', t('workarea.admin.fields.country'), class: 'property__name'
|
30
34
|
= select_tag "service[country]", options_for_select(country_options, @service.country.try(:alpha2)), prompt: t('workarea.admin.shipping_services.options.not_specified')
|
@@ -25,6 +25,10 @@
|
|
25
25
|
= label_tag 'service_tax_code', t('workarea.admin.fields.tax_code'), class: 'property__name'
|
26
26
|
= text_field_tag 'service[tax_code]', @service.tax_code, class: 'text-box'
|
27
27
|
|
28
|
+
.property
|
29
|
+
= label_tag 'service_service_code', t('workarea.admin.fields.service_code'), class: 'property__name'
|
30
|
+
= text_field_tag 'service[service_code]', @service.service_code, class: 'text-box'
|
31
|
+
|
28
32
|
.property
|
29
33
|
= label_tag 'service_country', t('workarea.admin.fields.country'), class: 'property__name'
|
30
34
|
= select_tag "service[country]", options_for_select(country_options, @service.country.try(:alpha2)), prompt: t('workarea.admin.shipping_services.options.not_specified')
|
data/config/locales/en.yml
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module Workarea
|
4
|
+
module Admin
|
5
|
+
class ContentHelperTest < ViewTest
|
6
|
+
def test_options_for_category
|
7
|
+
category = create_category
|
8
|
+
deleted_category = create_category.tap(&:destroy)
|
9
|
+
options = %(<option selected="selected" value="#{category.id}">#{category.name}</option>)
|
10
|
+
|
11
|
+
assert_equal('', options_for_category(nil))
|
12
|
+
assert_equal('', options_for_category(deleted_category.id))
|
13
|
+
assert_equal(options, options_for_category(category.id))
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -6,6 +6,9 @@ module Workarea
|
|
6
6
|
include Admin::IntegrationTest
|
7
7
|
|
8
8
|
def test_ensures_cors_policy_for_bulk_upload
|
9
|
+
Workarea.s3.expects(:get_bucket_cors).returns(
|
10
|
+
mock('Excon::Response', data: { body: { 'CORSConfiguration' => [] } })
|
11
|
+
)
|
9
12
|
Workarea.s3.expects(:put_bucket_cors).once
|
10
13
|
get admin.content_assets_path
|
11
14
|
assert(response.ok?)
|
@@ -9,7 +9,8 @@ module Workarea
|
|
9
9
|
shipping_service = {
|
10
10
|
name: 'Shipping Service',
|
11
11
|
tax_code: '001',
|
12
|
-
country: 'US'
|
12
|
+
country: 'US',
|
13
|
+
service_code: 'FED'
|
13
14
|
}
|
14
15
|
post admin.shipping_services_path,
|
15
16
|
params: { service: shipping_service, new_rates: [{ price: '7.00' }] }
|
@@ -20,6 +21,7 @@ module Workarea
|
|
20
21
|
assert_equal('Shipping Service', service.name)
|
21
22
|
assert_equal('001', service.tax_code)
|
22
23
|
assert_equal(Country['US'], service.country)
|
24
|
+
assert_equal('FED', service.service_code)
|
23
25
|
end
|
24
26
|
|
25
27
|
def test_update
|
@@ -5,7 +5,14 @@ module Workarea
|
|
5
5
|
class AssetsSystemTest < SystemTest
|
6
6
|
include Admin::IntegrationTest
|
7
7
|
|
8
|
+
def mock_get_bucket_cors
|
9
|
+
Workarea.s3.expects(:get_bucket_cors).returns(
|
10
|
+
mock('Excon::Response', data: { body: { 'CORSConfiguration' => [] } })
|
11
|
+
)
|
12
|
+
end
|
13
|
+
|
8
14
|
def test_management
|
15
|
+
mock_get_bucket_cors
|
9
16
|
visit admin.content_assets_path
|
10
17
|
click_link 'add_asset'
|
11
18
|
|
@@ -31,6 +38,7 @@ module Workarea
|
|
31
38
|
end
|
32
39
|
|
33
40
|
def test_insertion
|
41
|
+
mock_get_bucket_cors
|
34
42
|
asset = create_asset
|
35
43
|
|
36
44
|
content = create_content(
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: workarea-admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.4.
|
4
|
+
version: 3.4.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Crouse
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: workarea-core
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.4.
|
19
|
+
version: 3.4.27
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.4.
|
26
|
+
version: 3.4.27
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: workarea-storefront
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 3.4.
|
33
|
+
version: 3.4.27
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 3.4.
|
40
|
+
version: 3.4.27
|
41
41
|
description: Provides site administration functionality for the Workarea Commerce
|
42
42
|
Platform.
|
43
43
|
email:
|
@@ -1182,6 +1182,7 @@ files:
|
|
1182
1182
|
- test/dummy/script/rails
|
1183
1183
|
- test/dummy/tmp/screenshots/.keep
|
1184
1184
|
- test/helpers/workarea/admin/application_helper_test.rb
|
1185
|
+
- test/helpers/workarea/admin/content_helper_test.rb
|
1185
1186
|
- test/helpers/workarea/admin/icons_helper_test.rb
|
1186
1187
|
- test/helpers/workarea/admin/imports_helper_test.rb
|
1187
1188
|
- test/helpers/workarea/admin/insights_helper_test.rb
|
@@ -1398,7 +1399,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1398
1399
|
- !ruby/object:Gem::Version
|
1399
1400
|
version: '0'
|
1400
1401
|
requirements: []
|
1401
|
-
rubygems_version: 3.
|
1402
|
+
rubygems_version: 3.0.6
|
1402
1403
|
signing_key:
|
1403
1404
|
specification_version: 4
|
1404
1405
|
summary: Admin for the Workarea Commerce Platform
|