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

Feature: update scenarios in Protractor with 1 call #15

Open
wswebcreation opened this issue Jun 21, 2017 · 0 comments
Open

Feature: update scenarios in Protractor with 1 call #15

wswebcreation opened this issue Jun 21, 2017 · 0 comments
Labels

Comments

@wswebcreation
Copy link
Collaborator

Current:
When ng-apimock is used within protractor tests and multiple scenario's need to be selected multiple calls to ngApimock.selectScenario('mock.name', 'mock.scenario') need to be created

Desired situation:
It would be nice that there is a new method called for example selectMultipleScenario(object) that can do something like this (this is how we implemented it in our project)

interface Mocking {
    name: string;
    scenario: string;;
}

export interface MockingData extends Array<Mocking> {
}

/**
 * Load provided Mockdata in ng-Apimock
 */
export async function loadMockdata(mockData: MockingData) {
    for (let mock of mockData) {
        await ngApimock.selectScenario(mock.name, mock.scenario);
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant