┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/tests/placesitemmodeltest.cpp
AgeCommit message (Collapse)Author
2022-01-09Port back to KFilePlacesViewKai Uwe Broulik
This removes the custom-view engine version of the places panel and replaces it with the upstream `KFilePlacesView` from KIO.
2021-02-09Build with QT_NO_KEYWORDSNicolas Fella
2020-12-05Fix PlacesItemModelTest, 2nd tryElvis Angelaccio
This partly reverts 15a5189b1193cc7305ad2c556d67ec79bdb6e38a The KDE CI does not have KDE_FULL_SESSION set, which means that KIO doesn't add the recentlyused:// urls to the model, but defaults to the old timeline:// urls instead. In both cases KIO adds 2 places, so it is safe to always assume that the expected model count is 14.
2020-11-23PlacesItemModelTest: consider also Pictures/Music/Videos foldersElvis Angelaccio
See a371e23b2b667bc85c311d04549f3d7348d00af5 in kio.
2020-11-23PlacesItemModelTest: use helper method to increase indexesElvis Angelaccio
Instead of duplicating the logic all over the place.
2020-11-02Fix PlacesItemModelTestElvis Angelaccio
Since 3dfa0c1c2f87bf1e6bc9 in kio timeline:// is no longer in the places model.
2020-08-25Output of licensedigger + manual cleanup afterwards.Elvis Angelaccio
Unfortunately licensedigger does not strip the trailing * characters. While at it, use a common style for all source files.
2019-11-09Fix clazy writing-to-temporary warningElvis Angelaccio
2019-10-05Update dolphin tests following place changes D7446Méven Car
Summary: Adapt tests corresponding to changes in D7446 The placesitemmodeltest were not run due to KIO_VERSION not existing Test Plan: LANG="en" ctest Reviewers: #dolphin, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D23557
2019-06-23Fix tests relating to the removal of the Root Place in D15739Méven Car
Summary: See D15739 Test Plan: ctest Reviewers: elvisangelaccio, ngraham Reviewed By: elvisangelaccio, ngraham Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D21789
2019-05-20Add Documents shortcut detectionAndrew Crouthamel
Summary: This adds support for Documents detection when included as a default as implemented in D16852. This is a work-in-progress and currently does not succeed. Assistance is welcome. Test Plan: Run ctest within the dolphin build directory. Reviewers: #dolphin Subscribers: elvisangelaccio, kfm-devel, ngraham Tags: #dolphin Differential Revision: https://phabricator.kde.org/D16967
2019-05-05[PlacesItemModelTest] Rename variableElvis Angelaccio
This variable is not the expected size of the groups list, but it's the expected index of the 'Remote' group in the model.
2019-05-05[PlacesItemModelTest] Ignore user tag placesElvis Angelaccio
Instead of listing the user tags (as tried in D21017), the test should not have access to the user's baloo DB in the first place. To do so, we use a QTemporaryDir as $HOME for the test process and for its ioslave children (by setting KDE_FORK_SLAVES=yes). While at it, drop the no-op removeTestUserData() function.
2019-05-05Try again to fix PlacesItemModelTest::testDefaultViewProperties()Elvis Angelaccio
Commit bff373d598c031cb1 was not enough because the model takes into account the global view properties setting (in PlacesItemModel::initializeDefaultViewProperties()). This means we need to disable the setting before init() runs.
2019-03-20Fix PlacesItemModelTest::testDefaultViewProperties()Elvis Angelaccio
The test was assuming that global view properties are off by default, which is no longer true after d6c086ad04.
2018-10-13Revert "[PlacesItemModelTest] Make test fail on purpose"Elvis Angelaccio
This reverts commit dd8fce5594e9f55ce4c159d46ec59b08313982bb. Got what I was looking for, from the CI logs.
2018-10-13[PlacesItemModelTest] Make test fail on purposeElvis Angelaccio
Needed to check whether on the CI KDirWatch emits the `created` signal when we refresh the places model. Will be reverted soon. GIT_SILENT
2018-10-13[PlacesItemModelTest] Revert last two commitsElvis Angelaccio
Commit c527dc2172 proves that on the CI sometimes the `QAbstractItemModel::dataChanged` signal is not being emitted at all (build #208 failed because the test timed out). KFilePlacesModel emits `dataChanged()` in the `_k_reloadBookmarks()` slot only when it's called after the KBookmarkManager emits the `changed()` signal. And the `changed()` signal is emitted after KDirWatch emits the `created` signal. On the CI server kdirwatch is probably not reliable, which would explain why the test randomly fails.
2018-10-13[PlacesItemModelTest] Try to use an event loop instead of an hardcoded timeoutElvis Angelaccio
Increasing the timeout from 5 to 10 seconds didn't work. Let's see if an eventloop does the job.
2018-10-13[PlacesItemModelTest] Try to double test timeoutElvis Angelaccio
The randomly failing `testRefresh()` on the CI can be reproduced by replacing the QTRY_COMPARE with a simple QCOMPARE. So it seems the CI can be slow such that the default QTR_COMPARE timeout of 5 seconds is not enough. If a timeout of 10 seconds fixes this particular test case, we can use this bigger timeout also in the other failing tests.
2018-10-10[PlacesItemModelTest] Improve name of helper methodElvis Angelaccio
removePlaceAfter(index) is a bit misleading, because it seems we are going to remove the place after index `index`. This method is just scheduling the removal of the place instead. The method name should be consistent with what it actually does.
2018-10-09[PlacesItemModelTest] Try harder to not hardcode indexesElvis Angelaccio
This test is still randomly failing on the CI (only on master though). Let's see if this fixes it for good.
2018-10-07Fix another stale commentElvis Angelaccio
PlacesItemModel::updateBookmarks() is gone since commit da6f8fe0862585287.
2018-10-07[PlacesItemModelTest] More index-related fixesElvis Angelaccio
Again, we cannot assume the Desktop and Downloads places are always around.
2018-10-07[PlacesItemModel] Fix testSystemItems()Elvis Angelaccio
2018-10-07[PlacesItemModelTest] Fix testHideItem()Elvis Angelaccio
2018-10-07[PlacesItemModelTest] Fix testTearDownDevice()Elvis Angelaccio
2018-10-07[PlacesItemModelTest] Fix testDeletePlace()Elvis Angelaccio
If the Desktop or Downloads folder is missing, using 5 as index would be wrong.
2018-10-07[PlacesItemModelTest] Fix testGroups() test caseElvis Angelaccio
The test was also assuming that the Desktop and Downloads folders are always available, which isn't the case.
2018-10-07Follow-up of commit 9760f9607dElvis Angelaccio
Also drop the hardcoded model count all over the place.
2018-10-07[PlacesItemModelTest] Check whether Desktop and Download folders existElvis Angelaccio
KFilePlacesModel creates the Desktop and Downloads bookmarks only if their folder exists. This should hopefully fix the failing test on the CI (actual count = 15, expected count = 17), since the CI runs in docker and probably doesn't have those two folders by default.
2018-05-31Fix the test that broke after recent changes to the default Places itemsNathaniel Graham
Test Plan: `ctest`; all tests pass. Reviewers: #dolphin, markg Reviewed By: markg Subscribers: renatoo, kfm-devel, elvisangelaccio, markg Tags: #dolphin Differential Revision: https://phabricator.kde.org/D12464
2018-04-01Fix detachingElvis Angelaccio
2018-03-11Removed unused variables spotted by clazyElvis Angelaccio
2018-03-03Remove unused #includeRoman Inflianskas
Summary: I used CLion inspection to hunt all unused #include Reviewers: #dolphin, elvisangelaccio, markg Reviewed By: #dolphin, elvisangelaccio, markg Subscribers: markg, elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D10985
2018-01-26Fix place item edit after creationRenato Araujo Oliveira Filho
Summary: Make sure that the place can be edited after the creation. Depends on D9333 BUG: 389147 Test Plan: Create an item in dolphin places panel, make sure that you can rename it Reviewers: #dolphin, ngraham Reviewed By: ngraham Subscribers: michaelh, elvisangelaccio, lbeltrame, ngraham, #dolphin Differential Revision: https://phabricator.kde.org/D9985
2018-01-26Make sure that old URLs do not appear duplicated in places modelRenato Araujo Oliveira Filho
Summary: BUG: 389401 KIO model now provides Baloo URLs; we need to remove the old ones created by Dolphin places model BUG: 387888 Depends on D9332 Test Plan: unit test Reviewers: mwolff, #dolphin, ngraham, elvisangelaccio Reviewed By: #dolphin, ngraham, elvisangelaccio Subscribers: elvisangelaccio, broulik, ervin, ngraham, #dolphin Differential Revision: https://phabricator.kde.org/D9333
2018-01-08Fix PlacesItemModel loading with hidden devicesRenato Araujo Oliveira Filho
Summary: Make sure that hidden devices loaded after module initialization does not appear in the view. Check for item visibility before add it on the model. Test Plan: Unit test created Reviewers: franckarrecot Reviewed By: franckarrecot Subscribers: cfeck, ervin, #dolphin Differential Revision: https://phabricator.kde.org/D9441
2017-12-14Use Kio::KPlacesModel as source model for PlacesItemModelRenato Araujo Oliveira Filho
Summary: Use Kio::KPlacesModel as source model for PlacesItemModel avoiding duplicated code. Depends on D8862 Depends on D8332 Depends on D8434 Depends on D8348 Depends on D8630 Test Plan: Unit test created Reviewers: elvisangelaccio, emmanuelp, mlaurent, mwolff Reviewed By: elvisangelaccio, mlaurent, mwolff Subscribers: mwolff, mlaurent, anthonyfieroni, nicolasfella, ngraham, #dolphin Differential Revision: https://phabricator.kde.org/D8855
2017-11-27Created unit test for PlacesItemModelRenato Araujo Oliveira Filho
Summary: Make sure that PlacesItemModel is covered by unit test Reviewers: ervin, elvisangelaccio, mwolff Reviewed By: ervin, elvisangelaccio, mwolff Subscribers: mwolff, elvisangelaccio, ngraham, #dolphin Differential Revision: https://phabricator.kde.org/D8630