"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/gui/shared/scripts/pageObjects/Activity.py" between
ownCloud-2.9.0.5150.tar.xz and ownCloud-2.9.1.5500.tar.xz

About: ownCloud Client (formerly "mirall") is a tool to synchronize files from ownCloud Server with your desktop client. It uses OCSync as its syncing backend.

Activity.py  (ownCloud-2.9.0.5150.tar.xz):Activity.py  (ownCloud-2.9.1.5500.tar.xz)
import names import names
import squish import squish
from objectmaphelper import RegularExpression from objectmaphelper import RegularExpression
from helpers.FilesHelper import buildConflictedRegex from helpers.FilesHelper import buildConflictedRegex
class Activity: class Activity:
SUBTAB_CONTAINER = {
"container": names.settings_stack_QStackedWidget,
"name": "qt_tabwidget_tabbar",
"type": "QTabBar",
"visible": 1,
}
SUBTAB = { SUBTAB = {
"container": names.settings_stack_QStackedWidget, "container": names.settings_stack_QStackedWidget,
"type": "QTabWidget", "type": "QTabWidget",
"unnamed": 1, "unnamed": 1,
"visible": 1, "visible": 1,
} }
def clickTab(self, tabName): def clickTab(self, tabName):
# TODO: find some way to dynamically select the tab name
# It might take some time for all files to sync except the expected numb er of unsynced files # It might take some time for all files to sync except the expected numb er of unsynced files
squish.snooze(10) squish.snooze(10)
squish.clickTab(squish.waitForObject(self.SUBTAB), tabName)
tabFound = False
# Selecting tab by name fails for "Not Synced" when there are no unsynce
d files
# Because files count will be appended like "Not Synced (2)"
# So to overcome this the following approach has been implemented
tabCount = squish.waitForObjectExists(self.SUBTAB_CONTAINER).count
for index in range(tabCount):
tabText = squish.waitForObjectExists(
{
"container": names.stack_qt_tabwidget_tabbar_QTabBar,
"index": index,
"type": "TabItem",
}
).text
if tabName in tabText:
tabFound = True
squish.clickTab(squish.waitForObject(self.SUBTAB), tabText)
break
if not tabFound:
raise Exception("Tab not found: " + tabName)
def checkFileExist(self, filename): def checkFileExist(self, filename):
squish.waitForObject(names.settings_OCC_SettingsDialog) squish.waitForObject(names.settings_OCC_SettingsDialog)
squish.waitForObjectExists( squish.waitForObjectExists(
{ {
"column": 1, "column": 1,
"container": names.oCC_IssuesWidget_tableView_QTableView, "container": names.oCC_IssuesWidget_tableView_QTableView,
"text": RegularExpression(buildConflictedRegex(filename)), "text": RegularExpression(buildConflictedRegex(filename)),
"type": "QModelIndex", "type": "QModelIndex",
} }
 End of changes. 3 change blocks. 
2 lines changed or deleted 31 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)