Trying to fix tests, but failing
Some checks failed
continuous-integration/drone/pr Build is failing

This commit is contained in:
Christoph Ritzer 2024-03-03 04:49:33 +01:00
parent 6a23f86969
commit a58483f1f1
2 changed files with 10 additions and 7 deletions

View File

@ -231,17 +231,18 @@ func convertTrelloDataToVikunja(trelloData []*trello.Board, token string) (fullV
// Checklists (as markdown in description)
for _, checklist := range card.Checklists {
task.Description += "\n\n<h1> " + checklist.Name + "</h1>\n" + "<ul data-type='taskList'>"
task.Description += "\n\n<h1> " + checklist.Name + "</h1>\n\n<ul data-type='taskList'>"
for _, item := range checklist.CheckItems {
task.Description += "\n "
task.Description += "\n"
if item.State == "complete" {
task.Description += "<li data-checked='true' data-type='taskItem'><label><input type='checkbox' checked='checked'><span></span></label><div><p>"
} else {
task.Description += "<li data-checked='false' data-type='taskItem'><label><input type='checkbox'><span></span></label><div><p>"
}
task.Description += item.Name + "</p></div></li></ul>"
task.Description += item.Name + "</p></div></li>"
}
task.Description += "</ul>"
}
if len(card.Checklists) > 0 {
log.Debugf("[Trello Migration] Converted %d checklists from card %s", len(card.Checklists), card.ID)

View File

@ -247,17 +247,19 @@ func TestConvertTrelloToVikunja(t *testing.T) {
{
Task: models.Task{
Title: "Test Card 2",
Description: `
Description: "
<h1>Checkproject 1</h1>
<li data-checked='false' data-type='taskItem'><label><input type='checkbox'><span></span></label><div><p>Pending Task</p></div></li></ul>
<ul data-type='taskList'>
<li data-checked='false' data-type='taskItem'><label><input type='checkbox'><span></span></label><div><p>Pending Task</p></div></li>
<li data-checked='true' data-type='taskItem'><label><input type='checkbox' checked='checked'><span></span></label><div><p>Completed Task</p></div></li></ul>
<h1>Checkproject 2</h1>
<li data-checked='false' data-type='taskItem'><label><input type='checkbox'><span></span></label><div><p>Pending Task</p></div></li></ul>
<li data-checked='false' data-type='taskItem'><label><input type='checkbox'><span></span></label><div><p>Another Pending Task</p></div></li></ul>`,
<ul data-type='taskList'>
<li data-checked='false' data-type='taskItem'><label><input type='checkbox'><span></span></label><div><p>Pending Task</p></div></li>
<li data-checked='false' data-type='taskItem'><label><input type='checkbox'><span></span></label><div><p>Another Pending Task</p></div></li></ul>",
BucketID: 1,
KanbanPosition: 124,
},