How to use the @serenity-js/core/lib/model.FeatureTag 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 / notifier / Notifier.ts View on Github external
private scenarioHierarchyTagsFor(feature: Feature): Tag[] {
        const
            directories     = notEmpty(feature.location.path.directory().split()),
            featuresIndex   = directories.indexOf('features'),
            hierarchy       = [ ...directories.slice(featuresIndex + 1), feature.name.value ] as string[];

        const [ featureName, capabilityName, themeName ]: string[] = hierarchy.reverse();

        return notEmpty([
            themeName       && new ThemeTag(themeName),
            capabilityName  && new CapabilityTag(capabilityName),
            feature         && new FeatureTag(featureName),
        ]);
    }
github jan-molak / serenity-js / packages / jasmine / src / SerenityReporterForJasmine.ts View on Github external
specStarted(result: SpecResult) {
        const details = this.scenarioDetailsOf(result);

        this.emit(
            new SceneStarts(details, this.serenity.currentTime()),
            new SceneTagged(details, new FeatureTag(this.currentFeatureName()), this.serenity.currentTime()),
            new TestRunnerDetected(new Name('Jasmine'), this.serenity.currentTime()),
        );
    }
github jan-molak / serenity-js / integration / cucumber / spec / tags.spec.ts View on Github external
                .next(SceneTagged,  event => expect(event.tag).to.equal(new FeatureTag('Serenity/JS recognises tags at multiple levels')))
                .next(SceneTagged,  event => expect(event.tag).to.equal(new ArbitraryTag('feature-tag')))
github jan-molak / serenity-js / integration / cucumber / spec / assertion_failure_scenario.spec.ts View on Github external
                .next(SceneTagged,         event => expect(event.tag).to.equal(new FeatureTag('Serenity/JS recognises a scenario failing due to an assertion error')))
                .next(ActivityStarts,      event => expect(event.value.name).to.equal(new Name('Given a step that fails with assertion error')))
github jan-molak / serenity-js / integration / cucumber / spec / failing_scenario.spec.ts View on Github external
                .next(SceneTagged,         event => expect(event.tag).to.equal(new FeatureTag('Serenity/JS recognises a failing scenario')))
                .next(ActivityStarts,      event => expect(event.value.name).to.equal(new Name('Given a step that fails with generic error')))
github jan-molak / serenity-js / integration / cucumber / spec / capabilities.spec.ts View on Github external
                .next(SceneTagged,         event => expect(event.tag).to.equal(new FeatureTag('Serenity/JS recognises capabilities')))
            ;
github jan-molak / serenity-js / integration / jasmine / spec / custom_reporter.spec.ts View on Github external
                    .next(SceneTagged,          event => expect(event.tag).to.equal(new FeatureTag(`focused suite, excludes other suites and specs`)))
                    .next(SceneFinished,        event => expect(event.outcome).to.be.instanceof(ImplementationPending))
github jan-molak / serenity-js / integration / cucumber / spec / themes.spec.ts View on Github external
                .next(SceneTagged,  event => expect(event.tag).to.equal(new FeatureTag('Serenity/JS recognises capabilities and themes')))
            ;
github jan-molak / serenity-js / integration / jasmine / spec / custom_reporter.spec.ts View on Github external
                    .next(SceneTagged,          event => expect(event.tag).to.equal(new FeatureTag('a suite')))
                    .next(TestRunnerDetected,   event => expect(event.value).to.equal(new Name('Jasmine')))