How to use the @serenity-js/core.serenity.notify function in @serenity-js/core

To help you get started, we’ve selected a few @serenity-js/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jan-molak / serenity-js / packages / cucumber / src / listener.ts View on Github external
listener.handleStepResultEvent = function(result: Cucumber.events.StepResultPayload, callback: () => void) {
    const step = result.getStep();

    // "before" and "after" steps emit an event even if the keywords themselves are not present in the scenario...
    if (!step.isHidden()) {
        serenity.notify(new ActivityFinished(outcome(activityFrom(step), result.getStatus(), errorIfPresentIn(result))));
    }

    callback();
};
github jan-molak / serenity-js / packages / serenity-js / src / serenity-cucumber / cucumber_serenity_notifier.ts View on Github external
function handleStepResultEvent(result: cucumber.events.StepResultPayload, callback: () => void) {

    const step = result.getStep();

    // "before" and "after" steps emit an event even if they keywords themselves are not present in the test...
    if (!step.isHidden()) {
        serenity.notify(new ActivityFinished(outcome(activityFrom(step), result.getStatus(), result.getFailureException())));
    }

    callback();
}
github jan-molak / serenity-js / packages / serenity-js / src / serenity-mocha / mocha_test_framework.ts View on Github external
mochaRunner.on('test end', (scenario: ExecutedScenario) => {
                if (isPending(scenario)) {
                    serenity.notify(startOf(scenario));
                }

                serenity.notify(endOf(scenario));
            });
        });
github jan-molak / serenity-js / packages / serenity-js / src / serenity-mocha / mocha_test_framework.ts View on Github external
mochaRunner.on('test end', (scenario: ExecutedScenario) => {
                if (isPending(scenario)) {
                    serenity.notify(startOf(scenario));
                }

                serenity.notify(endOf(scenario));
            });
        });
github jan-molak / serenity-js / packages / serenity-js / src / serenity-cucumber / cucumber_serenity_notifier.ts View on Github external
function handleBeforeStepEvent(step: cucumber.events.StepPayload, callback: () => void) {

    if (! step.isHidden()) {
        serenity.notify(new ActivityStarts(activityFrom(step)));
    }

    callback();
}
github jan-molak / serenity-js / packages / serenity-js / src / serenity-cucumber / cucumber_serenity_notifier.ts View on Github external
function handleBeforeScenarioEvent(scenario: cucumber.events.ScenarioPayload, callback: () => void) {

    serenity.notify(new SceneStarts(sceneFrom(scenario)));

    callback();
}
github jan-molak / serenity-js / packages / serenity-js / src / serenity-cucumber / cucumber_serenity_notifier.ts View on Github external
function handleScenarioResultEvent(result: cucumber.events.ScenarioResultPayload, callback: () => void) {

    const scenario = result.getScenario();

    serenity.notify(new SceneFinished(outcome(sceneFrom(scenario), result.getStatus(), result.getFailureException())));

    callback();
}
github jan-molak / serenity-js / packages / cucumber / src / listener.ts View on Github external
listener.handleBeforeScenarioEvent = function(scenario: Cucumber.events.ScenarioPayload, callback: Callback) {
    serenity.notify(new SceneStarts(sceneFrom(scenario)));

    callback();
};
github jan-molak / serenity-js / packages / cucumber / src / listener.ts View on Github external
listener.handleScenarioResultEvent = function(result: Cucumber.events.ScenarioResultPayload, callback: () => void) {
    const scenario = result.getScenario();

    serenity.notify(new SceneFinished(outcome(sceneFrom(scenario), result.getStatus(), errorIfPresentIn(result))));

    callback();
};
github jan-molak / serenity-js / packages / cucumber-2 / src / notifier.ts View on Github external
handleBeforeStep = (step: Step) =>
        this.isOfInterest(step) && serenity.notify(new ActivityStarts(CucumberTask.from(step)));