Details
- Reviewers
elvisangelaccio bruns - Group Reviewers
Dolphin - Commits
- R318:0ba9e8bbc042: test(search): Add test case for baloo parsing model
bin/dolphinquerytest
Diff Detail
- Repository
- R318 Dolphin
- Branch
- test_search_model
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 18774 Build 18792: arc lint + arc unit
src/tests/dolphinsearchboxtest.cpp | ||
---|---|---|
57 ↗ | (On Diff #69584) | Please try to use QVERIFY(QTest::qWaitForWindowExposed(m_searchBox)); in the actual test instead. |
132 ↗ | (On Diff #69584) | Coding style: we never use a leading underscore in function names. Missing pass-by-reference for searchString. |
139–140 ↗ | (On Diff #69584) | One-liner: const QString queryString = QString::fromUtf8(doc.toJson(QJsonDocument::Compact)); |
163 ↗ | (On Diff #69584) | const |
192 ↗ | (On Diff #69584) | Coding style: missing space before/after = |
Please move everything added to a new file, this is independent from the searchbox itself.
src/tests/dolphinsearchboxtest.cpp | ||
---|---|---|
90 ↗ | (On Diff #69584) | The parsing is independent from the config. |
170 ↗ | (On Diff #69584) | Just add a column "failureReason" to the data, and do if (!failureReason.empty()) { QEXPECT_FAIL("", qPrintable(failureReason), Continue); } Keeps test and result together. |
193 ↗ | (On Diff #69584) | the second .trimmed() should better be not necessary. |
- Move to a different test unit
- Address comments
Most of the boilerplate went away after separating the test and not needing DolphinSearchBox anymore
I also removed the #ifdef HAVE_BALOO guards since the test is within if (KF5Baloo_FOUND) in cmake.
src/tests/dolphinsearchboxtest.cpp | ||
---|---|---|
170 ↗ | (On Diff #69584) | Since this is temporary until the fix commit, I think this would keep the revisions simpler |
193 ↗ | (On Diff #69584) | I removed both since this is a remnant from my first attempt comparing searchStrings directly. |