1
0
Fork 0
mirror of https://github.com/borgbase/vorta synced 2024-12-23 00:07:58 +00:00
vorta/tests/test_source.py
Manuel Riel 30c6549f0f
v0.5.2 Bugfixes and new Misc Settings Tab (#71)
* Fix uneven vspace. Fixes #67

* Add Python 3.7 to Travis. Use tox to test multiple Python versions. Fixes #72

* Add command line option to avoid forking and open main window while debugging. Fixes #73

* Use slug of profile name as archive prefix. Fixes #46

* Add settings tab. Add light system tray icon option. Fixes #56 and #74

* Incorporate review by @ThomasWaldmann
2018-12-04 10:58:12 +08:00

19 lines
588 B
Python

import logging
from PyQt5 import QtCore
import vorta.models
import vorta.views
def test_add_folder(app, qtbot, tmpdir, monkeypatch, choose_folder_dialog):
monkeypatch.setattr(
vorta.views.source_tab, "choose_folder_dialog", choose_folder_dialog
)
main = app.main_window
main.tabWidget.setCurrentIndex(1)
tab = main.sourceTab
qtbot.mouseClick(tab.sourceAddFolder, QtCore.Qt.LeftButton)
qtbot.waitUntil(lambda: tab.sourceDirectoriesWidget.count() == 2)
for src in vorta.models.SourceDirModel.select():
logging.error(src.dir, src.profile)