mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -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';
|
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()
|
@Entity()
|
||||||
@Index(['workflow'])
|
@Index(['workflow'])
|
||||||
@Index(['evaluationWorkflow'])
|
@Index(['evaluationWorkflow'])
|
||||||
|
@ -28,17 +35,27 @@ export class TestEntity extends WithTimestamps {
|
||||||
name: string;
|
name: string;
|
||||||
|
|
||||||
@RelationId((test: TestEntity) => test.workflow)
|
@RelationId((test: TestEntity) => test.workflow)
|
||||||
workflowId: number;
|
workflowId: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Relation to the workflow under test
|
||||||
|
*/
|
||||||
@ManyToOne('WorkflowEntity', 'tests')
|
@ManyToOne('WorkflowEntity', 'tests')
|
||||||
workflow: WorkflowEntity;
|
workflow: WorkflowEntity;
|
||||||
|
|
||||||
@RelationId((test: TestEntity) => test.evaluationWorkflow)
|
@RelationId((test: TestEntity) => test.evaluationWorkflow)
|
||||||
evaluationWorkflowId: number;
|
evaluationWorkflowId: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Relation to the workflow used to evaluate the results of test execution
|
||||||
|
*/
|
||||||
@ManyToOne('WorkflowEntity', 'evaluationTests')
|
@ManyToOne('WorkflowEntity', 'evaluationTests')
|
||||||
evaluationWorkflow: WorkflowEntity;
|
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')
|
@OneToOne('AnnotationTagEntity', 'test')
|
||||||
annotationTag: AnnotationTagEntity;
|
annotationTag: AnnotationTagEntity;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue