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.8 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ActivityRelatedArtifactArchived = void 0; const tiny_types_1 = require("tiny-types"); const index_js_1 = require("../io/index.js"); const index_js_2 = require("../model/index.js"); const index_js_3 = require("../screenplay/index.js"); const ArtifactArchived_js_1 = require("./ArtifactArchived.js"); // todo: there should be two types of events here: // - ActivityArtifactGenerated // - SceneArtifactGenerated /** * @group Events */ class ActivityRelatedArtifactArchived extends ArtifactArchived_js_1.ArtifactArchived { activityId; static fromJSON(o) { return new ActivityRelatedArtifactArchived(index_js_2.CorrelationId.fromJSON(o.sceneId), index_js_2.CorrelationId.fromJSON(o.activityId), index_js_2.Name.fromJSON(o.name), index_js_2.Artifact.ofType(o.type), index_js_1.Path.fromJSON(o.path), index_js_3.Timestamp.fromJSON(o.artifactTimestamp), index_js_3.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