import helper from '../../helper' ; import Registry from '../../../registry' ; import UpdateMockHandler from '../updateMockHandler' ; /** Handler that takes care of updating the mock configuration for protractor. */ class ProtractorUpdateMockHandler extends UpdateMockHandler { inheritDoc handlePassThroughScenario ( registry , identifier , ngApimockId ) { helper . protractor . addSessionIfNonExisting ( registry , ngApimockId ) ; delete registry . sessions [ ngApimockId ] . selections [ identifier ] ; } inheritDoc handleScenarioSelection ( registry , identifier , scenario , ngApimockId ) { helper . protractor . addSessionIfNonExisting ( registry , ngApimockId ) ; registry . sessions [ ngApimockId ] . selections [ identifier ] = scenario ; } inheritDoc handleDelay ( registry , identifier , delay , ngApimockId ? ) { helper . protractor . addSessionIfNonExisting ( registry , ngApimockId ) ; registry . sessions [ ngApimockId ] . delays [ identifier ] = delay ; } inheritDoc handleEcho ( registry , identifier , echo , ngApimockId ? ) { helper . protractor . addSessionIfNonExisting ( registry , ngApimockId ) ; registry . sessions [ ngApimockId ] . echos [ identifier ] = echo ; } } export default ProtractorUpdateMockHandler ;