UNPKG

@serenity-js/core

Version:

The core Serenity/JS framework, providing the Screenplay Pattern interfaces, as well as the test reporting and integration infrastructure

38 lines 1.74 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ActivityRelatedArtifactArchived = void 0; const tiny_types_1 = require("tiny-types"); const io_1 = require("../io"); const model_1 = require("../model"); const screenplay_1 = require("../screenplay"); const ArtifactArchived_1 = require("./ArtifactArchived"); // todo: there should be two types of events here: // - ActivityArtifactGenerated // - SceneArtifactGenerated /** * @group Events */ class ActivityRelatedArtifactArchived extends ArtifactArchived_1.ArtifactArchived { activityId; static fromJSON(o) { return new ActivityRelatedArtifactArchived(model_1.CorrelationId.fromJSON(o.sceneId), model_1.CorrelationId.fromJSON(o.activityId), model_1.Name.fromJSON(o.name), model_1.Artifact.ofType(o.type), io_1.Path.fromJSON(o.path), screenplay_1.Timestamp.fromJSON(o.artifactTimestamp), screenplay_1.Timestamp.fromJSON(o.timestamp)); } constructor(sceneId, activityId, name, type, path, artifactTimestamp, timestamp) { super(sceneId, name, type, path, artifactTimestamp, timestamp); this.activityId = activityId; (0, tiny_types_1.ensure)('activityId', activityId, (0, tiny_types_1.isDefined)()); } toJSON() { return { sceneId: this.sceneId.toJSON(), activityId: this.activityId.toJSON(), name: this.name.toJSON(), type: this.type.name, path: this.path.toJSON(), artifactTimestamp: this.artifactTimestamp.toJSON(), timestamp: this.timestamp.toJSON(), }; } } exports.ActivityRelatedArtifactArchived = ActivityRelatedArtifactArchived; //# sourceMappingURL=ActivityRelatedArtifactArchived.js.map