Commit graph

24 commits

Author SHA1 Message Date
Felix Ernst 95905ce761 Add test for openFiles()
The basic mainWindow methods openFiles(), openDirectories(),
isUrlOpen(), and isItemVisibleInAnyView() have some non-obvious
behaviours that shouldn't regress. We never want to open
directories that are already open. We only want to open new tabs
when the currently open ones don't have the file that should be
highlighted in view already. This should work even if view modes
that allow folder expansion are in play. It should also work when
the view area is split.
2023-04-03 15:34:32 +00:00
Serg Podtynnyi 38c34eeca3 Add clang-format and format code as in Frameworks 2023-02-05 12:45:38 +07:00
Felix Ernst 75183e609f Increase code coverage of places panel width resistance test
Improve the test by also testing the various selection mode bars.
No combination of bars should lead to a resize of the paces panel.

This commit also helps with increasing code coverage by making all
possible selection mode bars appear.
2022-09-23 21:17:19 +02:00
Felix Ernst bb1b17ae69 Improve goActions test
This merge request fixes up a little oversight by me. I will merge this as soon as the pipeline passes.

------------------

Some lines verified that nothing is selected when navigating to a
folder that was not acted on yet. These verifications didn't test
anything meaningful because the folder in question was empty.

This commit adds a file and a folder to the test folder so that
testing if nothing is selected means something.
2022-07-07 13:32:28 +00:00
Felix Ernst c288a48fdc Add two autotests
- The first test makes sure that the width of the places panel
    doesn't change no matter what other panels are shown or hidden.
    There used to be bugs about this.
- The second test is kind of an integration test. It makes sure
    that the go actions work correctly. On two occasions we had
    the regression here that after going "Up" in the file system
    hierarchy the folder one emerged from didn't have keyboard
    focus which makes peeking into multiple folders tiresome.
    The test also makes sure that going back and forward works
    as expected and there are some sanity checks about which
    go actions are enabled, which items are selected and that
    using tabs doesn't interfere with any of that.
2022-07-07 10:41:39 +00:00
Méven Car 653d5714a7 Tabs: ensure to have folder icons for remote folders
KIO::iconForUrl relies on filename to find the icon for remote files.
Appending / at the end of the filename allows it to interpret it as
a folder.

This causes inconsistent tab icons.

To reproduce:

Open in a tab a url on a smb or sftp folder, i.e sftp:/my-server/photos

Before:
Icon is a cloud.

After:
Icon is a folder

Previously a folder icon could be presented if the tab was first opened
with a url with a trailing /
2021-08-30 14:58:08 +00:00
Nicolas Fella f65b0899c3 Build with QT_NO_KEYWORDS 2021-02-09 20:39:50 +00:00
Elvis Angelaccio 954e8c4790 Output of licensedigger + manual cleanup afterwards.
Unfortunately licensedigger does not strip the trailing * characters.
While at it, use a common style for all source files.
2020-08-25 17:07:38 +00:00
Elvis Angelaccio cb0f6f4d9b Fix failing testWindowTitle() on the KDE CI
Forgot that the default places panel no longer ships the Root place.

GIT_SILENT
2019-09-15 20:59:08 +02:00
Elvis Angelaccio 79bbadb263 Introduce test for window titles 2019-09-15 15:12:08 +02:00
Nate Graham 48c082767e Fix adding "Create New..." menu to toolbar
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-18 13:17:00 -06:00
Elvis Angelaccio 30a335cbcf [DolphinMainWindowTest] Fix testNewFileMenuEnabled
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 22:42:50 +02:00
Elvis Angelaccio 504db3f702 Fix title update when changing active split view
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
2019-01-05 17:29:34 +01:00
Elvis Angelaccio f0e66d3465 Add failing test case for bug #402641
CCBUG: 402641
2018-12-31 00:21:25 +01: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 7904ae417a Merge branch 'Applications/18.08' 2018-10-07 19:53:08 +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
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
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 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 a90daf82b6 Fix -Wunused-result warnings 2018-02-03 22:34:24 +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