@wikala/spmkt 2.31.0 → 3.0.0-beta.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.
Files changed (124) hide show
  1. package/MIGRATION_GUIDE.md +261 -0
  2. package/api/product.js +1 -0
  3. package/api/request.js +9 -4
  4. package/api/user.js +1 -1
  5. package/components/Account/AccountDashboard.vue +101 -101
  6. package/components/Account/AccountStore.js +57 -31
  7. package/components/Account/AffiliateReport.vue +56 -60
  8. package/components/Account/{OrderDetail.vue → Orders/OrderDetail.vue} +44 -30
  9. package/components/Account/Orders/Orders.vue +124 -0
  10. package/components/Account/{AccountSettings.vue → Settings/AccountSettings.vue} +4 -4
  11. package/components/Account/Settings/ChangeEmail.vue +136 -0
  12. package/components/Account/Settings/ChangeName.vue +82 -0
  13. package/components/Account/Settings/ChangePassword.vue +91 -0
  14. package/components/Address/Address.vue +38 -57
  15. package/components/Address/AddressBook.vue +77 -57
  16. package/components/Address/AddressSelect.vue +94 -87
  17. package/components/Address/Edit.vue +253 -265
  18. package/components/Address/PostalCode.vue +22 -21
  19. package/components/AgeGate.vue +11 -5
  20. package/components/Auth/Login.vue +62 -44
  21. package/components/Auth/Register.vue +82 -60
  22. package/components/Auth/ResetPassword.vue +45 -30
  23. package/components/Cart/AgeVerification/AgeChecker.vue +3 -3
  24. package/components/Cart/CartBadge.vue +15 -4
  25. package/components/Cart/CartBox.vue +19 -11
  26. package/components/Cart/CartItem.vue +3 -3
  27. package/components/Cart/CartMode.vue +6 -5
  28. package/components/Cart/CartPreview.vue +24 -18
  29. package/components/Cart/Coupon.vue +4 -5
  30. package/components/Cart/CreditCard/Everyware.vue +10 -10
  31. package/components/Cart/CreditCard/ExtendedCreditCard.vue +5 -5
  32. package/components/Cart/CreditCard/SquarePay.vue +18 -16
  33. package/components/Cart/CreditCard/StandardCreditCard.vue +9 -9
  34. package/components/Cart/Delivery/Delivery.vue +16 -12
  35. package/components/Cart/Delivery/DeliveryAddress.vue +1 -1
  36. package/components/Cart/Delivery/DeliveryMethods.vue +1 -1
  37. package/components/Cart/Delivery/DeliveryOptions.vue +15 -9
  38. package/components/Cart/Delivery/DeliveryTypes.vue +8 -5
  39. package/components/Cart/Delivery/ReservationSlots.vue +14 -8
  40. package/components/Cart/Disclaimer.vue +1 -1
  41. package/components/Cart/OrderConfirmation.vue +1 -1
  42. package/components/Cart/Payment/Payment.vue +37 -33
  43. package/components/Cart/Payment/PaymentMethods.vue +6 -4
  44. package/components/Cart/ReviewAndSubmit.vue +9 -7
  45. package/components/Cart/ShoppingCart.vue +42 -31
  46. package/components/Cart/Store/actions.js +1 -1
  47. package/components/Cart/Store/getters.js +2 -1
  48. package/components/Cart/Store/index.js +1 -1
  49. package/components/Cart/Store/mutations.js +7 -5
  50. package/components/Cart/UserIdentity.vue +1 -1
  51. package/components/Category/CategoryFilter.vue +128 -114
  52. package/components/Category/CategorySort.vue +44 -32
  53. package/components/Category/LoadMore.vue +39 -23
  54. package/components/DeliverTo.vue +10 -15
  55. package/components/DeliveryNotice.vue +72 -68
  56. package/components/DobInput.vue +23 -23
  57. package/components/Gmaps/GmapsAutocomplete.vue +139 -78
  58. package/components/Gmaps/GmapsLocations.vue +1 -1
  59. package/components/Gmaps/GmapsSingleLocation.vue +121 -87
  60. package/components/ModalContainer/ModalContainer.vue +12 -9
  61. package/components/ModalContainer/index.js +61 -18
  62. package/components/Product/AddToCart.vue +237 -221
  63. package/components/Product/BoxAddToCart.vue +114 -86
  64. package/components/Product/Compare.vue +68 -48
  65. package/components/Product/CompareBox.vue +128 -123
  66. package/components/Product/Lookup.vue +92 -65
  67. package/components/Product/Photo.vue +105 -66
  68. package/components/Product/Price.vue +64 -43
  69. package/components/Product/ProductAutocomplete.vue +52 -57
  70. package/components/Product/ProductBox.vue +61 -38
  71. package/components/Product/ProductImages.vue +83 -86
  72. package/components/Product/Quantity.vue +115 -53
  73. package/components/Product/QuickView.vue +52 -45
  74. package/components/Product/RelatedProducts.vue +88 -23
  75. package/components/Product/SKU.vue +27 -8
  76. package/components/Product/Variants.vue +335 -341
  77. package/components/Product/reviews-questions/ProductQuestions.vue +226 -198
  78. package/components/Product/reviews-questions/ProductReviews.vue +122 -107
  79. package/components/Product/reviews-questions/Review.vue +54 -59
  80. package/components/Product/reviews-questions/ReviewForm.vue +222 -170
  81. package/components/Product/reviews-questions/ReviewImages.vue +197 -216
  82. package/components/Product/reviews-questions/Vote.vue +83 -57
  83. package/components/QuantityInput.vue +18 -8
  84. package/components/RangeInput.vue +15 -8
  85. package/components/Recaptcha.vue +8 -1
  86. package/components/SelectShippingCountry.vue +81 -62
  87. package/components/TimedOffer.vue +59 -74
  88. package/composables/globals.js +53 -0
  89. package/config.js +5 -2
  90. package/index.js +41 -10
  91. package/install.js +75 -0
  92. package/locales/en.json +2 -1
  93. package/locales/sr.json +2 -1
  94. package/package.json +43 -30
  95. package/utils/directives.js +28 -45
  96. package/utils/event-bus.js +56 -0
  97. package/utils/filters.js +24 -7
  98. package/utils/{gmaps.js → google/gmaps.js} +43 -10
  99. package/utils/{google-analytics-eec.js → google/google-analytics-eec.js} +7 -7
  100. package/babel.config.js +0 -5
  101. package/components/Account/ChangeEmail.vue +0 -133
  102. package/components/Account/ChangeName.vue +0 -92
  103. package/components/Account/ChangePassword.vue +0 -94
  104. package/components/Account/CreditCards.vue +0 -18
  105. package/components/Account/Orders.vue +0 -110
  106. package/components/Account/Settings.vue +0 -18
  107. package/components/Cart/Delivery/DeliveryAddressGuest.spec.js +0 -128
  108. package/components/Cart/Delivery/DeliveryTypes.spec.js +0 -83
  109. package/components/Cart/PCIBadge/SecurityMetrics.vue +0 -11
  110. package/components/Instagram.vue +0 -49
  111. package/components/ProductImageModal.vue +0 -41
  112. package/jest.config.js +0 -16
  113. package/test/e2e/.babelrc.js +0 -8
  114. package/test/e2e/.eslintrc.js +0 -11
  115. package/test/e2e/accAuth.spec.js +0 -64
  116. package/test/e2e/ageGate.spec.js +0 -26
  117. package/test/e2e/checkout.spec.js +0 -106
  118. package/test/e2e/compare.spec.js +0 -52
  119. package/test/e2e/config/data.js +0 -21
  120. package/test/e2e/config/routes.js +0 -11
  121. package/test/e2e/region.spec.js +0 -46
  122. package/test/e2e/search.spec.js +0 -32
  123. package/tests/vueBuefy.js +0 -4
  124. package/tsconfig.json +0 -8
@@ -1,64 +0,0 @@
1
- import { fake } from './config/data'
2
-
3
- const timeout = process.env.SLOWMO ? 30000 : 10000
4
-
5
- beforeAll(async () => {
6
- await page.goto(URL, { waitUntil: 'networkidle2' })
7
- await page.setViewport({ width, height })
8
- })
9
-
10
- describe('Age Gate', () => {
11
- test(
12
- 'should be of age',
13
- async () => {
14
- await page.waitForSelector('span.wkl-agate-ok')
15
- await page.click('span.wkl-agate-ok')
16
- },
17
- timeout
18
- )
19
- })
20
-
21
- describe('Account authentication', () => {
22
- test(
23
- 'should register',
24
- async () => {
25
- await page.waitForSelector('.wkl-account > span', { visible: true })
26
- await page.click('.wkl-account > span', { visible: true })
27
- await page.waitForSelector('button[name="create_account"]')
28
- await page.click('button[name="create_account"]')
29
- await page.type('input[name="name"]', fake.firstName)
30
- await page.type('input[name="email"]', fake.email)
31
- await page.type('input[name="password"]', fake.password)
32
- await page.type('input[name="password_confirmation"]', fake.password)
33
- await page.click('.wkl-modal-container .b-checkbox.checkbox')
34
- await page.click('.modal-card-foot button')
35
- await page.waitForSelector('.dialog.modal.is-active')
36
- await page.click('.dialog .modal-card .modal-card-foot .button')
37
- },
38
- timeout
39
- )
40
-
41
- test(
42
- 'should log out',
43
- async () => {
44
- await page.waitForSelector('.wkl-account .dropdown.is-hoverable')
45
- await page.hover('.wkl-account .dropdown.is-hoverable')
46
- await page.click('a.dropdown-item:last-child')
47
- await page.waitForSelector('.wkl-account.wkl-guest')
48
- },
49
- timeout
50
- )
51
-
52
- test(
53
- 'should log in',
54
- async () => {
55
- await page.waitForSelector('.wkl-account.wkl-guest')
56
- await page.click('.wkl-account.wkl-guest')
57
- await page.type('input[type="email"]', fake.email)
58
- await page.type('input[type="password"]', fake.password)
59
- await page.click('footer.modal-card-foot button.is-primary')
60
- await page.waitForSelector('.your-account-title')
61
- },
62
- timeout
63
- )
64
- })
@@ -1,26 +0,0 @@
1
- const timeout = process.env.SLOWMO ? 30000 : 10000
2
-
3
- beforeAll(async () => {
4
- await page.goto(URL, { waitUntil: 'domcontentloaded' })
5
- })
6
-
7
- describe('Age Gate', () => {
8
- test(
9
- 'should not be of age',
10
- async () => {
11
- await page.waitForSelector('.wkl-agate-cancel')
12
- await page.click('.wkl-agate-cancel button')
13
- await page.waitForSelector('.gLFyf.gsfi') // google search bar selector
14
- },
15
- timeout
16
- )
17
- test(
18
- 'should be of age',
19
- async () => {
20
- await page.goto(URL)
21
- await page.waitForSelector('span.wkl-agate-ok')
22
- await page.click('span.wkl-agate-ok')
23
- },
24
- timeout
25
- )
26
- })
@@ -1,106 +0,0 @@
1
- const timeout = process.env.SLOWMO ? 30000 : 10000
2
- import { fake, data } from './config/data'
3
- import { routes } from './config/routes'
4
-
5
- beforeAll(async () => {
6
- await page.goto(URL, { waitUntil: 'networkidle2' })
7
- await page.setViewport({ width, height })
8
- })
9
-
10
- describe('Age Gate', () => {
11
- test(
12
- 'should be of age',
13
- async () => {
14
- await page.waitForSelector('span.wkl-agate-ok')
15
- await page.click('span.wkl-agate-ok')
16
- },
17
- timeout
18
- )
19
- })
20
-
21
- describe('Adding a product to cart', () => {
22
- test(
23
- 'should go to a category page',
24
- async () => {
25
- await page.goto(routes.public.category)
26
- await page.waitForSelector('.column.is-one-quarter-desktop.is-half-mobile')
27
- },
28
- timeout
29
- )
30
-
31
- test(
32
- 'should go to product page and add it to the cart',
33
- async () => {
34
- await page.click('.column.is-one-quarter-desktop.is-half-mobile:first-child')
35
- await page.waitForSelector('.product-container .add-to-cart-button')
36
- await page.click('.product-container .add-to-cart-button')
37
- await page.waitForSelector('.shop-cart-title')
38
- },
39
- timeout
40
- )
41
- })
42
-
43
- describe('Guest checkout (US)', () => {
44
- test(
45
- 'should go to cart page',
46
- async () => {
47
- await page.goto(routes.public.cart)
48
- await page.waitForSelector('.shop-cart-title')
49
- },
50
- timeout
51
- )
52
-
53
- test(
54
- 'should apply discount code',
55
- async () => {
56
- await page.waitForSelector('.promo-code')
57
- await page.type(
58
- '#wikala > section > div > div > div.columns > div > div.b-tabs.is-fullwidth > section > div:nth-child(1) > div > div > div.column.is-one-third > div.cart-summary > div > div.pc-input > input',
59
- 'BLOOMGROOVE30'
60
- )
61
- await page.click(
62
- '#wikala > section > div > div > div.columns > div > div.b-tabs.is-fullwidth > section > div:nth-child(1) > div > div > div.column.is-one-third > div.cart-summary > div > div.pc-input > button'
63
- )
64
- await page.waitForSelector('.promo-code .has-text-weight-bold')
65
- },
66
- timeout
67
- )
68
-
69
- test('should proceed to checkout', async () => {
70
- await page.click('.wkl-shopping-cart .proceed-btn-container')
71
- await page.waitForSelector('.modal .animation-content .modal-card')
72
- await page.click('.wkl-modal-container .continue-as-guest button')
73
- })
74
-
75
- test(
76
- 'should fill out address info',
77
- async () => {
78
- await page.waitForSelector('.address-guest')
79
- await page.type('input[name="email"]', fake.email)
80
- await page.type('input[name="first_name"]', fake.firstName)
81
- await page.type('input[name="last_name"]', fake.lastName)
82
- await page.type('input[name="state_id"]', 'Alberta')
83
- await page.click('#frm-edit-address > div:nth-child(3) > div:nth-child(2) > div > div > div.dropdown-menu > div > a')
84
- await page.type('input[name="address1"]', fake.street)
85
- await page.type('input[name="city"]', fake.city)
86
- await page.type('input[name="postcode"]', fake.zipCode)
87
- await page.click('.address-guest button')
88
- await page.waitForFunction('document.querySelector("body").innerText.includes("Enter your payment details")')
89
- },
90
- timeout
91
- )
92
-
93
- test(
94
- 'should fill out credit card info',
95
- async () => {
96
- await page.waitForFunction('document.querySelector("body").innerText.includes("Enter your payment details")')
97
- await page.type('input[name="card_number"]', data.card)
98
- await page.select('select[name="card_expiry_month"]', '01')
99
- await page.select('select[name="card_expiry_year"]', '2020')
100
- await page.type('input[name="card_cvv"]', '123')
101
- await page.type('input[name="name_on_card"]', data.name)
102
- await page.click('.cc-submit button')
103
- },
104
- timeout
105
- )
106
- })
@@ -1,52 +0,0 @@
1
- const timeout = process.env.SLOWMO ? 30000 : 10000
2
- import { routes } from './config/routes'
3
-
4
- beforeAll(async () => {
5
- await page.goto(URL, { waitUntil: 'networkidle2' })
6
- await page.setViewport({ width, height })
7
- })
8
-
9
- describe('Age gate', () => {
10
- test(
11
- 'should be of age',
12
- async () => {
13
- await page.goto(URL)
14
- await page.waitForSelector('span.wkl-agate-ok')
15
- await page.click('span.wkl-agate-ok')
16
- },
17
- timeout
18
- )
19
- })
20
-
21
- describe('Add products to compare list', () => {
22
- test(
23
- 'should go to a category page',
24
- async () => {
25
- await page.goto(routes.public.category)
26
- await page.waitForSelector('.column.is-one-quarter-desktop.is-half-mobile')
27
- },
28
- timeout
29
- )
30
-
31
- test(
32
- 'should add products to list',
33
- async () => {
34
- await page.waitForSelector('#prod-compare-389')
35
- await page.click('#prod-compare-389')
36
- await page.click('#prod-compare-389')
37
- await page.click('#prod-compare-371')
38
- await page.click('#prod-compare-377')
39
- },
40
- timeout
41
- )
42
-
43
- test(
44
- 'should go to compare page with selected products',
45
- async () => {
46
- await page.waitForSelector('button[name="compare_button"]')
47
- await page.click('button[name="compare_button"]')
48
- await page.waitForSelector('.pageHeader h1')
49
- },
50
- timeout
51
- )
52
- })
@@ -1,21 +0,0 @@
1
- import faker from 'faker'
2
-
3
- export const data = {
4
- name: 'Djordje Stevanovic',
5
- email: 'djole@wikala.com',
6
- password: 'secret',
7
- card: '123412345123456'
8
- }
9
-
10
- export const fake = {
11
- firstName: faker.name.firstName(),
12
- lastName: faker.name.lastName(),
13
- email: faker.internet.email(),
14
- password: faker.internet.password(),
15
- message: faker.random.words(),
16
- country: faker.address.country(),
17
- state: faker.address.state(),
18
- street: faker.address.streetAddress('###'),
19
- city: faker.address.city(),
20
- zipCode: faker.address.zipCode()
21
- }
@@ -1,11 +0,0 @@
1
- export const baseUrl = 'http://camazon.test'
2
- export const routes = {
3
- public: {
4
- noMatch: `${baseUrl}/asdf`,
5
- category: `${baseUrl}/vaporizers`,
6
- cart: `${baseUrl}/shopping-cart`
7
- },
8
- private: {
9
- account: `${baseUrl}/account`
10
- }
11
- }
@@ -1,46 +0,0 @@
1
- const timeout = process.env.SLOWMO ? 30000 : 10000
2
-
3
- beforeAll(async () => {
4
- await page.goto(URL, { waitUntil: 'domcontentloaded' })
5
- await page.setViewport({ width, height })
6
- })
7
-
8
- describe('Age Gate', () => {
9
- test(
10
- 'should be of age',
11
- async () => {
12
- await page.waitForSelector('span.wkl-agate-ok')
13
- await page.click('span.wkl-agate-ok')
14
- },
15
- timeout
16
- )
17
- })
18
-
19
- describe('Change region', () => {
20
- test(
21
- 'should change to Armenia',
22
- async () => {
23
- await page.waitForSelector('.wkl-deliver-to')
24
- await page.click('.wkl-deliver-to')
25
- await page.waitForSelector('input[name="country_id"]')
26
- await page.type('input[name="country_id"]', 'Armenia', { delay: 10 })
27
- await page.waitForSelector('.autocomplete .dropdown-item.is-hovered')
28
- await page.click('.autocomplete .dropdown-item.is-hovered')
29
- await page.click('.wkl-modal-container button.button.is-primary.is-large')
30
- },
31
- timeout
32
- )
33
-
34
- test(
35
- 'should change to USA',
36
- async () => {
37
- await page.waitForSelector('.wkl-deliver-to')
38
- await page.click('.wkl-deliver-to')
39
- await page.waitForSelector('input[name="country_id"]')
40
- await page.type('input[name="country_id"]', 'United Sta', { delay: 10 })
41
- await page.click('.autocomplete .dropdown-item.is-hovered')
42
- await page.click('.wkl-modal-container button.button.is-primary.is-large')
43
- },
44
- timeout
45
- )
46
- })
@@ -1,32 +0,0 @@
1
- const timeout = process.env.SLOWMO ? 30000 : 10000
2
-
3
- beforeAll(async () => {
4
- await page.goto(URL, { waitUntil: 'networkidle2' })
5
- await page.setViewport({ width, height })
6
- })
7
-
8
- describe('Age Gate', () => {
9
- test(
10
- 'should be of age',
11
- async () => {
12
- await page.waitForSelector('span.wkl-agate-ok')
13
- await page.click('span.wkl-agate-ok')
14
- },
15
- timeout
16
- )
17
- })
18
-
19
- describe('Product search and autocomplete', () => {
20
- test(
21
- 'should search for a product',
22
- async () => {
23
- await page.goto(URL)
24
- await page.waitForSelector('input[name="q"]')
25
- await page.type('input[name="q"]', 'boundless')
26
- await page.waitFor(2000)
27
- await page.click('form[name="productSearchForm"] a.dropdown-item:first-child')
28
- await page.waitForSelector('.product-title')
29
- },
30
- timeout
31
- )
32
- })
package/tests/vueBuefy.js DELETED
@@ -1,4 +0,0 @@
1
- import Vue from 'vue';
2
- import Buefy from 'buefy';
3
-
4
- Vue.use(Buefy);
package/tsconfig.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- // ...
4
- },
5
- "vueCompilerOptions": {
6
- "target": 2, // For Vue version <= 2.6.14
7
- }
8
- }