@@ -358,6 +358,28 @@ func (s *workflowListIntegrationTestSuite) TestList() {
358358 s .Len (workflows , 1 )
359359 })
360360
361+ s .Run ("list workflows with description filter" , func () {
362+ _ , err := s .Workflow .Create (ctx , & biz.WorkflowCreateOpts {OrgID : s .org .ID , Name : "name1" , Project : project , Team : team , Description : description })
363+ require .NoError (s .T (), err )
364+ _ , err = s .Workflow .Create (ctx , & biz.WorkflowCreateOpts {OrgID : s .org .ID , Name : "name2" , Project : project , Team : team , Description : "this is a different description" })
365+ require .NoError (s .T (), err )
366+
367+ workflows , _ , err := s .Workflow .List (ctx , s .org .ID , & biz.WorkflowListOpts {WorkflowDescription : "different" }, nil )
368+ s .NoError (err )
369+ s .Len (workflows , 1 )
370+ })
371+
372+ s .Run ("list workflows with description and workflow name filter" , func () {
373+ _ , err := s .Workflow .Create (ctx , & biz.WorkflowCreateOpts {OrgID : s .org .ID , Name : "name1" , Project : project , Team : team , Description : description })
374+ require .NoError (s .T (), err )
375+ _ , err = s .Workflow .Create (ctx , & biz.WorkflowCreateOpts {OrgID : s .org .ID , Name : "name2" , Project : project , Team : team , Description : "this is a different description for name2" })
376+ require .NoError (s .T (), err )
377+
378+ workflows , _ , err := s .Workflow .List (ctx , s .org .ID , & biz.WorkflowListOpts {WorkflowName : "name2" , WorkflowDescription : "name2" }, nil )
379+ s .NoError (err )
380+ s .Len (workflows , 1 )
381+ })
382+
361383 s .Run ("list workflows with workflow team filter" , func () {
362384 _ , err := s .Workflow .Create (ctx , & biz.WorkflowCreateOpts {OrgID : s .org .ID , Name : "name1" , Project : project , Team : team , Description : description })
363385 require .NoError (s .T (), err )
0 commit comments