forked from qt-creator/qt-creator
Squish: Fix triggering items listed under "Recent Files"
UI has changed again, so adapt the test to reflect this. Change-Id: I5d6bcf2b48b8b625f6086f5a1101041a73d7e329 Reviewed-by: Robert Loehning <robert.loehning@qt.io>
This commit is contained in:
@@ -198,7 +198,7 @@ def invokeMenuItem(menu, item, *subItems):
|
||||
itemObject = waitForObjectItem(objectMap.realName(menuObject), item)
|
||||
waitFor("itemObject.enabled", 2000)
|
||||
activateItem(itemObject)
|
||||
numberedPrefix = "&?\\d+: "
|
||||
numberedPrefix = "(&\\d \| )?"
|
||||
for subItem in subItems:
|
||||
sub = itemObject.menu()
|
||||
waitFor("sub.visible", 1000)
|
||||
@@ -209,7 +209,7 @@ def invokeMenuItem(menu, item, *subItems):
|
||||
for i in range(actions.count()):
|
||||
current = actions.at(i)
|
||||
nonPrefix = subItem[len(numberedPrefix):]
|
||||
matcher = re.match("(%s)(.*)" % numberedPrefix, str(current.text))
|
||||
matcher = re.match("%s(.*)" % numberedPrefix, str(current.text))
|
||||
if matcher and matcher.group(2) == nonPrefix:
|
||||
itemObject = current
|
||||
activateItem(itemObject)
|
||||
|
@@ -213,7 +213,7 @@ def main():
|
||||
recentFile = os.path.join(folder, current)
|
||||
if recentFile.startswith(home) and platform.system() in ('Linux', 'Darwin'):
|
||||
recentFile = recentFile.replace(home, "~", 1)
|
||||
invokeMenuItem("File", "Recent Files", "&?\\d+: %s" % recentFile)
|
||||
invokeMenuItem("File", "Recent Files", "(&\\d \| )?%s" % recentFile)
|
||||
editor = getEditorForFileSuffix(current)
|
||||
display = displayHintForHighlighterDefinition(current, patterns, lPatterns,
|
||||
addedHighlighterDefinition,
|
||||
|
Reference in New Issue
Block a user