(t *testing.T)
| 167 | } |
| 168 | |
| 169 | func TestTapdBugCustomizeDueDate(t *testing.T) { |
| 170 | var tapd impl.Tapd |
| 171 | dataflowTester := e2ehelper.NewDataFlowTester(t, "tapd", tapd) |
| 172 | |
| 173 | taskData := &tasks.TapdTaskData{ |
| 174 | Options: &tasks.TapdOptions{ |
| 175 | ConnectionId: 1, |
| 176 | WorkspaceId: 991, |
| 177 | ScopeConfig: &models.TapdScopeConfig{ |
| 178 | TypeMappings: map[string]string{ |
| 179 | "BUG": "缺陷", |
| 180 | "TASK": "任务", |
| 181 | }, |
| 182 | StatusMappings: map[string]string{ |
| 183 | "已关闭": "完成", |
| 184 | "接受/处理": "处理中", |
| 185 | }, |
| 186 | BugDueDateField: "custom_field_four", |
| 187 | }, |
| 188 | }, |
| 189 | } |
| 190 | |
| 191 | dataflowTester.FlushTabler(&models.TapdBug{}) |
| 192 | // import raw data table |
| 193 | dataflowTester.ImportCsvIntoRawTable("./raw_tables/_raw_tapd_api_bugs_for_due_date.csv", "_raw_tapd_api_bugs") |
| 194 | dataflowTester.Subtask(tasks.ExtractBugMeta, taskData) |
| 195 | dataflowTester.VerifyTableWithOptions(&models.TapdBug{}, e2ehelper.TableOptions{ |
| 196 | CSVRelPath: "./snapshot_tables/_tool_tapd_bugs_for_due_date.csv", |
| 197 | IgnoreTypes: []interface{}{common.NoPKModel{}}, |
| 198 | }) |
| 199 | |
| 200 | dataflowTester.FlushTabler(&ticket.Issue{}) |
| 201 | dataflowTester.Subtask(tasks.ConvertBugMeta, taskData) |
| 202 | dataflowTester.VerifyTable( |
| 203 | ticket.Issue{}, |
| 204 | "./snapshot_tables/issues_bug_for_due_date.csv", |
| 205 | e2ehelper.ColumnWithRawData( |
| 206 | "id", |
| 207 | "url", |
| 208 | "issue_key", |
| 209 | "title", |
| 210 | "description", |
| 211 | "epic_key", |
| 212 | "type", |
| 213 | "status", |
| 214 | "original_status", |
| 215 | "story_point", |
| 216 | "resolution_date", |
| 217 | "created_date", |
| 218 | "updated_date", |
| 219 | "lead_time_minutes", |
| 220 | "parent_issue_id", |
| 221 | "priority", |
| 222 | "original_estimate_minutes", |
| 223 | "time_spent_minutes", |
| 224 | "time_remaining_minutes", |
| 225 | "creator_id", |
| 226 | "assignee_id", |
nothing calls this directly
no test coverage detected