┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/tests
AgeCommit message (Collapse)Author
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-05Merge branch 'Applications/19.04'Elvis Angelaccio
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-05Merge branch 'Applications/19.04'Elvis Angelaccio
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-04-18Merge branch 'Applications/19.04'Nate Graham
2019-04-18Fix adding "Create New..." menu to toolbarNate Graham
Summary: Access the object by its existing name rather than renaming it. BUG: 405780 FIXED-IN: 19.04.1 Test Plan: - Add {nav Create New} item to toolbar; it now works - Verify that {nav Create New} menu and toolbar items are disabled when in the trash - All tests still pass Reviewers: elvisangelaccio, broulik, #dolphin, cfeck Reviewed By: cfeck Subscribers: cfeck, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D20664
2019-04-07Merge branch 'Applications/19.04'Elvis Angelaccio
2019-04-07[DolphinMainWindowTest] Fix testNewFileMenuEnabledElvis Angelaccio
The newFileMenu enabled status is updated whenever the KDirLister emits the `completed` signal: use QTRY_COMPARE so that we can wait for it.
2019-04-07[KFileItemModelTest] Port to fastInsert()Elvis Angelaccio
We already depend on KF5 > 5.47, so we are ready to switch to the non-deprecated fastInsert() method.
2019-03-23Merge branch 'Applications/19.04'Elvis Angelaccio
2019-03-21find ruby gems & make coverage conditional on BUILD_COVERAGEHarald Sitter
Summary: new finding tech: - find_gem function configures gem-specific FindFoo files and wraps around find_package - FindFoo files look for ruby and then attempt to require the gem name i.e. it checks if the gem can be successfully loaded by the interpreter - since this is based on find_package it may be influenced in all the regular ways (e.g. forced found or disabled from finding altogether via CMAKE_DISABLE_FIND_PACKAGE_$PKGNAME) various notes for the future: - technically this isn't 100% correct because the require name of a gem and the gem name may not be the same. e.g. the gem `docker-api` has the require name `docker`. for all currently used gems the names are however the same and so simply requiring the gem name is expected to work - the implementation doesn't care about versions, again because we don't need it to - test-unit is a bundled gem, some distributions (e.g. Arch) do split it out without making suitable dependency arrangements on a package level though the tech is heavily inspired by Aleix Pol's tech for finding QML modules as seen in extra-cmake-modules Test Plan: - ruby not found: none of the modules found - test-unit not present: error - simplecov not prseent: never errors - having a module installed or not is reported in the cmake output Reviewers: #dolphin, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D19856
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.
2019-03-18redo service menu ruby helpers from ground up more or lessHarald Sitter
Summary: - apply ruby community style guidelines - full rewrite fixing, among other things: - inefficient/unreadable String#end_with reimplementation - inefficient use of Kernel.system (forked shell to fork a shell) - inefficient/unreadable Dir.glob reimplementation - inefficient File initialization for single chmod - invocation conditions are now actually readable - invocation conditions now also force +x on argless scripts, not just scripts that need arguments - repetitive conditions are now expressed as loops on argument arrays - mime detection now uses xdg-mime instead of file (xdg-mime internally may fall back to mime but will prefer higher level tools such as kmimetypefinder5; giving better results overall) - return values of "backtick forks" are now checked and will produce suitable errors on stderr - fail now takes a log_msg argument which is printed to stderr. this is in addition to the error raised as notification for the user, as that is unfortunately not so useful for diagnostics - overall error handling and logging of problem causes is much improved - add license headers. the original code was actually fairly exhaustive, so this really should have had a header to begin with. the code was originally introduced in svn r1045663 on Nov 6 14:56:35 2009 UTC - add blackbox tests. in the interest of keeping the scripts actually simple scripts (as opposed to a bunch of classes used by even simpler scirpts) they are now also covered by test rigging which runs them as scripts (again, as opposed to individual unit testing of distinct units) - the tests optionally can use simplecov to gather coverage metrics - also wired up to ctest so it actually gets run structurally there is actually a fair amount of overlap between the two scripts, but again, in the interest of keeping things simple I think it's better to live with that instead of refactoring a shared library out of it and then use heavy-duty meta-programming Reviewers: #dolphin, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D19334
2019-01-11Consti'fyLaurent Montel
2019-01-05Fix title update when changing active split viewElvis Angelaccio
Summary: The DolphinTabPage::activeViewUrlChanged signal triggers the title update in DolphinMainWindow, which sets the new title from the `m_activeViewContainer` instance. This means we need to notify the main window that the active view changed before telling it that the current url changed. BUG: 402641 FIXED-IN: 18.12.1 Reviewers: #dolphin, rizzitello, ngraham Reviewed By: #dolphin, rizzitello, ngraham Subscribers: rizzitello, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D17881
2018-12-31Add failing test case for bug #402641Elvis Angelaccio
CCBUG: 402641
2018-10-25Fix minor typosYuri Chornoivan
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 implicit-fallthrough gcc warningElvis Angelaccio
GIT_SILENT
2018-10-07[DolphinMainWindowTest] Attempt to fix testOpenInNewTabTile() on the CIElvis Angelaccio
Both icon `name()`s are empty on the CI, which probably doesn't have icons or something. This should hopefully fix it.
2018-10-07[DolphinMainWindowTest] Add some debug outputElvis Angelaccio
testOpenInNewTabTitle() is currently failing on the CI, this should help investigate why.
2018-10-07Fix another stale commentElvis Angelaccio
PlacesItemModel::updateBookmarks() is gone since commit da6f8fe0862585287.
2018-10-07Merge branch 'Applications/18.08'Elvis Angelaccio
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-10-07Add test cases for enabled status of DolphinNewFileMenuElvis Angelaccio
Summary: Root and Trash test cases are currently failing because of commit e133c4557ecc37ed3f7e1b9418306aa8cc516865. Reviewers: #dolphin Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D16005
2018-09-02Add test case for open-in-new-tab title regressionElvis Angelaccio
Fix will be in D15112. CCBUG: 397910
2018-08-16Make this test work again with new uds implementationJaime Torres Amate
Summary: With the new uds implementation, when some data is meant to replace an old one, it has to use replace() instead of insert() to avoid an assert of data already exists. Use 3 different entries and only insert(). Test Plan: before: crash in the uds assert after: passes the test Reviewers: #dolphin, #frameworks, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: bcooksley, bshah, nalvarez, cfeck, dfaure, aacid, ngraham, bruns, elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D13813
2018-08-16wrong name and email addressJaime Torres Amate
Summary: This reverts commit 2104d18a6760d28d24665a3281ef090c198c44e7. Test Plan: revert-hammer Reviewers: Subscribers:
2018-08-16Make this test work again with new uds implementationTravis CI Bot
Summary: With the new uds implementation, when some data is meant to replace an old one, it has to use replace() instead of insert() to avoid an assert of data already exists. Use 3 different entries and only insert(). Test Plan: before: crash in the uds assert after: passes the test Reviewers: #dolphin, #frameworks, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: dfaure, aacid, ngraham, bruns, elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D13813
2018-06-03Enable test mode in dolphinmainwindowtestElvis Angelaccio
We don't want to use the user configuration files when creating a test instance of DolphinMainWindow.
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-29Bundle dolphinui.rc also in dolphinmainwindowtestElvis Angelaccio
Otherwise the test executable will not be able to find the .rc file while creating a DolphinMainWindow instance. We also need to force the component name to `dolphin`, otherwise kxmlgui will default to the name of the binary (which in this case would be dolphinmainwindowtest rather than dolphin).
2018-04-25DolphinTabPage: deactivate secondary view after closing split viewElvis Angelaccio
We deactivate the previously active view container whenever we change the active split view, but we never do the same when we close the split view. Long term we should probably even delete the secondary view after closing the split view, because it will never be used again and the pointer will be overwritten the next time the user opens the split view.
2018-04-25Merge branch 'Applications/18.04'Elvis Angelaccio
2018-04-25Add failing test case for bug #385111Elvis Angelaccio
Will be fixed by D12446. CCBUG: 385111