ouisys-engine 2.1.16 → 2.1.17
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.
|
@@ -183,7 +183,7 @@ function submitMSISDNOnce(_x7, _x8, _x9, _x10) {
|
|
|
183
183
|
|
|
184
184
|
function _submitMSISDNOnce() {
|
|
185
185
|
_submitMSISDNOnce = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(window, config, internationalMSISDN, extraParams) {
|
|
186
|
-
var submissionError, msisdn, slug, country, device, offer, host, search, extraParamsQs, rockmanId, uniqid, result, error,
|
|
186
|
+
var submissionError, msisdn, slug, country, device, offer, host, search, extraParamsQs, rockmanId, uniqid, result, error, kwCodesWithMcpShied, mcpShieldResult;
|
|
187
187
|
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
188
188
|
while (1) {
|
|
189
189
|
switch (_context3.prev = _context3.next) {
|
|
@@ -225,11 +225,12 @@ function _submitMSISDNOnce() {
|
|
|
225
225
|
throw error;
|
|
226
226
|
|
|
227
227
|
case 21:
|
|
228
|
-
|
|
228
|
+
kwCodesWithMcpShied = {
|
|
229
|
+
kw: "kw",
|
|
229
230
|
k2: "k2"
|
|
230
231
|
};
|
|
231
232
|
|
|
232
|
-
if (!(country && (country.toLowerCase()
|
|
233
|
+
if (!(country && (kwCodesWithMcpShied[country.toLowerCase()] && result.operator == "KW_VIVA" || country.toLowerCase() == "iq"))) {
|
|
233
234
|
_context3.next = 33;
|
|
234
235
|
break;
|
|
235
236
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ouisys-engine",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.17",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"directories": "dist dev-tools",
|
|
@@ -40,7 +40,6 @@
|
|
|
40
40
|
"@types/crypto-js": "^4.0.1",
|
|
41
41
|
"@types/fs-extra": "^7.0.0",
|
|
42
42
|
"@types/inquirer": "^6.5.0",
|
|
43
|
-
"@types/jest": "^27.0.1",
|
|
44
43
|
"@types/mocha": "^5.2.5",
|
|
45
44
|
"@types/node": "^16.9.4",
|
|
46
45
|
"@types/node-fetch": "^2.5.7",
|
|
@@ -69,14 +69,15 @@ async function submitMSISDNOnce(window: Window, config: IConfig, internationalMS
|
|
|
69
69
|
throw error
|
|
70
70
|
} else {
|
|
71
71
|
|
|
72
|
-
const
|
|
72
|
+
const kwCodesWithMcpShied:{[key:string]:string} = {
|
|
73
|
+
kw:"kw",
|
|
73
74
|
k2:"k2"
|
|
74
75
|
}
|
|
75
76
|
if(country && (
|
|
76
77
|
(
|
|
77
|
-
|
|
78
|
-
country.toLowerCase() == "
|
|
79
|
-
|
|
78
|
+
|
|
79
|
+
kwCodesWithMcpShied[country.toLowerCase()] && result.operator == "KW_VIVA") ||
|
|
80
|
+
country.toLowerCase() == "iq"
|
|
80
81
|
)
|
|
81
82
|
){
|
|
82
83
|
try{
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import configureMockStore from 'redux-mock-store';
|
|
2
|
-
import thunk from 'redux-thunk';
|
|
3
|
-
import { identifyStrategy } from '..';
|
|
4
|
-
|
|
5
|
-
const middlewares = [thunk];
|
|
6
|
-
const mockStore = configureMockStore(middlewares);
|
|
7
|
-
|
|
8
|
-
const store = mockStore();
|
|
9
|
-
|
|
10
|
-
describe('identify strategy action', () => {
|
|
11
|
-
const expectedResult = [{
|
|
12
|
-
"payload": {
|
|
13
|
-
"nextData": {
|
|
14
|
-
"nextAction": "submitMSISDNAction"
|
|
15
|
-
},
|
|
16
|
-
"result": {
|
|
17
|
-
"type": "NothingYet"
|
|
18
|
-
},
|
|
19
|
-
"type": "IDENTIFY_FLOW_BY_MSISDN"
|
|
20
|
-
},
|
|
21
|
-
"type": "IDENTIFY_FLOW_BY_MSISDN"
|
|
22
|
-
}]
|
|
23
|
-
it('identifies flow as ', () =>
|
|
24
|
-
store
|
|
25
|
-
//@ts-ignore
|
|
26
|
-
.dispatch(identifyStrategy())
|
|
27
|
-
.then(() => expect(store.getActions()).toEqual(expectedResult)));
|
|
28
|
-
});
|