ng-apimock
ng-apimock copied to clipboard
ng-apimock using default mock on app launch
When using ng-apimock to mock scenarios for an angular application, it keeps returning the default scenario on app launch when I set the scenario then launch the app:
loginPage.selectScenario('terms-and-conditions-get-request', 'terms-and-conditions-not-accepted');
loginPage.navigateToBaseUrl();
loginPage.loginButton().click();
The following gives me the expected results:
loginPage.navigateToBaseUrl();
loginPage.selectScenario('terms-and-conditions-get-request','terms-and-conditions-not-accepted');
loginPage.navigateToBaseUrl();
loginPage.loginButton().click();
If I set the default to false for both possible scenarios, then it works without needing to navigate to the URL first. Is there a way to tell it to not use the default without needing to relaunch the app before setting the scenario and then again after?