Files
Autonomous-Bug-Explorer/src/modules/findings/domain/value-objects/Evidence.ts
debian d62bd615bf
Some checks failed
ABE Exploratory Testing / explore (push) Has been cancelled
fase(5): findings module complete
2026-03-05 04:06:45 -05:00

34 lines
1007 B
TypeScript

import { ValueObject } from '../../../../shared/domain/ValueObject';
import { IHttpResponse } from '../../../../core/interfaces';
interface EvidenceProps {
screenshotPath?: string;
domSnapshotPath?: string;
httpLog?: IHttpResponse[];
rawErrors?: string[];
}
export class Evidence extends ValueObject<EvidenceProps> {
static create(props: EvidenceProps): Evidence {
return new Evidence(props);
}
static empty(): Evidence {
return new Evidence({});
}
get screenshotPath(): string | undefined { return this.props.screenshotPath; }
get domSnapshotPath(): string | undefined { return this.props.domSnapshotPath; }
get httpLog(): IHttpResponse[] { return this.props.httpLog ?? []; }
get rawErrors(): string[] { return this.props.rawErrors ?? []; }
toJSON(): EvidenceProps {
return {
screenshotPath: this.props.screenshotPath,
domSnapshotPath: this.props.domSnapshotPath,
httpLog: this.props.httpLog,
rawErrors: this.props.rawErrors,
};
}
}