mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +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
|
@ -39,6 +39,7 @@ private slots:
|
|||
void testActiveViewAfterClosingSplitView_data();
|
||||
void testActiveViewAfterClosingSplitView();
|
||||
void testUpdateWindowTitleAfterClosingSplitView();
|
||||
void testOpenInNewTabTitle();
|
||||
|
||||
private:
|
||||
QScopedPointer<DolphinMainWindow> m_mainWindow;
|
||||
|
@ -170,6 +171,23 @@ void DolphinMainWindowTest::testUpdateWindowTitleAfterClosingSplitView()
|
|||
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)
|
||||
|
||||
#include "dolphinmainwindowtest.moc"
|
||||
|
|
Loading…
Reference in a new issue