Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng-apimock using default mock on app launch #71

Open
rfodge opened this issue Apr 17, 2019 · 0 comments
Open

ng-apimock using default mock on app launch #71

rfodge opened this issue Apr 17, 2019 · 0 comments

Comments

@rfodge
Copy link

rfodge commented Apr 17, 2019

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant