feat(GODT-2787): Tweaking Bug Report form with last Review.

This commit is contained in:
Romain Le Jeune
2023-08-11 05:39:34 +00:00
parent c90248920a
commit 12183fbf05
8 changed files with 47 additions and 15 deletions

View File

@ -140,7 +140,7 @@ TEST_F(BugReportFlowFixture, validFile) {
EXPECT_TRUE(flow_.setAnswer(0, "pwet"));
EXPECT_FALSE(flow_.setAnswer(1, "pwet"));
EXPECT_EQ(flow_.collectAnswers(0), " > What happened?\n\rpwet\n\r");
EXPECT_EQ(flow_.collectAnswers(0), "#### What happened?\n\r> pwet\n\r");
EXPECT_EQ(flow_.collectAnswers(1), "");
EXPECT_EQ(flow_.getAnswer(0), "pwet");
EXPECT_EQ(flow_.getAnswer(1), "");

View File

@ -131,8 +131,9 @@ QString BugReportFlow::collectAnswers(quint8 categoryId) const {
const QString& answer = getAnswer(var.toInt());
if (answer.isEmpty())
continue;
answers += " > " + questions_[var.toInt()].toMap()["text"].toString() + "\n\r";
answers += answer + "\n\r";
answers += "#### " + questions_[var.toInt()].toMap()["text"].toString() + "\n\r";
for (const QString& line : answer.split("\n"))
answers += "> " + line + "\n\r";
}
return answers;
}