Changeset View
Changeset View
Standalone View
Standalone View
src/tests/dolphinmainwindowtest.cpp
Show First 20 Lines • Show All 237 Lines • ▼ Show 20 Line(s) | |||||
238 | void DolphinMainWindowTest::testNewFileMenuEnabled() | 238 | void DolphinMainWindowTest::testNewFileMenuEnabled() | ||
239 | { | 239 | { | ||
240 | QFETCH(QUrl, activeViewUrl); | 240 | QFETCH(QUrl, activeViewUrl); | ||
241 | m_mainWindow->openDirectories({ activeViewUrl }, false); | 241 | m_mainWindow->openDirectories({ activeViewUrl }, false); | ||
242 | m_mainWindow->show(); | 242 | m_mainWindow->show(); | ||
243 | QVERIFY(QTest::qWaitForWindowExposed(m_mainWindow.data())); | 243 | QVERIFY(QTest::qWaitForWindowExposed(m_mainWindow.data())); | ||
244 | QVERIFY(m_mainWindow->isVisible()); | 244 | QVERIFY(m_mainWindow->isVisible()); | ||
245 | 245 | | |||
246 | auto newFileMenu = m_mainWindow->findChild<DolphinNewFileMenu*>("newFileMenu"); | 246 | auto newFileMenu = m_mainWindow->findChild<DolphinNewFileMenu*>("new_menu"); | ||
247 | QVERIFY(newFileMenu); | 247 | QVERIFY(newFileMenu); | ||
248 | 248 | | |||
249 | QFETCH(bool, expectedEnabled); | 249 | QFETCH(bool, expectedEnabled); | ||
250 | QTRY_COMPARE(newFileMenu->isEnabled(), expectedEnabled); | 250 | QTRY_COMPARE(newFileMenu->isEnabled(), expectedEnabled); | ||
251 | } | 251 | } | ||
252 | 252 | | |||
253 | QTEST_MAIN(DolphinMainWindowTest) | 253 | QTEST_MAIN(DolphinMainWindowTest) | ||
254 | 254 | | |||
255 | #include "dolphinmainwindowtest.moc" | 255 | #include "dolphinmainwindowtest.moc" |