Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Kate
Commits
ad7be841
Commit
ad7be841
authored
Sep 17, 2022
by
Christoph Cullmann
🍨
Committed by
Eric Armbruster
Sep 19, 2022
Browse files
adjust test to new realities
parent
cc116313
Changes
1
Hide whitespace changes
Inline
Side-by-side
apps/lib/autotests/kate_view_mgmt_tests.cpp
View file @
ad7be841
...
...
@@ -23,11 +23,13 @@ KateViewManagementTests::KateViewManagementTests(QObject *)
// create KWrite variant to avoid plugin loading!
static
QCommandLineParser
parser
;
app
=
std
::
make_unique
<
KateApp
>
(
parser
,
KateApp
::
ApplicationKWrite
,
m_tempdir
->
path
());
app
->
sessionManager
()
->
activateAnonymousSession
();
}
void
KateViewManagementTests
::
testSingleViewspaceDoesntCloseWhenLastViewClosed
()
{
app
->
sessionManager
()
->
activateAnonymousSession
();
app
->
activeKateMainWindow
()
->
viewManager
()
->
slotDocumentNew
();
// Test that if we have 1 viewspaces then
// closing the last view doesn't close the viewspace
...
...
@@ -42,12 +44,15 @@ void KateViewManagementTests::testSingleViewspaceDoesntCloseWhenLastViewClosed()
vm
->
closeView
(
vm
->
activeView
());
// still same
QCOMPARE
(
vm
->
m_views
.
size
(),
1
);
QCOMPARE
(
vm
->
m_views
.
size
(),
0
);
QCOMPARE
(
vm
->
m_viewSpaceList
.
size
(),
1
);
}
void
KateViewManagementTests
::
testViewspaceClosesWhenLastViewClosed
()
{
app
->
sessionManager
()
->
activateAnonymousSession
();
app
->
activeKateMainWindow
()
->
viewManager
()
->
slotDocumentNew
();
// Test that if we have greater than 1 viewspaces then
// closing the last view in a viewspace closes that view
// space
...
...
@@ -74,6 +79,9 @@ void KateViewManagementTests::testViewspaceClosesWhenLastViewClosed()
void
KateViewManagementTests
::
testViewspaceClosesWhenThereIsWidget
()
{
app
->
sessionManager
()
->
activateAnonymousSession
();
app
->
activeKateMainWindow
()
->
viewManager
()
->
slotDocumentNew
();
// Test that if we have greater than 1 viewspaces then
// closing the last view in a viewspace closes that view
// space
...
...
@@ -118,6 +126,9 @@ void KateViewManagementTests::testViewspaceClosesWhenThereIsWidget()
void
KateViewManagementTests
::
testMoveViewBetweenViewspaces
()
{
app
->
sessionManager
()
->
activateAnonymousSession
();
app
->
activeKateMainWindow
()
->
viewManager
()
->
slotDocumentNew
();
KateMainWindow
*
mw
=
app
->
activeKateMainWindow
();
auto
vm
=
mw
->
viewManager
();
vm
->
slotSplitViewSpaceVert
();
...
...
@@ -139,6 +150,9 @@ void KateViewManagementTests::testMoveViewBetweenViewspaces()
void
KateViewManagementTests
::
testTwoMainWindowsCloseInitialDocument1
()
{
app
->
sessionManager
()
->
activateAnonymousSession
();
app
->
activeKateMainWindow
()
->
viewManager
()
->
slotDocumentNew
();
// get first main window
KateMainWindow
*
first
=
app
->
activeKateMainWindow
();
QVERIFY
(
first
);
...
...
@@ -156,6 +170,9 @@ void KateViewManagementTests::testTwoMainWindowsCloseInitialDocument1()
void
KateViewManagementTests
::
testTwoMainWindowsCloseInitialDocument2
()
{
app
->
sessionManager
()
->
activateAnonymousSession
();
app
->
activeKateMainWindow
()
->
viewManager
()
->
slotDocumentNew
();
// get first main window
KateMainWindow
*
first
=
app
->
activeKateMainWindow
();
QVERIFY
(
first
);
...
...
@@ -173,6 +190,9 @@ void KateViewManagementTests::testTwoMainWindowsCloseInitialDocument2()
void
KateViewManagementTests
::
testTwoMainWindowsCloseInitialDocument3
()
{
app
->
sessionManager
()
->
activateAnonymousSession
();
app
->
activeKateMainWindow
()
->
viewManager
()
->
slotDocumentNew
();
// get first main window
KateMainWindow
*
first
=
app
->
activeKateMainWindow
();
QVERIFY
(
first
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment