diff --git a/packages/cypress-commands/src/setups/enableNetworkShim/utils.js b/packages/cypress-commands/src/setups/enableNetworkShim/utils.js index 3012fe13..2ef5f91b 100644 --- a/packages/cypress-commands/src/setups/enableNetworkShim/utils.js +++ b/packages/cypress-commands/src/setups/enableNetworkShim/utils.js @@ -13,13 +13,7 @@ export const splitHostAndPath = (url, hosts) => { } export const getFeatureName = () => { - let obj = Cypress.mocha.getRunner().suite.ctx.test - let title = null - while (obj && obj.parent && obj.parent.title) { - obj = obj.parent - title = obj.title - } - return title + return Cypress.currentTest.titlePath[0] } export const toJsonBlob = async input => {