Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// there is a difference, so create the actual data as file
// do easier fix the test.
fs.writeFileSync(actualFile, string, "UTF8");
should(string).eql(expected, "HTML File " + name + " is different.");
return cb();
};
process.on("unhandledRejection", (reason, p) => {
console.error("Unhandled Rejection at: Promise", p, "reason:", reason);
console.error(reason.stack);
// application specific logging, throwing an error, or other logic here
});
Browser.extend(function(browser) {
browser.on("request", function (req) {
if (browser.location) {
req.headers.set("Referer", browser.location.href);
}
});
});
exports.nockLoginPage = nockLoginPage;
const TEST_COOKIE_NAME = 'test_cookie',
HTML_DOMAIN_1 = 'test_domain_site1.com',
HTML_DOMAIN_2 = 'test_domain_site2.com',
IFRAME_DOMAIN = 'test_domain_iframe.com',
EXPECTED_UNSET_COOKIE_VAL = 'test1234',
EXPECTED_SET_COOKIE_VAL = 'preset1234',
JS_VAR_EXISTING_VAL = 'existing_cookie_val',
JS_VAR_FINAL_VAL = 'final_cookie_val',
JS_CAPTURED_ERRORS = 'js_errors',
POSTMESSAGE_WAIT_MS = 50;
Browser.localhost(HTML_DOMAIN_1,3005);
Browser.localhost(HTML_DOMAIN_2,3005);
Browser.localhost(IFRAME_DOMAIN,3005);
Browser.extend(function(browser) {
browser.on('console', function(level, message) {
//console.log(message);
});
browser.on('log', function(level, message) {
//console.log(message);
});
});
describe("Iframe shared cookie (http)", function(){
this.timeout(5000);
before(function() {
this.server = app.startHttpApp(3005);
});
after(function(done) {
this.server.close(done);