mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-16 07:06:45 +00:00
feat(GODT-2782): Add category name in decribe issue view + apply review comments.
This commit is contained in:
@ -94,7 +94,7 @@ void BugReportFlowFixture::feedTempFile(const QString& json) {
|
||||
//****************************************************************************************************************************************************
|
||||
TEST_F(BugReportFlowFixture, noFile) {
|
||||
EXPECT_FALSE(flow_.parse(""));
|
||||
EXPECT_EQ(flow_.categories(), QStringList());
|
||||
EXPECT_EQ(flow_.categories(), QVariantList());
|
||||
EXPECT_EQ(flow_.questions(), QVariantList());
|
||||
}
|
||||
|
||||
@ -105,7 +105,7 @@ TEST_F(BugReportFlowFixture, noFile) {
|
||||
TEST_F(BugReportFlowFixture, emptyFile) {
|
||||
feedTempFile("");
|
||||
EXPECT_TRUE(flow_.parse(file_.fileName()));
|
||||
EXPECT_EQ(flow_.categories(), QStringList());
|
||||
EXPECT_EQ(flow_.categories(), QVariantList());
|
||||
EXPECT_EQ(flow_.questions(), QVariantList());
|
||||
}
|
||||
|
||||
@ -117,10 +117,12 @@ TEST_F(BugReportFlowFixture, validFile) {
|
||||
feedTempFile(goodJson);
|
||||
|
||||
EXPECT_TRUE(flow_.parse(file_.fileName()));
|
||||
QStringList categories = flow_.categories();
|
||||
QVariantList categories = flow_.categories();
|
||||
QVariantList questions = flow_.questions();
|
||||
EXPECT_EQ(categories.count(), 1);
|
||||
EXPECT_EQ(categories[0], "I can't receive mail");
|
||||
QVariantMap cat = categories[0].toMap();
|
||||
EXPECT_EQ(cat["name"].toString(), "I can't receive mail");
|
||||
EXPECT_EQ(cat["hint"].toString(), "");
|
||||
EXPECT_EQ(questions.count(), 1);
|
||||
QVariantMap q1 = questions[0].toMap();
|
||||
EXPECT_EQ(q1.value("id").toInt(), 0);
|
||||
@ -138,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\rpwet\n\r");
|
||||
EXPECT_EQ(flow_.collectAnswers(1), "");
|
||||
EXPECT_EQ(flow_.getAnswer(0), "pwet");
|
||||
EXPECT_EQ(flow_.getAnswer(1), "");
|
||||
@ -175,6 +177,6 @@ TEST_F(BugReportFlowFixture, badVersionFile) {
|
||||
"}");
|
||||
|
||||
EXPECT_TRUE(flow_.parse(file_.fileName()));
|
||||
EXPECT_EQ(flow_.categories(), QStringList());
|
||||
EXPECT_EQ(flow_.categories(), QVariantList());
|
||||
EXPECT_EQ(flow_.questions(), QVariantList());
|
||||
}
|
||||
Reference in New Issue
Block a user