2018-11-30 00:40:18 +00:00
|
|
|
import vorta.models
|
2018-12-04 02:58:12 +00:00
|
|
|
import vorta.views
|
2018-11-30 00:40:18 +00:00
|
|
|
|
|
|
|
|
2020-03-03 05:19:36 +00:00
|
|
|
def test_add_folder(qapp, qtbot, tmpdir, monkeypatch, choose_file_dialog):
|
2018-12-04 02:58:12 +00:00
|
|
|
monkeypatch.setattr(
|
2018-12-05 09:05:47 +00:00
|
|
|
vorta.views.source_tab, "choose_file_dialog", choose_file_dialog
|
2018-12-04 02:58:12 +00:00
|
|
|
)
|
2020-03-03 05:19:36 +00:00
|
|
|
main = qapp.main_window
|
2018-11-30 00:40:18 +00:00
|
|
|
main.tabWidget.setCurrentIndex(1)
|
|
|
|
tab = main.sourceTab
|
|
|
|
|
2020-08-10 07:57:13 +00:00
|
|
|
tab.sourceAddFolder.click()
|
2020-06-01 08:02:38 +00:00
|
|
|
qtbot.waitUntil(lambda: tab.sourceFilesWidget.count() == 2, timeout=5000)
|