{
    "apifoxCli": "2.2.8",
    "info": {
        "name": "智慧餐厅AI客户端配置-自有留存数据只读回归"
    },
    "item": [
        {
            "name": "Store与terminal配置完整契约",
            "item": [
                {
                    "id": "PILOT_CS_CLI_STORE_H5_BASIC",
                    "name": "store h5 basic 真实留存配置只读回归",
                    "type": "http",
                    "metaInfo": {
                        "type": "HTTP"
                    },
                    "request": {
                        "method": "GET",
                        "url": "{{base_url}}/store/client.h5.setting/detail?key=basic",
                        "header": [
                            {
                                "key": "Host",
                                "value": "store.client-settings.invalid"
                            },
                            {
                                "key": "Access-Token",
                                "value": "{{store_token}}"
                            },
                            {
                                "key": "Platform",
                                "value": "POC"
                            },
                            {
                                "key": "X-Pilot-Scenario",
                                "value": "PILOT_CS_CLI_STORE_H5_BASIC"
                            }
                        ]
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test('HTTP传输200',function(){pm.response.to.have.status(200);});",
                                    "pm.test('JSON响应可解析',function(){pm.response.to.be.json;});var b=pm.response.json();",
                                    "pm.test('业务码数字200',function(){pm.expect(b.status).to.eql(200);});",
                                    "pm.test('动态trace为13位十六进制',function(){pm.expect(b.trace_id).to.match(/^[0-9a-f]{13}$/);});",
                                    "function eq(a,b){if(a===null||b===null)return a===b;if(typeof a!==typeof b||Array.isArray(a)!==Array.isArray(b))return false;if(typeof a!=='object')return a===b;var ak=Object.keys(a),bk=Object.keys(b);if(ak.length!==bk.length)return false;if(Array.isArray(a))return ak.every(function(k){return eq(a[k],b[k]);});return ak.every(function(k){return Object.prototype.hasOwnProperty.call(b,k)&&eq(a[k],b[k]);});}",
                                    "pm.test('完整原表投影值类型容器及数组次序',function(){pm.expect(eq(b.data,{\"detail\":{\"enabled\":false,\"baseUrl\":\"https://cdxcs10b4c8-S.invalid/retained/\"}})).to.eql(true);});",
                                    "pm.test('留存配置明确关闭且布尔类型',function(){pm.expect(b.data.detail.enabled).to.eql(false);});"
                                ]
                            }
                        }
                    ]
                },
                {
                    "id": "PILOT_CS_CLI_STORE_WXAPP_BASIC",
                    "name": "store wxapp basic 真实留存配置只读回归",
                    "type": "http",
                    "metaInfo": {
                        "type": "HTTP"
                    },
                    "request": {
                        "method": "GET",
                        "url": "{{base_url}}/store/client.wxapp.setting/detail?key=basic",
                        "header": [
                            {
                                "key": "Host",
                                "value": "store.client-settings.invalid"
                            },
                            {
                                "key": "Access-Token",
                                "value": "{{store_token}}"
                            },
                            {
                                "key": "Platform",
                                "value": "POC"
                            },
                            {
                                "key": "X-Pilot-Scenario",
                                "value": "PILOT_CS_CLI_STORE_WXAPP_BASIC"
                            }
                        ]
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test('HTTP传输200',function(){pm.response.to.have.status(200);});",
                                    "pm.test('JSON响应可解析',function(){pm.response.to.be.json;});var b=pm.response.json();",
                                    "pm.test('业务码数字200',function(){pm.expect(b.status).to.eql(200);});",
                                    "pm.test('动态trace为13位十六进制',function(){pm.expect(b.trace_id).to.match(/^[0-9a-f]{13}$/);});",
                                    "function eq(a,b){if(a===null||b===null)return a===b;if(typeof a!==typeof b||Array.isArray(a)!==Array.isArray(b))return false;if(typeof a!=='object')return a===b;var ak=Object.keys(a),bk=Object.keys(b);if(ak.length!==bk.length)return false;if(Array.isArray(a))return ak.every(function(k){return eq(a[k],b[k]);});return ak.every(function(k){return Object.prototype.hasOwnProperty.call(b,k)&&eq(a[k],b[k]);});}",
                                    "pm.test('完整原表投影值类型容器及数组次序',function(){pm.expect(eq(b.data,{\"detail\":{\"enabled\":false,\"app_id\":\"NOT_A_REAL_APPID_CDXCS10B4C8_S_CHANGED\",\"app_secret\":\"NOT_A_REAL_SECRET_CDXCS10B4C8_S_RETAINED\"},\"domain\":\"store.client-settings.invalid\"})).to.eql(true);});",
                                    "pm.test('留存配置明确关闭且布尔类型',function(){pm.expect(b.data.detail.enabled).to.eql(false);});"
                                ]
                            }
                        }
                    ]
                },
                {
                    "id": "PILOT_CS_CLI_STORE_WXAPP_EXAMINE",
                    "name": "store wxapp examine 真实留存配置只读回归",
                    "type": "http",
                    "metaInfo": {
                        "type": "HTTP"
                    },
                    "request": {
                        "method": "GET",
                        "url": "{{base_url}}/store/client.wxapp.setting/detail?key=examine",
                        "header": [
                            {
                                "key": "Host",
                                "value": "store.client-settings.invalid"
                            },
                            {
                                "key": "Access-Token",
                                "value": "{{store_token}}"
                            },
                            {
                                "key": "Platform",
                                "value": "POC"
                            },
                            {
                                "key": "X-Pilot-Scenario",
                                "value": "PILOT_CS_CLI_STORE_WXAPP_EXAMINE"
                            }
                        ]
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test('HTTP传输200',function(){pm.response.to.have.status(200);});",
                                    "pm.test('JSON响应可解析',function(){pm.response.to.be.json;});var b=pm.response.json();",
                                    "pm.test('业务码数字200',function(){pm.expect(b.status).to.eql(200);});",
                                    "pm.test('动态trace为13位十六进制',function(){pm.expect(b.trace_id).to.match(/^[0-9a-f]{13}$/);});",
                                    "function eq(a,b){if(a===null||b===null)return a===b;if(typeof a!==typeof b||Array.isArray(a)!==Array.isArray(b))return false;if(typeof a!=='object')return a===b;var ak=Object.keys(a),bk=Object.keys(b);if(ak.length!==bk.length)return false;if(Array.isArray(a))return ak.every(function(k){return eq(a[k],b[k]);});return ak.every(function(k){return Object.prototype.hasOwnProperty.call(b,k)&&eq(a[k],b[k]);});}",
                                    "pm.test('完整原表投影值类型容器及数组次序',function(){pm.expect(eq(b.data,{\"detail\":{\"switch\":0,\"version\":\"CDXCS10B4C8_VERSION\",\"versions\":[\"CDXCS10B4C8_3\"],\"platforms\":[],\"expire_time\":0,\"trial_show_info\":0,\"aifaceview\":\"\",\"aifaceset\":\"\",\"apifacedefault\":\"\",\"withdrawRecord\":\"\",\"details\":\"\",\"recharge\":\"\",\"orderDetail\":\"\"},\"domain\":\"store.client-settings.invalid\"})).to.eql(true);});",
                                    "pm.test('审核开关保持数字0且版本数组',function(){pm.expect(b.data.detail.switch).to.eql(0);pm.expect(Array.isArray(b.data.detail.versions)).to.eql(true);});"
                                ]
                            }
                        }
                    ]
                },
                {
                    "id": "PILOT_CS_CLI_TERMINAL_H5_BASIC",
                    "name": "terminal h5 basic 真实留存配置只读回归",
                    "type": "http",
                    "metaInfo": {
                        "type": "HTTP"
                    },
                    "request": {
                        "method": "GET",
                        "url": "{{base_url}}/terminal/client.h5.setting/detail?key=basic",
                        "header": [
                            {
                                "key": "Host",
                                "value": "terminal.client-settings.invalid"
                            },
                            {
                                "key": "Access-Token",
                                "value": "{{terminal_token}}"
                            },
                            {
                                "key": "Platform",
                                "value": "POC"
                            },
                            {
                                "key": "X-Pilot-Scenario",
                                "value": "PILOT_CS_CLI_TERMINAL_H5_BASIC"
                            }
                        ]
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test('HTTP传输200',function(){pm.response.to.have.status(200);});",
                                    "pm.test('JSON响应可解析',function(){pm.response.to.be.json;});var b=pm.response.json();",
                                    "pm.test('业务码数字200',function(){pm.expect(b.status).to.eql(200);});",
                                    "pm.test('动态trace为13位十六进制',function(){pm.expect(b.trace_id).to.match(/^[0-9a-f]{13}$/);});",
                                    "function eq(a,b){if(a===null||b===null)return a===b;if(typeof a!==typeof b||Array.isArray(a)!==Array.isArray(b))return false;if(typeof a!=='object')return a===b;var ak=Object.keys(a),bk=Object.keys(b);if(ak.length!==bk.length)return false;if(Array.isArray(a))return ak.every(function(k){return eq(a[k],b[k]);});return ak.every(function(k){return Object.prototype.hasOwnProperty.call(b,k)&&eq(a[k],b[k]);});}",
                                    "pm.test('完整原表投影值类型容器及数组次序',function(){pm.expect(eq(b.data,{\"detail\":{\"enabled\":false,\"baseUrl\":\"https://cdxcs10b4c8-T.invalid/retained/\"}})).to.eql(true);});",
                                    "pm.test('留存配置明确关闭且布尔类型',function(){pm.expect(b.data.detail.enabled).to.eql(false);});"
                                ]
                            }
                        }
                    ]
                },
                {
                    "id": "PILOT_CS_CLI_TERMINAL_WXAPP_BASIC",
                    "name": "terminal wxapp basic 真实留存配置只读回归",
                    "type": "http",
                    "metaInfo": {
                        "type": "HTTP"
                    },
                    "request": {
                        "method": "GET",
                        "url": "{{base_url}}/terminal/client.wxapp.setting/detail?key=basic",
                        "header": [
                            {
                                "key": "Host",
                                "value": "terminal.client-settings.invalid"
                            },
                            {
                                "key": "Access-Token",
                                "value": "{{terminal_token}}"
                            },
                            {
                                "key": "Platform",
                                "value": "POC"
                            },
                            {
                                "key": "X-Pilot-Scenario",
                                "value": "PILOT_CS_CLI_TERMINAL_WXAPP_BASIC"
                            }
                        ]
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test('HTTP传输200',function(){pm.response.to.have.status(200);});",
                                    "pm.test('JSON响应可解析',function(){pm.response.to.be.json;});var b=pm.response.json();",
                                    "pm.test('业务码数字200',function(){pm.expect(b.status).to.eql(200);});",
                                    "pm.test('动态trace为13位十六进制',function(){pm.expect(b.trace_id).to.match(/^[0-9a-f]{13}$/);});",
                                    "function eq(a,b){if(a===null||b===null)return a===b;if(typeof a!==typeof b||Array.isArray(a)!==Array.isArray(b))return false;if(typeof a!=='object')return a===b;var ak=Object.keys(a),bk=Object.keys(b);if(ak.length!==bk.length)return false;if(Array.isArray(a))return ak.every(function(k){return eq(a[k],b[k]);});return ak.every(function(k){return Object.prototype.hasOwnProperty.call(b,k)&&eq(a[k],b[k]);});}",
                                    "pm.test('完整原表投影值类型容器及数组次序',function(){pm.expect(eq(b.data,{\"detail\":{\"enabled\":false,\"app_id\":\"NOT_A_REAL_APPID_CDXCS10B4C8_T_CHANGED\",\"app_secret\":\"NOT_A_REAL_SECRET_CDXCS10B4C8_T_RETAINED\"},\"domain\":\"terminal.client-settings.invalid\"})).to.eql(true);});",
                                    "pm.test('留存配置明确关闭且布尔类型',function(){pm.expect(b.data.detail.enabled).to.eql(false);});"
                                ]
                            }
                        }
                    ]
                },
                {
                    "id": "PILOT_CS_CLI_TERMINAL_WXAPP_EXAMINE",
                    "name": "terminal wxapp examine 真实留存配置只读回归",
                    "type": "http",
                    "metaInfo": {
                        "type": "HTTP"
                    },
                    "request": {
                        "method": "GET",
                        "url": "{{base_url}}/terminal/client.wxapp.setting/detail?key=examine",
                        "header": [
                            {
                                "key": "Host",
                                "value": "terminal.client-settings.invalid"
                            },
                            {
                                "key": "Access-Token",
                                "value": "{{terminal_token}}"
                            },
                            {
                                "key": "Platform",
                                "value": "POC"
                            },
                            {
                                "key": "X-Pilot-Scenario",
                                "value": "PILOT_CS_CLI_TERMINAL_WXAPP_EXAMINE"
                            }
                        ]
                    },
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "pm.test('HTTP传输200',function(){pm.response.to.have.status(200);});",
                                    "pm.test('JSON响应可解析',function(){pm.response.to.be.json;});var b=pm.response.json();",
                                    "pm.test('业务码数字200',function(){pm.expect(b.status).to.eql(200);});",
                                    "pm.test('动态trace为13位十六进制',function(){pm.expect(b.trace_id).to.match(/^[0-9a-f]{13}$/);});",
                                    "function eq(a,b){if(a===null||b===null)return a===b;if(typeof a!==typeof b||Array.isArray(a)!==Array.isArray(b))return false;if(typeof a!=='object')return a===b;var ak=Object.keys(a),bk=Object.keys(b);if(ak.length!==bk.length)return false;if(Array.isArray(a))return ak.every(function(k){return eq(a[k],b[k]);});return ak.every(function(k){return Object.prototype.hasOwnProperty.call(b,k)&&eq(a[k],b[k]);});}",
                                    "pm.test('完整原表投影值类型容器及数组次序',function(){pm.expect(eq(b.data,{\"detail\":{\"switch\":0,\"version\":\"CDXCS10B4C8_VERSION\",\"versions\":[\"CDXCS10B4C8_3\"],\"platforms\":[],\"expire_time\":0,\"trial_show_info\":0,\"aifaceview\":\"\",\"aifaceset\":\"\",\"apifacedefault\":\"\",\"withdrawRecord\":\"\",\"details\":\"\",\"recharge\":\"\",\"orderDetail\":\"\"},\"domain\":\"terminal.client-settings.invalid\"})).to.eql(true);});",
                                    "pm.test('审核开关保持数字0且版本数组',function(){pm.expect(b.data.detail.switch).to.eql(0);pm.expect(Array.isArray(b.data.detail.versions)).to.eql(true);});"
                                ]
                            }
                        }
                    ]
                }
            ]
        }
    ]
}