mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-02 07:01:30 -08:00
wip: fixed types, added comments
This commit is contained in:
parent
81ec605caf
commit
ebfd89d519
|
@ -15,6 +15,13 @@ import { WorkflowEntity } from '@/databases/entities/workflow-entity';
|
|||
|
||||
import { WithTimestamps } from './abstract-entity';
|
||||
|
||||
/**
|
||||
* Entity representing a Test
|
||||
* It combines:
|
||||
* - the workflow under test
|
||||
* - the workflow used to evaluate the results of test execution
|
||||
* - the filter used to select test cases from previous executions of the workflow under test - annotation tag
|
||||
*/
|
||||
@Entity()
|
||||
@Index(['workflow'])
|
||||
@Index(['evaluationWorkflow'])
|
||||
|
@ -28,17 +35,27 @@ export class TestEntity extends WithTimestamps {
|
|||
name: string;
|
||||
|
||||
@RelationId((test: TestEntity) => test.workflow)
|
||||
workflowId: number;
|
||||
workflowId: string;
|
||||
|
||||
/**
|
||||
* Relation to the workflow under test
|
||||
*/
|
||||
@ManyToOne('WorkflowEntity', 'tests')
|
||||
workflow: WorkflowEntity;
|
||||
|
||||
@RelationId((test: TestEntity) => test.evaluationWorkflow)
|
||||
evaluationWorkflowId: number;
|
||||
evaluationWorkflowId: string;
|
||||
|
||||
/**
|
||||
* Relation to the workflow used to evaluate the results of test execution
|
||||
*/
|
||||
@ManyToOne('WorkflowEntity', 'evaluationTests')
|
||||
evaluationWorkflow: WorkflowEntity;
|
||||
|
||||
/**
|
||||
* Relation to the annotation tag associated with the test
|
||||
* This tag will be used to select the test cases to run from previous executions
|
||||
*/
|
||||
@OneToOne('AnnotationTagEntity', 'test')
|
||||
annotationTag: AnnotationTagEntity;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue