mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
Add test case for open-in-new-tab title regression
Fix will be in D15112. CCBUG: 397910
This commit is contained in:
parent
50702506fa
commit
a23acffd5e
1 changed files with 18 additions and 0 deletions
|
@ -39,6 +39,7 @@ private slots:
|
||||||
void testActiveViewAfterClosingSplitView_data();
|
void testActiveViewAfterClosingSplitView_data();
|
||||||
void testActiveViewAfterClosingSplitView();
|
void testActiveViewAfterClosingSplitView();
|
||||||
void testUpdateWindowTitleAfterClosingSplitView();
|
void testUpdateWindowTitleAfterClosingSplitView();
|
||||||
|
void testOpenInNewTabTitle();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QScopedPointer<DolphinMainWindow> m_mainWindow;
|
QScopedPointer<DolphinMainWindow> m_mainWindow;
|
||||||
|
@ -170,6 +171,23 @@ void DolphinMainWindowTest::testUpdateWindowTitleAfterClosingSplitView()
|
||||||
QCOMPARE(currentUrlChangedSpy.count(), 1);
|
QCOMPARE(currentUrlChangedSpy.count(), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Test case for bug #397910
|
||||||
|
void DolphinMainWindowTest::testOpenInNewTabTitle()
|
||||||
|
{
|
||||||
|
m_mainWindow->openDirectories({ QUrl::fromLocalFile(QDir::homePath()) }, false);
|
||||||
|
m_mainWindow->show();
|
||||||
|
QVERIFY(QTest::qWaitForWindowExposed(m_mainWindow.data()));
|
||||||
|
QVERIFY(m_mainWindow->isVisible());
|
||||||
|
|
||||||
|
auto tabWidget = m_mainWindow->findChild<DolphinTabWidget*>("tabWidget");
|
||||||
|
QVERIFY(tabWidget);
|
||||||
|
|
||||||
|
tabWidget->openNewTab(QUrl::fromLocalFile(QDir::tempPath()));
|
||||||
|
QCOMPARE(tabWidget->count(), 2);
|
||||||
|
QVERIFY(tabWidget->tabIcon(0).name() != tabWidget->tabIcon(1).name());
|
||||||
|
QVERIFY(tabWidget->tabText(0) != tabWidget->tabText(1));
|
||||||
|
}
|
||||||
|
|
||||||
QTEST_MAIN(DolphinMainWindowTest)
|
QTEST_MAIN(DolphinMainWindowTest)
|
||||||
|
|
||||||
#include "dolphinmainwindowtest.moc"
|
#include "dolphinmainwindowtest.moc"
|
||||||
|
|
Loading…
Reference in a new issue