┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/tests/dolphinmainwindowtest.cpp
AgeCommit message (Collapse)Author
2025-02-24Add smaller statusbar and set it as defaultAkseli Lahtinen
- Statusbar has three modes: Small, FullWidth and Disabled - FullWidth is the original statusbar - Small is the new default statusbar - This statusbar overlays on top of the items instead of taking space - It changes size according to content - Disabled turns statusbar completely off - Zoom slider and space information is only shown in full-width statusbar - Space information is now always on - If user navigates with keyboard, or scrolls to selection, the scrolling will take the statusbar into account - This makes sure the statusbar does not cover any items Related discussion: https://invent.kde.org/system/dolphin/-/issues/50
2025-02-03implement shortcut action for file creationChristian Schwarz
BUG: 462899
2025-01-30Change three view buttons into one with menu arrowAkseli Lahtinen
Instead of showing three buttons, which is quite visually noisy, show only one button that is split: First button, when clicked, loops through the view modes. Second smaller button with the down arrow shows menu of the available view modes. See also https://invent.kde.org/system/dolphin/-/issues/68#toolbar-button-changes Alternative for https://invent.kde.org/system/dolphin/-/merge_requests/893 ![Screencast_20250121_123718](/uploads/e8625c485c58a9c47e8168106b3e7419/Screencast_20250121_123718.mp4)
2024-12-19dolphinview: Update thumbnail on filename changeAkseli Lahtinen
If filename of an item was updated previously, it would modify the model before the file was actually changed. This led to the model calling a signal that would try to run a previewjob, but since the filename is not actually changed yet on disk, it would fail. This patch moves the model updating after copyjob. Copyjob will take care of the file renaming if there is already existing file. We just need to update the model correctly after the job has succeeded. BUG:497555
2024-12-09Fix inline renaming multiple files when renaming changes sorting orderIlia Kats
Suppose we are renaming file i and the new name will be sorted after file i+1. We are now pressing ArrowDown to immediately start renaming file i+1. However, because of the sorting we would not actually end up renaming what used to be file i+1. What would happen is that editing would be started in dolphinview.cpp:2065. However, after 100 ms the timer in KFileItemModel would fire, resulting in the model emitting itemsMoved(). This would trigger doLayout() in KItemListView::slotItemsMoved(). doLayout() resizes the KItemListWidgets, wich causes the renaming to be canceled in KStandardItemListWidget::resizeEvent(). Now, we start a new renaming operation for the correct widget after the relayouting is complete.
2024-12-04Always focus the view after place activationFelix Ernst
This one-liner makes sure keyboard focus always moves to the active view when a place in the places panel is activated. Previously focus would remain on the places panel if the activated location was identical to the already displayed location. This added consistency is helpful because keyboard-only users will get used to be able to move from the places panel to the view by pressing the Enter key, even though this does not always work prior to this commit. This issue was identified in an accessibility scan done by HAN University of Applied Science.
2024-11-12Test that each object has distinguishable accessible infoFelix Ernst
This commit extends the dolphinmainwindowtest for the accessible tree to test that each object a user can reach through the Tab key or the Shift+Tab key combination is distinguishable by its accessible info from the previous object. Objects are considered distinguishable if they have different accessible names or their first ancestor with an accessible name is different.
2024-10-31Make Escape move focus from location bar to viewFelix Ernst
Pressing Escape on the location bar while in breadcrumb mode has no effect at all. This commit changes this to instead move the focus to the active view. This is more logical because a user pressing escape while having focus on the location bar is no longer interested in interacting and changing the location in the location bar. They most likely want to act on the current location instead.
2024-10-31refactor: replace QString() with QStringLiteral() for better performanceZhangzhi Hu
2024-10-17Add test to avoid accidental divergence of desktop and phone uiFelix Ernst
The dolphinui.rc and dolphinuiforphones.rc file describe parts of the desktop and phone user interfaces for Dolphin. They are meant to be different in specific ways, but identical in many others. This test makes sure that the two ui files stay mostly identical by requiring any differences between them need to be explicitly stated/registered as an exception in the test. This way no accidental divergence of user interfaces can happen.
2024-08-18Implement "Focus Places Panel"Felix Ernst
This commit implements an action to move focus to the Places panel analogous to "Focus Terminal Panel" functionality-wise. The implementation of the "Focus Terminal Panel" and "Focus Places Panel" actions is streamlined while improving their code quality. The "Focus Terminal Panel" action is moved into the "Show Panels" sub-menu because it makes more sense to be there considering that its previous location (the "Tools" menu) is meant for external applications and not for functionality internal to Dolphin. This commit also makes it so the keyboard focus is moved to and from the Places panel whenever it is toggled visible or invisible. This is now consistent with the focus handling when the Terminal panel is shown or hidden. The "Focus Places Panel" is one of the actions which was wished for in KDE's accessibility chat room because people relying on keyboard controls might need to press the Tab key a lot to move from the view to the Places panel. The new default shortcut is Ctrl+P.
2024-05-18Avoid implicitly selecting itemsFelix Ernst
Items should only be selected if the user wants to act on them. However, previous to this commit we sometimes selected items even when there is no reason to assume that the user would like to act on them. Such selections are dangerous because they make it more likely that the user manipulates items by accident which they never even explicitly selected. Example: The "Up" action is used to navigate to the parent folder. This will implicitly select the folder one emerged from after opening the parent folder, so just one accidental press of the Delete key will lead to data loss if the press goes unnoticed. This scenario would have been avoided if no folder had been selected automatically. The above example becomes even more dangerous if the user is acting with elevated privileges. The following implicit selections of items are being removed: - Selecting items that are being activated - Selecting folders one emerges from Even though these items will no longer be selected after these actions, they will still be marked as current. The only downside I see is that our indication of which item is "current" is a lot weaker than the selection highlight, so it might be more difficult to spot which folder one has emerged from. However, this could be counter-acted with some other temporary indication if this really turns out to be a problem. The only downside I see is that our indication of which item is "current" is a lot weaker than the selection highlight, so it might be more difficult to spot which folder one has emerged from. However, this could be counter-acted with some other temporary indication if this really turns out to be a problem. BUG: 424723
2024-03-14Adapt testOpenInNewTabTitle() to upstream changeFelix Ernst
Prior to this commit the test failed because it expected a generic "inode-directory" icon for directories like "home" or "tmp" even though we have more specialised and nicer icons for these directories. I assume the test only used to pass because we were actually always using generic and therefore unhelpful icons for tabs. This commit removes the hard-coded expectation of the "inode-directory" icon and instead compares the tab icon with the return value of KIO::iconNameForUrl(tabUrl).
2024-02-01Fix focus chainFelix Ernst
Prior to this commit pressing Tab repeatedly would bring the focus to the end of the status bar but not further. This commit makes sure the tab focus doesn't get stuck on the invisible tab bar by explicitly removing the DolphinTabBar from the focus chain while it is hidden. I don't understand why pressing Tab doesn't do anything for the invisible tab bar, but removing an invisible and currently useless widget from the focus chain seems sensible in any case. Improve the accessibility autotest to prevent regressions concerning this.
2024-02-01Speed up autoSaveSession testFelix Ernst
Normally, the session is only saved after a few seconds. The autotest waits for that to happen. This commit reduces the time until the session is saved to a fraction of a seconds which means that the autotest will complete faster.
2024-01-14DolphinMainWindowTest: Add unit test for autosave session featureAmol Godbole
Adds a simple test to check if session is autosaved when a new tab is opened.
2023-10-05Add test for accessibility ancestor treeFelix Ernst
This is to make sure that all items that can be tabbed to and their accessible children have the main window somewhere in their ancestry/ancestor tree.
2023-04-03Add test for openFiles()Felix Ernst
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-02-05Add clang-format and format code as in FrameworksSerg Podtynnyi
2022-09-23Increase code coverage of places panel width resistance testFelix Ernst
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-07-07Improve goActions testFelix Ernst
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-07Add two autotestsFelix Ernst
- 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.
2021-08-30Tabs: ensure to have folder icons for remote foldersMéven Car
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-02-09Build with QT_NO_KEYWORDSNicolas Fella
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.
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-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-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-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-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-07Merge branch 'Applications/18.08'Elvis Angelaccio
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-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-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-25Add failing test case for bug #385111Elvis Angelaccio
Will be fixed by D12446. CCBUG: 385111
2018-02-03Fix -Wunused-result warningsElvis Angelaccio
2017-05-27Introduce DolphinMainWindowTestElvis Angelaccio
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