@wikala/spmkt 2.29.6 → 2.30.0
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.
- package/components/Address/AddressBook.vue +2 -2
- package/components/Address/Edit.vue +6 -1
- package/components/Address/PostalCode.vue +1 -0
- package/components/Auth/Login.vue +1 -1
- package/components/Auth/Register.vue +8 -4
- package/components/Cart/CartBox.vue +1 -1
- package/components/Cart/CartMode.vue +1 -1
- package/components/Cart/CartPreview.vue +1 -1
- package/components/Cart/Delivery/Delivery.vue +1 -1
- package/components/Cart/Delivery/DeliveryAddressGuest.vue +1 -1
- package/components/Cart/OrderConfirmation.vue +1 -1
- package/components/Cart/Payment/Payment.vue +2 -2
- package/components/Cart/Payment/PaymentMethods.vue +1 -0
- package/components/Cart/UserIdentity.vue +4 -3
- package/components/Product/AddToCart.vue +4 -2
- package/components/QuantityInput.vue +2 -2
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<div class="columns is-gapless">
|
|
4
4
|
<div class="column">
|
|
5
|
-
<button @click="addAddress" class="button is-primary" type="button">{{ $t('address.add') }}</button>
|
|
5
|
+
<button @click="addAddress" class="button is-primary" data-test="add-address-btn" type="button">{{ $t('address.add') }}</button>
|
|
6
6
|
</div>
|
|
7
7
|
</div>
|
|
8
8
|
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
/>
|
|
33
33
|
</section>
|
|
34
34
|
<footer class="modal-card-foot">
|
|
35
|
-
<button @click="saveAddress" class="button is-primary is-fullwidth is-large">{{ $t('global.save') }}</button>
|
|
35
|
+
<button @click="saveAddress" class="button is-primary is-fullwidth is-large" data-test="save-address-btn">{{ $t('global.save') }}</button>
|
|
36
36
|
</footer>
|
|
37
37
|
</div>
|
|
38
38
|
</b-modal>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="edit-address-container">
|
|
2
|
+
<div class="edit-address-container" data-test="address-form">
|
|
3
3
|
|
|
4
4
|
<template v-if="showEditAutocompleteAddress">
|
|
5
5
|
<div class="has-margin-bottom-lg" :class="{'is-hidden': !gmapsAutocomplete}">
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
v-model="addressData.first_name"
|
|
37
37
|
type="text"
|
|
38
38
|
name="first_name"
|
|
39
|
+
data-test="address-first-name"
|
|
39
40
|
autocomplete="given-name"
|
|
40
41
|
/>
|
|
41
42
|
</b-field>
|
|
@@ -50,6 +51,7 @@
|
|
|
50
51
|
<b-input
|
|
51
52
|
v-model="addressData.last_name"
|
|
52
53
|
name="last_name"
|
|
54
|
+
data-test="address-last-name"
|
|
53
55
|
autocomplete="family-name"
|
|
54
56
|
/>
|
|
55
57
|
</b-field>
|
|
@@ -115,6 +117,7 @@
|
|
|
115
117
|
native-value="inside"
|
|
116
118
|
v-model="addressData.address1"
|
|
117
119
|
name="address1"
|
|
120
|
+
data-test="address-street"
|
|
118
121
|
autocomplete="address-line1"
|
|
119
122
|
/>
|
|
120
123
|
</b-field>
|
|
@@ -145,6 +148,7 @@
|
|
|
145
148
|
native-value="inside"
|
|
146
149
|
v-model="addressData.city"
|
|
147
150
|
name="city"
|
|
151
|
+
data-test="address-city"
|
|
148
152
|
autocomplete="address-level2"
|
|
149
153
|
/>
|
|
150
154
|
</b-field>
|
|
@@ -172,6 +176,7 @@
|
|
|
172
176
|
native-value="inside"
|
|
173
177
|
v-model="addressData.phone"
|
|
174
178
|
name="phone"
|
|
179
|
+
data-test="address-phone"
|
|
175
180
|
autocomplete="tel"
|
|
176
181
|
/>
|
|
177
182
|
</b-field>
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
</div>
|
|
60
60
|
|
|
61
61
|
<div>
|
|
62
|
-
<button name="create_account" class="button is-fullwidth has-text-weight-bold" @click.prevent="showCreateAccountDialog = true">
|
|
62
|
+
<button name="create_account" data-test="create-account-btn" class="button is-fullwidth has-text-weight-bold" @click.prevent="showCreateAccountDialog = true">
|
|
63
63
|
{{ $t('auth.createAnAccount', ['an']) }}
|
|
64
64
|
</button>
|
|
65
65
|
</div>
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
<b-input
|
|
14
14
|
native-value="inside"
|
|
15
15
|
name="first_name"
|
|
16
|
+
data-test="register-first-name"
|
|
16
17
|
ref="first_name"
|
|
17
18
|
@input="clearError('first_name')"
|
|
18
19
|
@focus="clearError('first_name')"
|
|
@@ -26,6 +27,7 @@
|
|
|
26
27
|
<b-input
|
|
27
28
|
native-value="inside"
|
|
28
29
|
name="last_name"
|
|
30
|
+
data-test="register-last-name"
|
|
29
31
|
@input="clearError('last_name')"
|
|
30
32
|
@focus="clearError('last_name')"
|
|
31
33
|
v-model="registrationData.last_name"
|
|
@@ -40,13 +42,14 @@
|
|
|
40
42
|
</div>
|
|
41
43
|
|
|
42
44
|
<b-field :label="$t('global.email')" label-position="inside" :type="{ 'is-danger': errors.email }" :message="errors.email">
|
|
43
|
-
<b-input native-value="inside" name="email" @input="clearError('email')" @focus="clearError('email')" v-model="registrationData.email"></b-input>
|
|
45
|
+
<b-input native-value="inside" name="email" data-test="register-email" @input="clearError('email')" @focus="clearError('email')" v-model="registrationData.email"></b-input>
|
|
44
46
|
</b-field>
|
|
45
47
|
|
|
46
48
|
<b-field :label="$t('auth.password')" label-position="inside" :type="{ 'is-danger': errors.password }" :message="errors.password">
|
|
47
49
|
<b-input
|
|
48
50
|
native-value="inside"
|
|
49
51
|
name="password"
|
|
52
|
+
data-test="register-password"
|
|
50
53
|
@input="clearError('password')"
|
|
51
54
|
@focus="clearError('password')"
|
|
52
55
|
type="password"
|
|
@@ -64,6 +67,7 @@
|
|
|
64
67
|
<b-input
|
|
65
68
|
native-value="inside"
|
|
66
69
|
name="password_confirmation"
|
|
70
|
+
data-test="register-password-confirm"
|
|
67
71
|
@input="clearError('password_confirmation')"
|
|
68
72
|
@focus="clearError('password_confirmation')"
|
|
69
73
|
type="password"
|
|
@@ -72,7 +76,7 @@
|
|
|
72
76
|
</b-field>
|
|
73
77
|
|
|
74
78
|
<div class="field">
|
|
75
|
-
<b-checkbox name="register_tos" v-model="registrationData.terms_of_service" type="is-info">
|
|
79
|
+
<b-checkbox name="register_tos" data-test="register-tos" v-model="registrationData.terms_of_service" type="is-info">
|
|
76
80
|
<span v-html="$t('auth.acceptTOS', [initialState.site_name])"></span>
|
|
77
81
|
</b-checkbox>
|
|
78
82
|
<p class="help is-danger" v-if="errors.terms_of_service">
|
|
@@ -82,7 +86,7 @@
|
|
|
82
86
|
</section>
|
|
83
87
|
|
|
84
88
|
<footer class="modal-card-foot">
|
|
85
|
-
<button name="register" :class="['button', 'is-primary', 'is-fullwidth', { 'is-loading': loading }]" type="submit">
|
|
89
|
+
<button name="register" data-test="register-submit" :class="['button', 'is-primary', 'is-fullwidth', { 'is-loading': loading }]" type="submit">
|
|
86
90
|
{{ $t('auth.createAnAccount', ['']) }}
|
|
87
91
|
</button>
|
|
88
92
|
</footer>
|
|
@@ -166,7 +170,7 @@ export default {
|
|
|
166
170
|
this.registrationData = { ...registrationDataSchema }
|
|
167
171
|
this.$buefy.dialog.alert({
|
|
168
172
|
title: this.$t('auth.createAnAccount', ['']),
|
|
169
|
-
message: this.$t('auth.createAccountNotification'),
|
|
173
|
+
message: '<div data-test="account-created-message">' + this.$t('auth.createAccountNotification') + '</div>',
|
|
170
174
|
confirmText: 'OK',
|
|
171
175
|
type: 'is-primary',
|
|
172
176
|
onConfirm: () => {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
<div class="columns">
|
|
40
40
|
<div class="column">
|
|
41
41
|
<div class="checkout">
|
|
42
|
-
<button @click="goToCart" class="button buy-now-button">{{ $t('cart.viewCart') }}</button>
|
|
42
|
+
<button @click="goToCart" class="button buy-now-button" data-test="buy-now-btn">{{ $t('cart.viewCart') }}</button>
|
|
43
43
|
</div>
|
|
44
44
|
</div>
|
|
45
45
|
</div>
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
</div>
|
|
72
72
|
<div class="columns">
|
|
73
73
|
<div class="column">
|
|
74
|
-
<button name="continue_to_delivery" class="button is-primary is-large has-margin-top-lg is-fullwidth" @click="cartModeContinue">{{ $t('cart.continue') }}</button>
|
|
74
|
+
<button name="continue_to_delivery" data-test="continue-to-delivery-btn" class="button is-primary is-large has-margin-top-lg is-fullwidth" @click="cartModeContinue">{{ $t('cart.continue') }}</button>
|
|
75
75
|
</div>
|
|
76
76
|
<div class="column">
|
|
77
77
|
</div>
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
<div class="column is-one-third is-4-desktop is-5-tablet">
|
|
37
37
|
<CartSummary :total-label="$t('global.total')" />
|
|
38
38
|
<div v-if="activeStep === 0" class="has-text-centered proceed-btn-container">
|
|
39
|
-
<button :disabled="emptyCart || itemsWithErrorsCount > 0 || cart.equivalent_qty > 30" @click="proceedToCheckout" class="button is-primary is-large" name="to_checkout">
|
|
39
|
+
<button :disabled="emptyCart || itemsWithErrorsCount > 0 || cart.equivalent_qty > 30" @click="proceedToCheckout" class="button is-primary is-large" data-test="to-checkout-btn" name="to_checkout">
|
|
40
40
|
{{ $t('cart.proceedToCheckout') }}
|
|
41
41
|
</button>
|
|
42
42
|
</div>
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
|
|
63
63
|
<div v-if="addressValid" class="columns">
|
|
64
64
|
<div class="column">
|
|
65
|
-
<button @click="continueToPayment" :class="['button', 'is-primary', 'is-large', 'has-margin-top-lg', { 'is-loading': continueButtonLoading }]" name="to_checkout">
|
|
65
|
+
<button @click="continueToPayment" :class="['button', 'is-primary', 'is-large', 'has-margin-top-lg', { 'is-loading': continueButtonLoading }]" data-test="to-checkout-btn" name="to_checkout">
|
|
66
66
|
{{ $t('cart.proceedToCheckout') }}
|
|
67
67
|
</button>
|
|
68
68
|
</div>
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
|
|
28
28
|
<div v-if="!addressValid" class="columns">
|
|
29
29
|
<div class="column">
|
|
30
|
-
<button name="validate_address" class="button is-primary is-large has-margin-top-lg" @click="onAddressContinue">{{ $t('cart.deliverToThisAddress') }}</button>
|
|
30
|
+
<button name="validate_address" data-test="validate-address-btn" class="button is-primary is-large has-margin-top-lg" @click="onAddressContinue">{{ $t('cart.deliverToThisAddress') }}</button>
|
|
31
31
|
</div>
|
|
32
32
|
<div class="column">
|
|
33
33
|
</div>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="container m-3">
|
|
3
3
|
<div class="columns">
|
|
4
4
|
<div class="column is-two-thirds">
|
|
5
|
-
<h1 class="is-size-3 is-choomblue"> {{ $t('cart.cartThankYou') }} </h1>
|
|
5
|
+
<h1 class="is-size-3 is-choomblue" data-test="checkout-success-title"> {{ $t('cart.cartThankYou') }} </h1>
|
|
6
6
|
<div class="order-confirmation">
|
|
7
7
|
<div class="oc-summary"> {{ $t('cart.orderNumber') }} {{ orderData.id }} </div>
|
|
8
8
|
<div class="oc-summary"> {{ $t('cart.orderDate') }} {{ orderData.date }} </div>
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
</div>
|
|
62
62
|
|
|
63
63
|
<div class="cart-accept-tos mt-6 mb-6" v-if="initialState.acceptTOSAtCheckout">
|
|
64
|
-
<b-checkbox name="accept_tos" v-model="acceptTOS" @input="acceptTOSChange">
|
|
64
|
+
<b-checkbox name="accept_tos" data-test="accept-tos" v-model="acceptTOS" @input="acceptTOSChange">
|
|
65
65
|
<span v-html="$t('cart.acceptTOS')"></span>
|
|
66
66
|
</b-checkbox>
|
|
67
67
|
<p class="help is-danger" v-if="acceptTOSError">
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
</div>
|
|
71
71
|
|
|
72
72
|
<div class="cc-submit">
|
|
73
|
-
<button type="button" @click="placeOrder" class="button is-primary is-large">{{ $t('cart.placeYourOrder') }}</button>
|
|
73
|
+
<button type="button" @click="placeOrder" class="button is-primary is-large" data-test="place-order-btn">{{ $t('cart.placeYourOrder') }}</button>
|
|
74
74
|
</div>
|
|
75
75
|
</div>
|
|
76
76
|
<div class="column is-4 is-hidden-mobile">
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
:loading="checkingEmail"
|
|
15
15
|
type="email"
|
|
16
16
|
name="email"
|
|
17
|
+
data-test="guest-email"
|
|
17
18
|
autocomplete="email"
|
|
18
19
|
/>
|
|
19
20
|
</b-field>
|
|
@@ -33,7 +34,7 @@
|
|
|
33
34
|
:type="{ 'is-danger': errors.first_name }"
|
|
34
35
|
:message="errors.first_name"
|
|
35
36
|
>
|
|
36
|
-
<b-input native-value="inside" v-model="userIdentity.first_name" type="text" name="first_name" autocomplete="given-name"></b-input>
|
|
37
|
+
<b-input native-value="inside" v-model="userIdentity.first_name" type="text" name="first_name" data-test="guest-first-name" autocomplete="given-name"></b-input>
|
|
37
38
|
</b-field>
|
|
38
39
|
</div>
|
|
39
40
|
<div class="column">
|
|
@@ -43,7 +44,7 @@
|
|
|
43
44
|
:type="{ 'is-danger': errors.last_name }"
|
|
44
45
|
:message="errors.last_name"
|
|
45
46
|
>
|
|
46
|
-
<b-input v-model="userIdentity.last_name" name="last_name" autocomplete="family-name" />
|
|
47
|
+
<b-input v-model="userIdentity.last_name" name="last_name" data-test="guest-last-name" autocomplete="family-name" />
|
|
47
48
|
</b-field>
|
|
48
49
|
</div>
|
|
49
50
|
</div>
|
|
@@ -55,7 +56,7 @@
|
|
|
55
56
|
:type="{ 'is-danger': errors.phone }"
|
|
56
57
|
:message="errors.phone"
|
|
57
58
|
>
|
|
58
|
-
<b-input v-mask="initialState.phoneNumberMask" native-value="inside" v-model="userIdentity.phone" name="phone" autocomplete="tel"/>
|
|
59
|
+
<b-input v-mask="initialState.phoneNumberMask" native-value="inside" v-model="userIdentity.phone" name="phone" data-test="guest-phone" autocomplete="tel"/>
|
|
59
60
|
</b-field>
|
|
60
61
|
</div>
|
|
61
62
|
</div>
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
<quantity v-model="qty"></quantity>
|
|
5
5
|
</template>
|
|
6
6
|
<div v-if="inStock" class="actions">
|
|
7
|
-
<button name="add_to_cart" @click="addToCart" :class="['button', 'add-to-cart-button', { 'is-loading': loadingAddToCart }]" :disabled="!inStock">
|
|
7
|
+
<button name="add_to_cart" data-test="add-to-cart-btn" @click="addToCart" :class="['button', 'add-to-cart-button', { 'is-loading': loadingAddToCart }]" :disabled="!inStock">
|
|
8
8
|
{{ $t('cart.addToCart') }}
|
|
9
9
|
</button>
|
|
10
|
-
<button v-if="buyNowEnabled" @click="buyNow" :class="['button', 'buy-now-button', { 'is-loading': loadingBuyNow }]" :disabled="!inStock">
|
|
10
|
+
<button v-if="buyNowEnabled" data-test="buy-now-btn" @click="buyNow" :class="['button', 'buy-now-button', { 'is-loading': loadingBuyNow }]" :disabled="!inStock">
|
|
11
11
|
{{ $t('cart.buyNow') }}
|
|
12
12
|
</button>
|
|
13
13
|
</div>
|
|
@@ -93,6 +93,8 @@ export default {
|
|
|
93
93
|
product.image_url = this.product.images && this.product.images[0] ? this.product.images[0].url : ''
|
|
94
94
|
if (this.selectedVariant) {
|
|
95
95
|
let variantImage = _.findWhere(this.product.images, { id: this.selectedVariant.default_image_id })
|
|
96
|
+
product.item_id = this.selectedVariant.id
|
|
97
|
+
product.item_name += ' - ' + _.pluck(this.selectedVariant.options, 'value').join(', ')
|
|
96
98
|
product.image_url = variantImage?.url
|
|
97
99
|
}
|
|
98
100
|
return product
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div style="display: flex; justify-content: flex-end; flex-direction: column;">
|
|
3
|
-
<select class="select" v-if="showSelect" @change="qtySelectChange($event)" v-model="qty" style="text-align:center;">
|
|
3
|
+
<select data-test="cart-item-qty" class="select" v-if="showSelect" @change="qtySelectChange($event)" v-model="qty" style="text-align:center;">
|
|
4
4
|
<option v-for="qty in selectRange" :value="qty" :key="qty">{{ qty }}</option>
|
|
5
5
|
<option value="smp">{{ selectMax + 1 }}+</option>
|
|
6
6
|
</select>
|
|
7
7
|
<form @submit.prevent="qtyUpdate" style="display:flex; flex-direction: column;">
|
|
8
|
-
<input ref="textInput" v-if="!showSelect" class="input" @input="qtyInput" :value="qty" style="text-align:center; border:unset" />
|
|
8
|
+
<input data-test="cart-item-qty" ref="textInput" v-if="!showSelect" class="input" @input="qtyInput" :value="qty" style="text-align:center; border:unset" />
|
|
9
9
|
<button v-if="showUpdateButton" class="button is-small">{{ $t('global.update') }}</button>
|
|
10
10
|
</form>
|
|
11
11
|
</div>
|