@ordergroove/offers 2.27.21 → 2.27.22-alpha-PR-666-1.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ordergroove/offers",
|
|
3
|
-
"version": "2.27.
|
|
3
|
+
"version": "2.27.22-alpha-PR-666-1.0+7cae6e66",
|
|
4
4
|
"description": "offer state component",
|
|
5
5
|
"author": "Eugenio Lattanzio <eugenio63@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/ordergroove/plush-toys#readme",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@ordergroove/offers-templates": "^0.4.15"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "7cae6e6691f7cb6fff7758356ea635702ab3ef87"
|
|
49
49
|
}
|
|
@@ -73,7 +73,7 @@ describe('Offers', () => {
|
|
|
73
73
|
it('should fetch offer for single product in pdp', () => {
|
|
74
74
|
offers.resolveSettings('0e5de2bedc5e11e3a2e4bc764e106cf4', 'staging', { product: '123' }, mockStore);
|
|
75
75
|
expect(fetchOfferSpy).toHaveBeenCalledWith(
|
|
76
|
-
'https://staging.
|
|
76
|
+
'https://staging.offers.ordergroove.com',
|
|
77
77
|
'0e5de2bedc5e11e3a2e4bc764e106cf4',
|
|
78
78
|
'xyz',
|
|
79
79
|
'123',
|
|
@@ -91,14 +91,14 @@ describe('Offers', () => {
|
|
|
91
91
|
expect(fetchOfferSpy).toHaveBeenCalledTimes(2);
|
|
92
92
|
|
|
93
93
|
expect(fetchOfferSpy.calls.argsFor(0)).toEqual([
|
|
94
|
-
'https://staging.
|
|
94
|
+
'https://staging.offers.ordergroove.com',
|
|
95
95
|
'0e5de2bedc5e11e3a2e4bc764e106cf4',
|
|
96
96
|
'xyz',
|
|
97
97
|
'123',
|
|
98
98
|
'pdp'
|
|
99
99
|
]);
|
|
100
100
|
expect(fetchOfferSpy.calls.argsFor(1)).toEqual([
|
|
101
|
-
'https://staging.
|
|
101
|
+
'https://staging.offers.ordergroove.com',
|
|
102
102
|
'0e5de2bedc5e11e3a2e4bc764e106cf4',
|
|
103
103
|
'xyz',
|
|
104
104
|
'456',
|
|
@@ -29,9 +29,9 @@ describe('api.fetchOffer', () => {
|
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
it('should call correct merchant endpoint with params', async () => {
|
|
32
|
-
await api.fetchOffer('https://staging.
|
|
32
|
+
await api.fetchOffer('https://staging.offers.ordergroove.com', 'some-merchant', 'some-session', 'some-product');
|
|
33
33
|
const lastUrl = fetchMock.lastUrl(MATCHED);
|
|
34
|
-
expect(lastUrl).toContain('https://staging.
|
|
34
|
+
expect(lastUrl).toContain('https://staging.offers.ordergroove.com/offer/some-merchant/pdp');
|
|
35
35
|
expect(lastUrl).toContain('session_id=some-session');
|
|
36
36
|
expect(lastUrl).toContain('page_type=1');
|
|
37
37
|
expect(lastUrl).toContain('module_view=%5B%22regular%22%5D');
|
|
@@ -683,7 +683,7 @@ describe('reducers', () => {
|
|
|
683
683
|
|
|
684
684
|
it('should return staging urls', () => {
|
|
685
685
|
expect(environment({}, { type: constants.SET_ENVIRONMENT_STAGING })).toEqual({
|
|
686
|
-
apiUrl: 'https://staging.
|
|
686
|
+
apiUrl: 'https://staging.offers.ordergroove.com',
|
|
687
687
|
legoUrl: 'https://staging.restapi.ordergroove.com',
|
|
688
688
|
name: 'staging'
|
|
689
689
|
});
|
|
@@ -692,7 +692,7 @@ describe('reducers', () => {
|
|
|
692
692
|
it('should return dev urls', () => {
|
|
693
693
|
expect(environment({}, { type: constants.SET_ENVIRONMENT_DEV })).toEqual({
|
|
694
694
|
name: 'dev',
|
|
695
|
-
apiUrl: 'https://dev.
|
|
695
|
+
apiUrl: 'https://dev.offers.ordergroove.com',
|
|
696
696
|
legoUrl: 'https://dev.restapi.ordergroove.com'
|
|
697
697
|
});
|
|
698
698
|
});
|
|
@@ -700,7 +700,7 @@ describe('reducers', () => {
|
|
|
700
700
|
it('should return prod urls', () => {
|
|
701
701
|
expect(environment({}, { type: constants.SET_ENVIRONMENT_PROD })).toEqual({
|
|
702
702
|
name: 'prod',
|
|
703
|
-
apiUrl: 'https://
|
|
703
|
+
apiUrl: 'https://offers.ordergroove.com',
|
|
704
704
|
legoUrl: 'https://restapi.ordergroove.com'
|
|
705
705
|
});
|
|
706
706
|
});
|
package/src/core/reducer.js
CHANGED
|
@@ -300,7 +300,7 @@ export const environment = (state = {}, action) => {
|
|
|
300
300
|
return {
|
|
301
301
|
...state,
|
|
302
302
|
name: constants.ENV_STAGING,
|
|
303
|
-
apiUrl: 'https://staging.
|
|
303
|
+
apiUrl: 'https://staging.offers.ordergroove.com',
|
|
304
304
|
// scUrl: 'https://staging.sc.ordergroove.com',
|
|
305
305
|
// widgetsUrl: 'https://staging.static.ordergroove.com',
|
|
306
306
|
// masterDbUrl: 'https://staging.v2.ordergroove.com',
|
|
@@ -311,7 +311,7 @@ export const environment = (state = {}, action) => {
|
|
|
311
311
|
return {
|
|
312
312
|
...state,
|
|
313
313
|
name: constants.ENV_DEV,
|
|
314
|
-
apiUrl: 'https://dev.
|
|
314
|
+
apiUrl: 'https://dev.offers.ordergroove.com',
|
|
315
315
|
// scUrl: 'https://dev.sc.ordergroove.com',
|
|
316
316
|
// widgetsUrl: 'https://dev.static.ordergroove.com',
|
|
317
317
|
// masterDbUrl: 'https://dev.api.ordergroove.com',
|
|
@@ -322,7 +322,7 @@ export const environment = (state = {}, action) => {
|
|
|
322
322
|
return {
|
|
323
323
|
...state,
|
|
324
324
|
name: constants.ENV_PROD,
|
|
325
|
-
apiUrl: 'https://
|
|
325
|
+
apiUrl: 'https://offers.ordergroove.com',
|
|
326
326
|
// scUrl: 'https://sc.ordergroove.com',
|
|
327
327
|
// widgetsUrl: 'https://static.ordergroove.com',
|
|
328
328
|
// masterDbUrl: 'https://api.ordergroove.com',
|