workarea-storefront 3.5.18 → 3.5.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 382263f142e8d740670a648ee3ff0dc1415db08b1d83070382dc4c0a9f5c5e8a
|
4
|
+
data.tar.gz: ed333f436725628dbb5351e1d6631bff827f82abe99b7968f818efede52de25e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 350b56a9149667cb86cd86d95da212db046ffbc5ff5f2d297166ed800bf264ac67bb7c2bc13980ff3c199bafb6e96df5399fd0c1aadbecb897a0a6a5d7c4eaac
|
7
|
+
data.tar.gz: 9432975999f6894f56fa83a7708a886e9a631da5c4dae66a093e94a568c7b0d50afe5257bda55eff2ddbd8a82259fef14d2f90b8b1e6ebe9ae1810388f530df0
|
@@ -123,6 +123,84 @@ module Workarea
|
|
123
123
|
|
124
124
|
assert(response.ok?)
|
125
125
|
end
|
126
|
+
|
127
|
+
def test_metrics_tracking
|
128
|
+
super_admin = create_user(password: 'W3bl1nc!', super_admin: true)
|
129
|
+
customer = create_user(email: 'bcrouse@workarea.com', password: 'W3bl1nc!')
|
130
|
+
product = create_product
|
131
|
+
create_shipping_service(
|
132
|
+
name: 'Ground',
|
133
|
+
tax_code: '001',
|
134
|
+
rates: [{ price: 7.to_m }]
|
135
|
+
)
|
136
|
+
|
137
|
+
post storefront.login_path,
|
138
|
+
params: { email: super_admin.email, password: 'W3bl1nc!' }
|
139
|
+
|
140
|
+
admin_current_email_cookie = cookies[:email]
|
141
|
+
|
142
|
+
post admin.impersonations_path,
|
143
|
+
params: { user_id: customer.id }
|
144
|
+
|
145
|
+
refute_equal(admin_current_email_cookie, cookies[:email])
|
146
|
+
customer_current_email_cookie = cookies[:email]
|
147
|
+
|
148
|
+
post storefront.cart_items_path,
|
149
|
+
params: {
|
150
|
+
product_id: product.id,
|
151
|
+
sku: product.skus.first,
|
152
|
+
quantity: 2
|
153
|
+
}
|
154
|
+
|
155
|
+
patch storefront.checkout_addresses_path,
|
156
|
+
params: {
|
157
|
+
billing_address: {
|
158
|
+
first_name: 'Ben',
|
159
|
+
last_name: 'Crouse',
|
160
|
+
street: '12 N. 3rd St.',
|
161
|
+
city: 'Philadelphia',
|
162
|
+
region: 'PA',
|
163
|
+
postal_code: '19106',
|
164
|
+
country: 'US',
|
165
|
+
phone_number: '2159251800'
|
166
|
+
},
|
167
|
+
shipping_address: {
|
168
|
+
first_name: 'Ben',
|
169
|
+
last_name: 'Crouse',
|
170
|
+
street: '22 S. 3rd St.',
|
171
|
+
city: 'Philadelphia',
|
172
|
+
region: 'PA',
|
173
|
+
postal_code: '19106',
|
174
|
+
country: 'US',
|
175
|
+
phone_number: '2159251800'
|
176
|
+
}
|
177
|
+
}
|
178
|
+
|
179
|
+
assert_equal(customer_current_email_cookie, cookies[:email])
|
180
|
+
|
181
|
+
patch storefront.checkout_place_order_path,
|
182
|
+
params: {
|
183
|
+
payment: 'new_card',
|
184
|
+
credit_card: {
|
185
|
+
number: '1',
|
186
|
+
month: 1,
|
187
|
+
year: next_year,
|
188
|
+
cvv: '999'
|
189
|
+
}
|
190
|
+
}
|
191
|
+
|
192
|
+
assert_equal(customer_current_email_cookie, cookies[:email])
|
193
|
+
delete admin.impersonations_path
|
194
|
+
assert_equal(admin_current_email_cookie, cookies[:email])
|
195
|
+
|
196
|
+
super_admin_metrics = Metrics::User.find(super_admin.email)
|
197
|
+
assert_equal(0, super_admin_metrics.orders)
|
198
|
+
assert_equal(0, super_admin_metrics.revenue)
|
199
|
+
|
200
|
+
customer_metrics = Metrics::User.find(customer.email)
|
201
|
+
assert_equal(1, customer_metrics.orders)
|
202
|
+
assert(customer_metrics.revenue.positive?)
|
203
|
+
end
|
126
204
|
end
|
127
205
|
end
|
128
206
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: workarea-storefront
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.19
|
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-09-
|
11
|
+
date: 2020-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: workarea-core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.5.
|
19
|
+
version: 3.5.19
|
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.5.
|
26
|
+
version: 3.5.19
|
27
27
|
description: Provides user-facing ecommerce storefront functionality for the Workarea
|
28
28
|
Commerce Platform.
|
29
29
|
email:
|