Commit graph

249 commits

Author SHA1 Message Date
Elvis Angelaccio 8a932cb837 [PlacesItemModelTest] Try harder to not hardcode indexes
This test is still randomly failing on the CI (only on master though).
Let's see if this fixes it for good.
2018-10-09 22:58:38 +02:00
Elvis Angelaccio 092d08f5e8 Fix implicit-fallthrough gcc warning
GIT_SILENT
2018-10-07 23:07:32 +02:00
Elvis Angelaccio 949da1fb31 [DolphinMainWindowTest] Attempt to fix testOpenInNewTabTile() on the CI
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 21:37:35 +02:00
Elvis Angelaccio 54ae7f2488 [DolphinMainWindowTest] Add some debug output
testOpenInNewTabTitle() is currently failing on the CI, this should help
investigate why.
2018-10-07 21:19:12 +02:00
Elvis Angelaccio 4c40ad45ef Fix another stale comment
PlacesItemModel::updateBookmarks() is gone since commit da6f8fe086.
2018-10-07 20:03:41 +02:00
Elvis Angelaccio 7904ae417a Merge branch 'Applications/18.08' 2018-10-07 19:53:08 +02:00
Elvis Angelaccio e2f93a2829 [PlacesItemModelTest] More index-related fixes
Again, we cannot assume the Desktop and Downloads places are always
around.
2018-10-07 19:41:54 +02:00
Elvis Angelaccio 4a56d21fb1 [PlacesItemModel] Fix testSystemItems() 2018-10-07 19:28:56 +02:00
Elvis Angelaccio e99827293b [PlacesItemModelTest] Fix testHideItem() 2018-10-07 18:01:00 +02:00
Elvis Angelaccio 26d02ecbdb [PlacesItemModelTest] Fix testTearDownDevice() 2018-10-07 17:49:36 +02:00
Elvis Angelaccio 0abba76eea [PlacesItemModelTest] Fix testDeletePlace()
If the Desktop or Downloads folder is missing, using 5 as index would be
wrong.
2018-10-07 17:41:54 +02:00
Elvis Angelaccio 9204f3272b [PlacesItemModelTest] Fix testGroups() test case
The test was also assuming that the Desktop and Downloads folders are
always available, which isn't the case.
2018-10-07 17:26:28 +02:00
Elvis Angelaccio 92157f6d7d Follow-up of commit 9760f9607d
Also drop the hardcoded model count all over the place.
2018-10-07 17:07:56 +02:00
Elvis Angelaccio 9760f9607d [PlacesItemModelTest] Check whether Desktop and Download folders exist
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-07 16:50:27 +02:00
Elvis Angelaccio dec7016c0d Add test cases for enabled status of DolphinNewFileMenu
Summary:
Root and Trash test cases are currently failing because of
commit e133c4557e.

Reviewers: #dolphin

Subscribers: kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D16005
2018-10-07 15:43:34 +02:00
Elvis Angelaccio a23acffd5e Add test case for open-in-new-tab title regression
Fix will be in D15112.

CCBUG: 397910
2018-09-02 10:55:51 +02:00
Jaime Torres Amate e03cbe2584 Make this test work again with new uds implementation
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-16 13:50:52 +02:00
Jaime Torres Amate adc5f6d3ac wrong name and email address
Summary: This reverts commit 2104d18a67.

Test Plan: revert-hammer

Reviewers:

Subscribers:
2018-08-16 13:48:03 +02:00
Travis CI Bot 2104d18a67 Make this test work again with new uds implementation
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-08-16 13:06:06 +02:00
Elvis Angelaccio 2e6798088b Enable test mode in dolphinmainwindowtest
We don't want to use the user configuration files when creating a test
instance of DolphinMainWindow.
2018-06-03 11:24:20 +02:00
Nathaniel Graham 316e476b37 Fix the test that broke after recent changes to the default Places items
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-05-31 22:33:31 -06:00
Elvis Angelaccio b9d6a97711 Bundle dolphinui.rc also in dolphinmainwindowtest
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-29 17:07:18 +02:00
Elvis Angelaccio 362244ccbe DolphinTabPage: deactivate secondary view after closing split view
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-25 13:42:18 +02:00
Elvis Angelaccio 9ec8135974 Merge branch 'Applications/18.04' 2018-04-25 12:50:12 +02:00
Elvis Angelaccio 74c2d4ea2d Add failing test case for bug #385111
Will be fixed by D12446.

CCBUG: 385111
2018-04-25 12:34:02 +02:00
Elvis Angelaccio 6f3b0e3d00 Fix detaching 2018-04-01 12:30:41 +02:00
Elvis Angelaccio 69239fdf41 Removed unused variables spotted by clazy 2018-03-11 17:14:07 +01:00
Roman Inflianskas 848abc5922 Remove unused #include
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-03-03 17:08:01 +03:00
Elvis Angelaccio a90daf82b6 Fix -Wunused-result warnings 2018-02-03 22:34:24 +01:00
Elvis Angelaccio cef4d96cc6 Port QSignalSpy to new signal syntax
More compile-time safety. Tests still pass.

This also fixes a krazy warning about "normalised signal/slot
signatures".
2018-02-03 20:46:08 +01:00
Renato Araujo Oliveira Filho a8a3fa51a0 Fix place item edit after creation
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-26 11:14:30 -03:00
Renato Araujo Oliveira Filho 3bf68fd714 Make sure that old URLs do not appear duplicated in places model
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-26 11:07:59 -03:00
Renato Araujo Oliveira Filho 94b2b2a2db Fix PlacesItemModel loading with hidden devices
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
2018-01-08 08:52:38 -03:00
Renato Araujo Oliveira Filho da6f8fe086 Use Kio::KPlacesModel as source model for PlacesItemModel
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-12-14 09:40:34 -03:00
Renato Araujo Oliveira Filho 89e4e8dd0a Created unit test for PlacesItemModel
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
2017-11-27 09:37:24 -07:00
Kevin Funk a6db5029ac Modernize: Use nullptr everywhere 2017-11-21 10:53:12 +01:00
Kevin Funk 464b13f382 Modernize: Use override where possible
Also use override instead of Q_DECL_OVERRIDE
2017-11-20 23:25:48 +01:00
Emirald Mateli 99e80c1c7e Prevent folders from drag and dropping onto themselves in dolphin main view
Summary:
This patch aims to improve user experience by not allowing the user to drag and drop a folder into itself.

The current behavior shows a red message at the top which can then be closed by the user, instead of relying on that, this patch disables the option of dropping onto self and uses the "Invalid drop target cursor" to highlight the behavior.

BUG: 307747

Since spectacle is unable to screenshot the cursor overlay, find attached a photo of the screen.
{F3787651}

Test Plan:
1. Drag a folder.
2. Drop it onto itself.

Reviewers: #dolphin, elvisangelaccio, ngraham, rkflx, dfaure

Reviewed By: #dolphin, elvisangelaccio, rkflx, dfaure

Subscribers: rkflx, ngraham, elvisangelaccio, dfaure, anthonyfieroni, #konqueror

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D6281
2017-11-11 15:06:13 +01:00
Elvis Angelaccio 1faef1c92d Introduce DolphinMainWindowTest
For now it contains a test case for the crash in bug #379135

CCBUG: 379135

Reviewers: emmanuelp, dfaure

Differential Revision: https://phabricator.kde.org/D5936
2017-05-27 10:28:09 +02:00
Elvis Angelaccio 4216c7e6ba Move non-exported code to a static library
This allows us to speed up the compilation because we don't need to
build twice the source files we use in the unit tests.

Test Plan: Builds, dolphin works and tests pass.

Reviewers: emmanuelp, dfaure

Differential Revision: https://phabricator.kde.org/D5935
2017-05-27 10:23:47 +02:00
Hannah von Reth e0f6b74226 Port tests from ecm_mark_as_test to ecm_add_test
Summary: This enables us to run the tests on Windows.

Reviewers: elvisangelaccio, kfunk, dfaure

Reviewed By: elvisangelaccio

Subscribers: #konqueror, #dolphin

Differential Revision: https://phabricator.kde.org/D5810
2017-05-11 20:05:25 +02:00
Elvis Angelaccio f6095c86c1 Fix kfileitemmodeltest
Commit 6dcbb8127c introduced the isHidden role, update the test
accordingly.
2017-05-11 19:52:14 +02:00
Hannah von Reth 6c3cacd2b3 Remove define to disable exports
As the tests are now correctly linked to dolphinprivate we need the
actual export macro.
2017-05-11 12:33:15 +02:00
Kevin Funk f2758ec9f7 Fix some compiler warnings 2017-04-07 16:13:27 +02:00
Don Nguyen 0aed243beb Change "Date" to "Modified" and allow access to new "Accessed" time field
This is merge of #128964 and #128942.  This will impelement changing the "Date" field to "Modified" and allow a new "Accessed" time field to be available.  This also includes changes to update configuration files.

REVIEW: 129077
2017-01-21 00:04:38 +01:00
Elvis Angelaccio 97b5435b6b Remove extra semicolon
GIT_SILENT
2017-01-18 23:49:41 +01:00
Montel Laurent 726515cfd4 Add missing Q_DECL_OVERRIDE 2017-01-03 13:18:07 +01:00
Ilya Bizyaev 67c007889e Add missing Q_OBJECT macros
REVIEW: 129738
2017-01-03 11:24:13 +01:00
Elvis Angelaccio abb7799f7e Fix viewpropertiestest when GlobalViewProps is true
The test was not saving its changes to the global settings, so it was
passing on the CI only because the default value of GlobalViewProps is
already false. If GlobalViewProps was set to true instead, testAutoSave()
would fail because save() was not called and GlobalViewProps was not
2016-12-03 18:04:24 +01:00
Spencer Brown 73a6bf4e10 Fix 5 clazy warnings
This bumps the minimum Qt version to 5.5 (because of Q_ENUM usage).

REVIEW: 129604
2016-12-03 15:58:39 +01:00