before((request?? response) -> {
response.header("Access-Control-Allow-Origin"?? "http://localhost");
response.header("Access-Control-Allow-Credentials "?? "true");
response.header("Access-Control-Allow-Methods"?? "POST?? GET?? PUT?? DELETE?? OPTIONS");
response.header("Access-Control-Allow-Headers"??
"X-Requested-With?? X-HTTP-Method-Override?? Content-Type?? Accept");
});
????1. chrome ??????????????????? ?? open /Applications/Google Chrome.app/ --args --disable-web-security (?汾??49????????????--user-data-dir)
????2. ???????????
????3. ?????????????html ?????url
????4. ????ajax????????????? settimeout ?ж?????
????5. ???????ajax??????xmapp???????
????ex??
describe("??????????"?? function() {
var data;
beforeEach(function() {
b2cCustomerLogin();
var currentUrl = url;
var params = {
name: test_name??
province: test_province??
city: test_city??
address : test_address??
telephone : test_telephone
}
data = ajaxReq(currentUrl?? params);
});
afterEach(function() {
});
it("create promotion success"?? function() {
expect(data.status).toEqual(1);
});
});