How to use the @serenity-js/core/lib/events.SceneTagged 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 / serenity-bdd / spec / stage / crew / serenity-bdd-reporter / SerenityBDDReporter / tagging_scenarios.spec.ts View on Github external
it('indicates the operating system where the test was executed', () => {
                        given(reporter).isNotifiedOfFollowingEvents(
                            new SceneTagged(defaultCardScenario, new ContextTag('iphone')),
                            new SceneFinished(defaultCardScenario, new ExecutionSuccessful()),
                            new TestRunFinished(),
                        );

                        report = stageManager.notifyOf.firstCall.lastArg.artifact.map(_ => _);

                        expect(report.context).to.equal('iphone');

                        expect(report.tags).to.deep.include.members([{
                            name: 'iphone',
                            type: 'context',
                        }]);
                    });
github jan-molak / serenity-js / packages / serenity-bdd / spec / stage / crew / serenity-bdd-reporter / SerenityBDDReporter / tagging_scenarios.spec.ts View on Github external
it('ensures that the user-specified context takes precedence over browser context', () => {
                        given(reporter).isNotifiedOfFollowingEvents(
                            new SceneTagged(defaultCardScenario, new BrowserTag('safari')),
                            new SceneTagged(defaultCardScenario, new ContextTag('iphone')),
                            new SceneFinished(defaultCardScenario, new ExecutionSuccessful()),
                            new TestRunFinished(),
                        );

                        report = stageManager.notifyOf.firstCall.lastArg.artifact.map(_ => _);

                        expect(report.context).to.equal('iphone');

                        expect(report.tags).to.deep.include.members([{
                            name: 'safari',
                            type: 'browser',
                        }, {
                            name: 'iphone',
                            type: 'context',
                        }]);
github jan-molak / serenity-js / packages / serenity-bdd / spec / stage / crew / serenity-bdd-reporter / SerenityBDDReporter / tagging_scenarios.spec.ts View on Github external
it('belongs to a theme', () => {
                    given(reporter).isNotifiedOfFollowingEvents(
                        new SceneTagged(defaultCardScenario, new ThemeTag('Digital')),
                        new SceneTagged(defaultCardScenario, new CapabilityTag('E-Commerce')),
                        new SceneTagged(defaultCardScenario, new FeatureTag('Checkout')),
                        new SceneFinished(defaultCardScenario, new ExecutionSuccessful()),
                        new TestRunFinished(),
                    );

                    report = stageManager.notifyOf.firstCall.lastArg.artifact.map(_ => _);

                    expect(report.tags).to.deep.include.members([{
                        name: 'Digital',
                        type: 'theme',
                    }, {
                        name: 'Digital/E-Commerce',
                        type: 'capability',
                    }, {
                        name: 'Digital/E-Commerce/Checkout',
                        type: 'feature',
                    }]);
github jan-molak / serenity-js / packages / serenity-bdd / spec / stage / crew / serenity-bdd-reporter / SerenityBDDReporter / tagging_scenarios.spec.ts View on Github external
it('belongs to a capability', () => {
                    given(reporter).isNotifiedOfFollowingEvents(
                        new SceneTagged(defaultCardScenario, new CapabilityTag('E-Commerce')),
                        new SceneTagged(defaultCardScenario, new FeatureTag('Checkout')),
                        new SceneFinished(defaultCardScenario, new ExecutionSuccessful()),
                        new TestRunFinished(),
                    );

                    report = stageManager.notifyOf.firstCall.lastArg.artifact.map(_ => _);

                    expect(report.tags).to.deep.include.members([{
                        name: 'E-Commerce',
                        type: 'capability',
                    }, {
                        name: 'E-Commerce/Checkout',
                        type: 'feature',
                    }]);

                    expect(report.featureTag).to.deep.equal({
github jan-molak / serenity-js / packages / serenity-bdd / spec / stage / crew / serenity-bdd-reporter / SerenityBDDReporter / tagging_scenarios.spec.ts View on Github external
it('belongs to a theme', () => {
                    given(reporter).isNotifiedOfFollowingEvents(
                        new SceneTagged(defaultCardScenario, new ThemeTag('Digital')),
                        new SceneTagged(defaultCardScenario, new CapabilityTag('E-Commerce')),
                        new SceneTagged(defaultCardScenario, new FeatureTag('Checkout')),
                        new SceneFinished(defaultCardScenario, new ExecutionSuccessful()),
                        new TestRunFinished(),
                    );

                    report = stageManager.notifyOf.firstCall.lastArg.artifact.map(_ => _);

                    expect(report.tags).to.deep.include.members([{
                        name: 'Digital',
                        type: 'theme',
                    }, {
                        name: 'Digital/E-Commerce',
                        type: 'capability',
                    }, {
                        name: 'Digital/E-Commerce/Checkout',
                        type: 'feature',
github jan-molak / serenity-js / packages / serenity-bdd / spec / stage / crew / serenity-bdd-reporter / SerenityBDDReporter / tagging_scenarios.spec.ts View on Github external
it('can be tagged with an issue number', () => {
                    given(reporter).isNotifiedOfFollowingEvents(
                        new SceneTagged(defaultCardScenario, new IssueTag('ABC-1234')),
                        new SceneTagged(defaultCardScenario, new IssueTag('DEF-5678')),
                        new SceneFinished(defaultCardScenario, new ExecutionSuccessful()),
                        new TestRunFinished(),
                    );

                    report = stageManager.notifyOf.firstCall.lastArg.artifact.map(_ => _);

                    expect(report.tags).to.deep.include.members([{
                        name: 'ABC-1234',
                        type: 'issue',
                    }, {
                        name: 'DEF-5678',
                        type: 'issue',
                    }]);

                    expect(report.issues).to.deep.equal([
                        'ABC-1234',
github jan-molak / serenity-js / packages / serenity-bdd / spec / stage / crew / serenity-bdd-reporter / SerenityBDDReporter / tagging_scenarios.spec.ts View on Github external
it('can be optionally tagged map manual', () => {
                    given(reporter).isNotifiedOfFollowingEvents(
                        new SceneTagged(defaultCardScenario, new ManualTag()),
                        new SceneFinished(defaultCardScenario, new ExecutionSuccessful()),
                        new TestRunFinished(),
                    );

                    report = stageManager.notifyOf.firstCall.lastArg.artifact.map(_ => _);

                    expect(report.manual).to.equal(true);
                    expect(report.tags).to.deep.include.members([{
                        name: 'Manual',
                        type: 'External Tests',
                    }]);
                });
            });
github jan-molak / serenity-js / packages / serenity-bdd / spec / stage / crew / serenity-bdd-reporter / SerenityBDDReporter / tagging_scenarios.spec.ts View on Github external
it('can be tagged with an arbitrary tag', () => {
                    given(reporter).isNotifiedOfFollowingEvents(
                        new SceneTagged(defaultCardScenario, new ArbitraryTag('regression')),
                        new SceneFinished(defaultCardScenario, new ExecutionSuccessful()),
                        new TestRunFinished(),
                    );

                    report = stageManager.notifyOf.firstCall.lastArg.artifact.map(_ => _);

                    expect(report.tags).to.deep.include.members([{
                        name: 'regression',
                        type: 'tag',
                    }]);
                });
            });
github jan-molak / serenity-js / packages / serenity-bdd / spec / stage / crew / serenity-bdd-reporter / SerenityBDDReporter / tagging_scenarios.spec.ts View on Github external
it('ensures that the user-specified context takes precedence over browser context', () => {
                        given(reporter).isNotifiedOfFollowingEvents(
                            new SceneTagged(defaultCardScenario, new BrowserTag('safari')),
                            new SceneTagged(defaultCardScenario, new ContextTag('iphone')),
                            new SceneFinished(defaultCardScenario, new ExecutionSuccessful()),
                            new TestRunFinished(),
                        );

                        report = stageManager.notifyOf.firstCall.lastArg.artifact.map(_ => _);

                        expect(report.context).to.equal('iphone');

                        expect(report.tags).to.deep.include.members([{
                            name: 'safari',
                            type: 'browser',
                        }, {
                            name: 'iphone',
                            type: 'context',
                        }]);
                    });
github jan-molak / serenity-js / packages / cucumber / src / notifier / Notifier.ts View on Github external
            ...this.scenarioHierarchyTagsFor(feature).map(tag => new SceneTagged(details, tag)),
            !! scenario.description && new SceneDescriptionDetected(scenario.description),