┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/tests
AgeCommit message (Collapse)Author
2020-12-05Merge branch 'release/20.12'Elvis Angelaccio
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-12-05Drop obsolete KF5 version checkElvis Angelaccio
We depend on 5.77 now.
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-10-23Compile without foreachAlexander Lohnau
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.
2020-07-11Add support to tags: scheme in DolphinQueryIsmael Asensio
It allows to start a search from a `tags:/mytag/` view. The use case is to refine a search on additional terms (another tags, ratings, etc)
2020-07-05[search] Fix corner cases when using quotes in filenamesIsmael Asensio
The `filename` term in a search query is enclosed into quotes. As the user can have additional quotes in the search term, there were several corner cases where the parsing would fail to correctly split the terms New test cases have been added to cover this possibility Previous tests still passes to avoid regressions BEFORE: ``` (filename/quoted) Compared values are not the same Actual (query.text()): "xyz\"\"" Expected (expectedText): "\"abc xyz\"" (filename/mixed) Compared values are not the same Actual (query.text()): "xyz\" tuv\"" Expected (expectedText): "\"abc xyz\" tuv" (content+filename/quoted) Compared values are not the same Actual (query.text()): "abc xyz xyz\"\"" Expected (expectedText): "abc xyz filename:\"\"abc xyz\"\"" ```
2020-06-22Expand DolphinQuery to support different Url schemesIsmael Asensio
2020-05-28Non-functional change: consistent indentationAdriaan de Groot
Use 4-space indents consistently, rather than a mix of 2- and 4-.
2020-05-28Make ruby, and Gem:test-unit, optionalAdriaan de Groot
While this reduces test-coverage in cases where the user doesn't have Ruby or the testing gem installed, it at least allows us to get through configure and build without disabling **all** testing.
2020-05-28Port away from deprecated qrand()Elvis Angelaccio
2020-01-19(search) Fix searching tags with spacesIsmael Asensio
Summary: Tags containing blank spaces were not handled properly in the search widget. Now we enclose them in quotes and strip the quotes before setting them to the widget. {F7854247} Test Plan: No artifacts when searching tags containing spaces Added test cases to `bin/dolphinquerytest` Reviewers: #dolphin, elvisangelaccio, ngraham, meven Reviewed By: #dolphin, elvisangelaccio, ngraham Subscribers: meven, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D26369
2019-12-21fix(search): Correctly parse filename and/or content searchIsmael Asensio
Summary: Currently, the search url parsing does not detect if the search is based on Content or Filename, and it just keeps the last selection which can be inconsistent with the actual search. This patch add such detection, and since an advanced user can combine filename and content search (using the keyword `filename:`), now the parsing detects both items and handles the four possible cases: | Content | Filename | Search text | Search type | |---|---|------------------------|------------------| | T | T | abc filename:"xyz" | Content | | T | F | abc | Content | | F | T | xyz | Filename | | F | F | | do not set | Depends on: D25260 Test Plan: `bin/dolphinquerytest`: Added new test cases for searches with content text and/or filename Reviewers: elvisangelaccio, bruns, #dolphin Reviewed By: elvisangelaccio, #dolphin Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D25416
2019-12-15[dolphin/search] Search by (multiple) tagsIsmael Asensio
Summary: Adds a tag selector in the extended filters of the search box. Selected tag or tags are added to the search query along with the other filters (type, date, rating). FEATURE: 412564 CCBUG: 356062 Test Plan: - Menu shows the user tags - Picking any tag/s filters the search to that specific tag/s {F7727909} Reviewers: elvisangelaccio, ngraham, #dolphin, #vdg Reviewed By: elvisangelaccio, ngraham, #dolphin, #vdg Subscribers: kfm-devel Tags: #dolphin Maniphest Tasks: T9094 Differential Revision: https://phabricator.kde.org/D25130
2019-11-28fix(search): Fix baloo searchString parsingIsmael Asensio
Summary: Fix the parsing of Baloo query `searchString` to represent its parameters properly in the search box: # Baloo terms (`rating`, `modified`) are added to the user search text: {F7575590} # Extra quotes are added to the search text: https://bugs.kde.org/show_bug.cgi?id=412952 This revision supersedes D24422, by making the fixes on the new dolphin query model, instead of directly on the UI. BUG: 412952 FIXED IN: 19.11.90 Test Plan: - `bin/dolphinquerytest` passes without `XFAIL`s - Dolphin search box is not garbled by search terms or quotes Reviewers: elvisangelaccio, bruns, ngraham, #dolphin Reviewed By: elvisangelaccio Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D25260
2019-11-14test(search): Add test case for baloo parsing modelIsmael Asensio
Summary: Adds a new test unit for the model which parses baloo search URLs 14/19 tests are set to `XFAIL` on current implementation, as they will be fixed in a final revision. Supersedes D25135. Depends on: D25257 Test Plan: `bin/dolphinquerytest` Reviewers: elvisangelaccio, bruns, #dolphin Reviewed By: elvisangelaccio, bruns, #dolphin Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D25258
2019-11-09Remove unnecessary semicolons after Q_UNUSEDElvis Angelaccio
GIT_SILENT
2019-11-09Fix clazy writing-to-temporary warningElvis Angelaccio
2019-10-26When the selection is deselected, restart the keyboard search from the beginningMéven Car
Summary: BUG: 411538 FIXED-IN: 19.12 Test Plan: Open a directory with 3 files starting with the same letter. 1. Press this letter key twice 2. The second file is selected 3. Deselect the file with the mouse or using Esc 4. Wait 1 second 5. Press the same key again Before: The third file gets selected After: The first file get selected ctest Reviewers: #dolphin, elvisangelaccio, ngraham Reviewed By: #dolphin, elvisangelaccio, ngraham Subscribers: ngraham, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D23716
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-09-15Fix failing testWindowTitle() on the KDE CIElvis Angelaccio
Forgot that the default places panel no longer ships the Root place. GIT_SILENT
2019-09-15Introduce test for window titlesElvis Angelaccio
2019-09-15Bring back placesitemmodeltestMéven Car
KIO_VERSION is not defined, KF5_VERSION is.
2019-09-14Use directly "isEmpty()"Laurent Montel
2019-07-15Rewrite servicemenu helper utility in C++Alexander Potashev
Summary: - Also support MIME type "application/x-compressed-tar". - Update tests in Ruby, remove SimpleCov. BUG: 399229 Test Plan: Ruby tests passed Reviewers: sitter, elvisangelaccio, ngraham Reviewed By: elvisangelaccio Subscribers: cfeck, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D21878
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-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