diff --git a/lib/runner/extensions/item.command.js b/lib/runner/extensions/item.command.js index 5820b280a..292ffc3e3 100644 --- a/lib/runner/extensions/item.command.js +++ b/lib/runner/extensions/item.command.js @@ -188,8 +188,7 @@ module.exports = { var request = result.request, response = result.response, - cookies = result.cookies, - auth = result.item.getAuth(); + cookies = result.cookies; if ((stopOnError || stopOnFailure) && requestError) { this.triggers.item(null, coords, item); // @todo - should this trigger receive error? @@ -212,11 +211,6 @@ module.exports = { // set cookies for this transaction cookies && (ctxTemplate.cookies = cookies); - // update the item auth to prevent loss of auth state - // @note this is a hack because the auth architecture is messy, and there is some confusion - // between `originalItem` and `item`. - auth && (item.auth = auth); - // the context template also has a test object to store assertions ctxTemplate.tests = {}; // @todo remove diff --git a/lib/runner/replay-controller.js b/lib/runner/replay-controller.js index 294dc1a09..24cb4030f 100644 --- a/lib/runner/replay-controller.js +++ b/lib/runner/replay-controller.js @@ -1,5 +1,4 @@ var _ = require('lodash'), - createItemContext = require('./create-item-context'), // total number of replays allowed MAX_REPLAY_COUNT = 3, @@ -51,8 +50,7 @@ _.assign(ReplayController.prototype, /** @lends ReplayController.prototype */{ abortOnError: true }, desiredPayload); - // create item context from the new item - payload.context = createItemContext(payload, context); + payload.context = context; this.run.immediate('httprequest', payload) .done(function (response) {