┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/tests
AgeCommit message (Collapse)Author
2011-08-15Add unit test for expanding folders in KFileItemModelFrank Reininghaus
2011-08-15Fix for KFileItemModel::expansionLevelsCompareFrank Reininghaus
Before this commit, expanding and collapsing folders in the details view would lead to strange results in a folder with the items "a", "a/a/", "a/a/1", "a/a-1/", and "a/a-1/1". The problem was that the comparison between "a/a/1" and "a/a-1/1" went wrong: the first character in which the paths differ is a "/" in one of the items, such that the code that reduces this 'index' in KFileItemModel::expansionLevelsCompare in order to find the 'common path' did nothing because it checked that only *one* of the two items does not have an "/" at the position 'index'.
2011-08-14Two small selection improvements in DolphinViewFrank Reininghaus
1. Implement DolphinView::clearSelection(). 2. Simplify DolphinView::invertSelection(). I found, fixed, and unit-tested a bug in the selection manager which was uncovered by this change.
2011-08-13Implement selection of items using mouse clicks.Frank Reininghaus
2011-08-11Test signal emission on selection changesFrank Reininghaus
This commit adds a unit test that changes the selection in various ways, verifies the result and checks that the selection manager's selectionChanged signal has been emitted correctly. The test is data-driven, so I hope that most further testing needs can be fulfilled by adding new test data. Moreover, I changed selectedItems() such that the anchored selection is only taken into account if anchor and current item are different. The reason is that in some situation the anchor should not be selected initially (i.e., if an already selected item is Control-clicked). If the anchor should be selected from the beginning, it must be selected manually.
2011-08-11Emit KitemListSelectionManager's selectionChanged signal correctlyFrank Reininghaus
This commit makes sure that the signal is emitted with the correct current and previous selection after a selection change, and that the signal is emitted exactly once in KItemListSelectionManager::itemsInserted and KItemListSelectionManager::itemsRemoved.
2011-08-10Implement beginAnchoredSelection() and endAnchoredSelection().Frank Reininghaus
Unit test included.
2011-08-10Always use the 'Select' mode for anchored selectionsFrank Reininghaus
In Dolphin, we don't actually use the 'Deselect' and 'Toggle' modes for anchored selections, so we can just remove these modes and always use 'Select' to reduce code complexity.
2011-08-10Initial support for anchored selections in the selection managerFrank Reininghaus
2011-08-10Update the anchor item when items are added or removedFrank Reininghaus
If items are added or removed in the model, not only the current item, but also the anchor item, which is the starting point for any selections via Shift+Click or Shift+Key, needs to be updated. BUG: 262638 FIXED-IN: 4.8.0
2011-08-09Test setting the current item and anchor itemFrank Reininghaus
2011-08-09Improvements for selections, smooth scrolling, tooltips and info-panelPeter Penz
2011-07-30Merged very early alpha-version of Dolphin 2.0Peter Penz
Dolphin 2.0 will get a new view-engine with the following improvements: - Better performance - Animated transitions - No clipped filenames due to dynamic item-sizes - Grouping support for all view-modes - Non-rectangular selection areas - Simplified code for better maintenance More details will be provided in a blog-entry during the next days. Please note that the code is in a very early alpha-stage and although the most tricky parts have been implemented already very basic things like drag and drop or selections have not been pushed yet. Those things are rather trivial to implement but this still will take some time.
2011-06-09Wait longer for the selectionChanged signalFrank Reininghaus
The timeout for the selectionChanged signal is increased in DolphinViewTest_AllViewModes::verifySelectedItemsCount(). I hope that this will fix a part of the failures seen in http://my.cdash.org/testDetails.php?test=6350150&build=196639
2011-06-09Improve stability of DolphinView testsFrank Reininghaus
1. Fix possible test failure if hidden files are shown initially. 2. Fix possible test failure if a .directory file is created in the test directory. I think that this fixes the test failure from http://my.cdash.org/testDetails.php?test=6350151&build=196639
2011-05-26Don't try to build dolphinsearchboxtest if Nepomuk isn't found.Frank Reininghaus
2011-05-23Compile with QT_USE_FAST_OPERATOR_PLUSAlex Merry
2011-04-14SVN_SILENT Remove trailing white space.Frank Reininghaus
2011-04-14Improve stability of unit tests when running them with ValgrindFrank Reininghaus
I noticed unexpected unit test failures when running the tests with Valgrind. The reason was that test execution was slowed down a lot, such that that TestBase::waitForFinishedPathLoading() did not receive the view's signal within the default timeout of 2 seconds, and that this failure was not detected in every test -> the tests failed later on because not all expected items had been loaded yet. To fix this, I changed two things: 1. Added an assert in TestBase::waitForFinishedPathLoading() that checks if the signal has been received. Continuing does not make much sense if that is not the case. 2. Increased the default timeout to 20 seconds. The reason why there is a finite timeout at all is that I didn't want to waste too much time on machines where the file kioslave seems to have problems loading a directory (I've seen corresponding test logs at cdash.org). However, with the first change I mentioned above, the waiting time is lost only once (due to the assert) rather than every time a directory is loaded -> I think that the timeout increase does not lead to an increased waste of time on such machines.
2011-04-12Implement a cut/copy/paste unit test for DolphinView.Frank Reininghaus
2011-04-10Add unit test for bug 270437Frank Reininghaus
Verify that the current item and the scroll position of the view do not change if previews are turned off. Actually, the bug was in KFilePreviewGenerator, but it's easier to test this here.
2011-04-06Do not reload the DolphinView in the tests' initView() membersFrank Reininghaus
Rather than reloading the view after it is initilised, we just wait until the view emits its finishedPathLoading() signal. This saves some time when running the tests (at least on my system).
2011-04-05Remove a qWait(2000) which has been committed accidentally.Frank Reininghaus
This has been committed by accident in 06dd174f.
2011-04-05Add function TestBase::waitForFinishedPathLoading()Frank Reininghaus
Many tests have to wait until this signal is received from the DolphinView, so it is convenient to have a function that wraps the QTest::kWaitForSignal() call.
2011-04-05Remove comment which is obsolete after the recent refactoring.Frank Reininghaus
2011-04-03Dolphin unit test refactoringFrank Reininghaus
This commit changes mainly two things: 1. The functionality related to the handling of temporary files and folders is moved to a new class TestDir. 2. The setup of a temporary folder and of DolphinView instances is now done in each unit test function. A benefit of this change is that there are no unwanted interactions between different unit test functions any more. Moreover, different test functions could now share a test folder more easily. Additionally, the reference arguments of all functions are changed to pointers for consistency.
2011-03-21Make it linkKevin Ottens
2011-02-09Coding style update for pointer comparisonPeter Penz
Most developers seem to prefer if (ptr) ... if (!ptr) ... in comparison to if (ptr != 0) ... if (ptr == 0) ... Adjusted the Dolphin-code to use the "most-prefered style" to make contributors happy.
2011-02-07Fixing krazy spelling errorsAaron Reichman
2011-02-05dolphinsearchboxtest: link with goldAndreas Hartmetz
2011-02-04Add unittest for DolphinSearchBoxPeter Penz
A minor API cleanup in DolphinSearchBox has been done related to the test.
2011-02-04Use capitalized KDE includesPeter Penz
2011-01-26Some additions to DolphinDetailsViewTest_AllViewModes.Frank Reininghaus
In particular, tests for changing the zoom level and for saving and restoring the view state. svn path=/trunk/KDE/kdebase/apps/; revision=1217270
2011-01-26Make dolphinviewtest_columns more stable.Frank Reininghaus
Up to now, some Columns View tests that need a folder to be displayed in the view only passed if they were run first: The first test always passed, and if a test name was passed on the command line, such that only this test would be run, this test would work as well. In other cases, the view was empty, not showing the items in the folder. The problem is worked around by creating a new DolphinView before each test in the case of the Columns View. Added a TODO comment to make me remember to look into this again at some point. svn path=/trunk/KDE/kdebase/apps/; revision=1217260
2011-01-26Improve DolphinViewTest_AllViewModes::testKeyboardFocus().Frank Reininghaus
The test assumes that the view does not have the keyboard focus initially. However, this may not be the case if this is the only test to be executed (i.e., if testKeyboardFocus is passed to the test executable on the command line). This commit transfers the keyboard focus explicitly to another widget. svn path=/trunk/KDE/kdebase/apps/; revision=1217251
2011-01-22Add a unit test that checks the DolphinView functionality that isFrank Reininghaus
related to the folder view properties. svn path=/trunk/KDE/kdebase/apps/; revision=1216359
2011-01-17Improve DolphinTreeViewTest's stability.Frank Reininghaus
When running the test in the background while using the computer for other things, it may happen that the test's widgets are not focused, which led to an infinite loop before this commit. I've removed the checks that caused this loop because the only thing that is important for the test is that the view loses the keyboard focus at some point (see bug 220898). svn path=/trunk/KDE/kdebase/apps/; revision=1215139
2011-01-16DolphinTreeViewTest: Add unit test for bug 220898 (rubberbandFrank Reininghaus
selection failure after a keyboard focus change in between key press and key release events) svn path=/trunk/KDE/kdebase/apps/; revision=1214822
2011-01-15DolphinTreeViewTest: Add unit test for bug 259656 (multiple fileFrank Reininghaus
deletion if Shift+Delete is pressed for some time and the confirmation dialog is disabled). svn path=/trunk/KDE/kdebase/apps/; revision=1214651
2011-01-15Improve tests for DolphinTreeView's code that updates the selectionFrank Reininghaus
when a key is pressed. svn path=/trunk/KDE/kdebase/apps/; revision=1214565
2011-01-09Fix implementation of DolphinView::invertSelection() which assures that ↵Peter Penz
DolphinView::hasSelection() provides a valid return-value. This looks like an issue in Qt, but I did not have the time yet to provide a Qt-only example for a bug-report :-( svn path=/trunk/KDE/kdebase/apps/; revision=1213199
2011-01-09Encapsulate the creation and handling of the directory lister, the model and ↵Peter Penz
proxy model to DolphinView. By this it will be easier later to replace the traditional QAbstractItemViews by any kind of other implementation (e.g. based on QGraphicsView/QML). svn path=/trunk/KDE/kdebase/apps/; revision=1213189
2011-01-01SVN_SILENT: Use same comment-style as the other unit-testsPeter Penz
svn path=/trunk/KDE/kdebase/apps/; revision=1210710
2011-01-01Add test for the keyboard-focusPeter Penz
svn path=/trunk/KDE/kdebase/apps/; revision=1210707
2010-12-10Show an undetermined progress indication within one second after changing an ↵Peter Penz
URL. svn path=/trunk/KDE/kdebase/apps/; revision=1205329
2010-12-021. Also use a time out when waiting for the view's selectionChanged signal.Frank Reininghaus
2. Reduce the time out for the finishedPathLoading signal. svn path=/trunk/KDE/kdebase/apps/; revision=1202815
2010-11-29Use the correct libraries for the test in the CMake file.Frank Reininghaus
svn path=/trunk/KDE/kdebase/apps/; revision=1202160
2010-11-29Use kWaitForSignal to wait until the view has finished reloading. I'veFrank Reininghaus
also added a timeout such that the tests fail rather than hang if the file kioslave dies (which happens sometimes according to some test logs on cdash.org). svn path=/trunk/KDE/kdebase/apps/; revision=1202159
2010-11-29Add a unit test for the basic selection-related functionality ofFrank Reininghaus
DolphinView. The main testing code is inside an abstract base class. Three classes inherit this base class and do the actual testing in one view mode each. svn path=/trunk/KDE/kdebase/apps/; revision=1202157
2010-11-23Some minor changes in DolphinDetailsViewTest:Frank Reininghaus
1. Remove unneeded includes 2. Fix typo 3. Add newline at end of file. svn path=/trunk/KDE/kdebase/apps/; revision=1200027