Ejemplo n.º 1
0
object17 = 'pqClientMainWindow/VCRToolbar/1QToolButton0'
QtTesting.playCommand(object17, 'activate', '')
object18 = 'pqClientMainWindow/VCRToolbar/1QToolButton3'

#object19 = 'pqClientMainWindow/animationPanelDock/1pqAnimationPanel0/scrollArea/qt_scrollarea_viewport/AnimationPanel/keyFramePropertiesGroup/editorFrame/SignalAdaptorKeyFrameValue/lineEdit'
#QtTesting.playCommand(object19, 'set_string', '10')
#QtTesting.playCommand(object19, 'set_string', '10')
object20 = 'pqClientMainWindow/VCRToolbar/1QToolButton1'
QtTesting.playCommand(object11, 'activate', 'Animation View')
QtTesting.playCommand(object11, 'activate', 'Object Inspector')
QtTesting.playCommand(object11, 'activate', 'Pipeline Browser')
QtTesting.playCommand(object9, 'activate', 'actionFileSaveAnimation')
object21 = 'Dialog/spinBoxWidth'
QtTesting.playCommand(object21, 'set_int', '800')
object22 = 'Dialog/spinBoxHeight'
QtTesting.playCommand(object22, 'set_int', '800')
object22 = 'Dialog/okButton'
QtTesting.playCommand(object22, 'activate', '')
objectSaveAnimationDialog = 'FileSaveAnimationDialog'
QtTesting.playCommand(objectSaveAnimationDialog, 'filesSelected',
                      '$PARAVIEW_TEST_ROOT/movie_test.png')

time.sleep(3)
objectPlayButton = 'pqClientMainWindow/VCRToolbar/1QToolButton2'
while QtTesting.getProperty(objectPlayButton, "text") != 'Play':
    time.sleep(1)

QtTestingImage.compareImage('$PARAVIEW_TEST_ROOT/movie_test.0005.png',
                            'SaveAnimationMultiView.png')
Ejemplo n.º 2
0
object18 = 'MainWindow/VCRToolbar/1QToolButton3'
QtTesting.playCommand(object16, 'set_int', '1')
QtTesting.playCommand(object16, 'set_int', '0')
QtTesting.playCommand(object16, 'set_int', '1')
QtTesting.playCommand(object16, 'set_int', '0')
QtTesting.playCommand(object16, 'set_int', '1')
object19 = 'MainWindow/animationPanelDock/1pqAnimationPanel0/scrollArea/qt_scrollarea_viewport/AnimationPanel/keyFramePropertiesGroup/editorFrame/SignalAdaptorKeyFrameValue/lineEdit'
QtTesting.playCommand(object19, 'set_string', '10')
QtTesting.playCommand(object19, 'set_string', '10')
object20 = 'MainWindow/VCRToolbar/1QToolButton1'
QtTesting.playCommand(object11, 'activate', 'Animation Inspector')
QtTesting.playCommand(object11, 'activate', 'Object Inspector')
QtTesting.playCommand(object11, 'activate', 'Pipeline Browser')
QtTesting.playCommand(object9, 'activate', 'actionFileSaveAnimation')
object21 = 'Dialog/spinBoxWidth'
QtTesting.playCommand(object21, 'set_int', '800')
object22 = 'Dialog/spinBoxHeight'
QtTesting.playCommand(object22, 'set_int', '800')
object22 = 'Dialog/okButton'
QtTesting.playCommand(object22, 'activate', '')
objectSaveAnimationDialog = 'FileSaveAnimationDialog'
QtTesting.playCommand(objectSaveAnimationDialog, 'filesSelected', '$PARAVIEW_TEST_ROOT/movie_test.png')

time.sleep(3);
objectPlayButton = 'MainWindow/VCRToolbar/1QToolButton2'
while QtTesting.getProperty(objectPlayButton, "text") != 'Play' :
  time.sleep(1);

QtTestingImage.compareImage('$PARAVIEW_TEST_ROOT/movie_test.0005.png', 'SaveAnimationMultiView.png');

Ejemplo n.º 3
0
#/usr/bin/env python

import QtTesting
import QtTestingImage
import time

object1 = 'MainWindow/mainToolBar/1QToolButton0'
QtTesting.playCommand(object1, 'activate', '')
object3 = 'MainWindow/FileOpenDialog'
QtTesting.playCommand(object3, 'filesSelected', '$PARAVIEW_DATA_ROOT/Data/dualSphereAnimation.pvd')
object4 = 'MainWindow/objectInspectorDock/1pqProxyTabWidget0/1QStackedWidget0/objectInspector/Accept'
QtTesting.playCommand(object4, 'activate', '')
object5 = 'MainWindow/VCRToolbar/1QToolButton2'
QtTesting.playCommand(object5, 'activate', '')

while QtTesting.getProperty(object5, 'text') != 'Play':
  time.sleep(0.2)

snapshotWidget = 'MainWindow/MultiViewManager/SplitterFrame/MultiViewSplitter/0/Viewport'
QtTestingImage.compareImage(snapshotWidget, 'VCRAnimation.png', 300, 300);

Ejemplo n.º 4
0
if sys.platform == 'win32':
    pluginFile = 'pvblot.dll'

dataFile = '$PARAVIEW_DATA_ROOT/Testing/Data/can.ex2'

object1 = 'pqClientMainWindow/menubar/menuTools'
object2 = 'pqClientMainWindow/pqPluginDialog/localGroup/loadLocal'
object3 = 'pqClientMainWindow/pqPluginDialog/pqFileDialog'
object4 = 'pqClientMainWindow/pqPluginDialog/buttonBox/1QPushButton0'
object5 = 'pqClientMainWindow/pqFileDialog'
object6 = 'pqClientMainWindow/pqBlotDialog/buttons/runScript'
object7 = 'pqClientMainWindow/pqBlotDialog/BLOTShellRunScriptDialog'
object8 = 'pqClientMainWindow/pqBlotDialog/buttons/close'


testDir = QtTesting.getProperty('pqClientMainWindow', 'TestDirectory')


blotTestFile = "%s/PVBlotTest1.bl" % testDir

blotFile = open(blotTestFile, 'w')
blotFile.write(blotScriptBody)
blotFile.close()

QtTesting.playCommand(object1, 'activate', 'actionManage_Plugins')
QtTesting.playCommand(object2, 'activate', '')
QtTesting.playCommand(object3, 'filesSelected', pluginFile)
QtTesting.playCommand(object4, 'activate', '')
QtTesting.playCommand(object1, 'activate', 'PVBlot')
QtTesting.playCommand(object5, 'filesSelected', dataFile)
QtTesting.playCommand(object6, 'activate', '')
Ejemplo n.º 5
0
#/usr/bin/env python

import QtTesting
import sys

libname = 'libGUIConePanel.so'
if sys.platform == 'win32':
    libname = 'GUIConePanel.dll'

if sys.platform == 'darwin':
    libname = 'libGUIConePanel.dylib'

object1 = 'pqClientMainWindow/menubar/menuTools'
QtTesting.playCommand(object1, 'activate', 'actionManage_Plugins')
object2 = 'pqClientMainWindow/pqPluginDialog/localGroup/loadLocal'
QtTesting.playCommand(object2, 'activate', '')
object3 = 'pqClientMainWindow/pqPluginDialog/pqFileDialog'
QtTesting.playCommand(object3, 'filesSelected', libname)
object4 = 'pqClientMainWindow/pqPluginDialog/buttonBox/1QPushButton0'
QtTesting.playCommand(object4, 'activate', '')
object5 = 'pqClientMainWindow/menubar/menuSources'
QtTesting.playCommand(object5, 'activate', 'Cone')
object7 = 'pqClientMainWindow/proxyTabDock/proxyTabWidget/qt_tabwidget_stackedwidget/objectInspector/Accept'
QtTesting.playCommand(object7, 'activate', '')

object8 = 'pqClientMainWindow/proxyTabDock/proxyTabWidget/qt_tabwidget_stackedwidget/objectInspector/ScrollArea/qt_scrollarea_viewport/PanelArea/Editor/1QLabel0'

text = QtTesting.getProperty(object8, 'text')
print text

Ejemplo n.º 6
0
#/usr/bin/env python

import QtTesting
import QtTestingImage
import time

object1 = 'MainWindow/mainToolBar/1QToolButton0'
QtTesting.playCommand(object1, 'activate', '')
object3 = 'MainWindow/FileOpenDialog'
QtTesting.playCommand(object3, 'filesSelected',
                      '$PARAVIEW_DATA_ROOT/Data/dualSphereAnimation.pvd')
object4 = 'MainWindow/objectInspectorDock/1pqProxyTabWidget0/1QStackedWidget0/objectInspector/Accept'
QtTesting.playCommand(object4, 'activate', '')
object5 = 'MainWindow/VCRToolbar/1QToolButton2'
QtTesting.playCommand(object5, 'activate', '')

while QtTesting.getProperty(object5, 'text') != 'Play':
    time.sleep(0.2)

snapshotWidget = 'MainWindow/MultiViewManager/SplitterFrame/MultiViewSplitter/0/Viewport'
QtTestingImage.compareImage(snapshotWidget, 'VCRAnimation.png', 300, 300)
Ejemplo n.º 7
0
def checkFile(f):
    time.sleep(1)
    text = QtTesting.getProperty(returnLabel, 'text')
    if not text.endswith(f):
        raise ValueError('failed and got ' + text + ' instead of ' + f)
Ejemplo n.º 8
0
#/usr/bin/env python

import QtTesting

object1 = 'pqClientMainWindow/menubar/menuSources'
QtTesting.playCommand(object1, 'activate', 'RTAnalyticSource')
object2 = 'pqClientMainWindow/objectInspectorDock/objectInspector/Accept'
QtTesting.playCommand(object2, 'activate', '')
object3 = 'pqClientMainWindow/menubar/menuFilters/Common'
QtTesting.playCommand(object3, 'activate', 'Contour')
QtTesting.playCommand(object2, 'activate', '')
object5 = 'pqClientMainWindow/objectInspectorDock/objectInspector/ScrollArea/qt_scrollarea_viewport/PanelArea/Editor/1pqCollapsedGroup1/pqSampleScalarWidget'
QtTesting.setProperty(object5, 'samples', '120')
QtTesting.playCommand(object2, 'activate', '')
QtTesting.setProperty(object5, 'samples', '120;130;140;150')
QtTesting.playCommand(object2, 'activate', '')
object1 = 'pqClientMainWindow/menubar/menu_Edit'
QtTesting.playCommand(object1, 'activate', 'actionEditUndo')
# Need to wait a moment to allow the GUI to update.
import time
time.sleep(1)
val = QtTesting.getProperty(object5, 'samples')

if val != "120":
    import exceptions
    raise exceptions.RuntimeError, "Expecting 120, received: " + val
else:
    print "Value comparison successful -- Test passed."
Ejemplo n.º 9
0
if sys.platform == 'darwin':
    pluginFile = 'libpvblot.dylib'

dataFile = '$PARAVIEW_DATA_ROOT/Data/can.ex2'

object1 = 'pqClientMainWindow/menubar/menuTools'
object2 = 'pqClientMainWindow/pqPluginDialog/localGroup/loadLocal'
object3 = 'pqClientMainWindow/pqPluginDialog/pqFileDialog'
object4 = 'pqClientMainWindow/pqPluginDialog/buttonBox/1QPushButton0'
object5 = 'pqClientMainWindow/pqFileDialog'
object6 = 'pqClientMainWindow/pqBlotDialog/buttons/runScript'
object7 = 'pqClientMainWindow/pqBlotDialog/BLOTShellRunScriptDialog'
object8 = 'pqClientMainWindow/pqBlotDialog/buttons/close'


testDir = QtTesting.getProperty('pqClientMainWindow', 'TestDirectory')


blotTestFile = "%s/PVBlotTest1.bl" % testDir

blotFile = open(blotTestFile, 'w')
blotFile.write(blotScriptBody)
blotFile.close()

QtTesting.playCommand(object1, 'activate', 'actionManage_Plugins')
QtTesting.playCommand(object2, 'activate', '')
QtTesting.playCommand(object3, 'filesSelected', pluginFile)
QtTesting.playCommand(object4, 'activate', '')
QtTesting.playCommand(object1, 'activate', 'PVBlot')
QtTesting.playCommand(object5, 'filesSelected', dataFile)
QtTesting.playCommand(object6, 'activate', '')
Ejemplo n.º 10
0
def checkFile(f):
  time.sleep(0.1)
  text = QtTesting.getProperty(returnLabel, 'text')
  if not text.endswith(f):
    raise ValueError('failed and got ' + text + ' instead of ' + f)
Ejemplo n.º 11
0
#/usr/bin/env python

import QtTesting

object1 = 'pqClientMainWindow/menubar/menuSources'
QtTesting.playCommand(object1, 'activate', 'RTAnalyticSource')
object2 = 'pqClientMainWindow/propertiesDock/propertiesPanel/Accept'
QtTesting.playCommand(object2, 'activate', '')
object3 = 'pqClientMainWindow/menubar/menuFilters/Common'
QtTesting.playCommand(object3, 'activate', 'Contour')
QtTesting.playCommand(object2, 'activate', '')
object5 = 'pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/ContourValues/ScalarValueList'
QtTesting.setProperty(object5, 'scalars', '120')
QtTesting.playCommand(object2, 'activate', '')
QtTesting.setProperty(object5, 'scalars', '120;130;140;150')
QtTesting.playCommand(object2, 'activate', '')
object1 = 'pqClientMainWindow/menubar/menu_Edit'
QtTesting.playCommand(object1, 'activate', 'actionEditUndo')
# Need to wait a moment to allow the GUI to update.
import time
time.sleep(1)
val = QtTesting.getProperty(object5, 'scalars')

if val != "120":
    import exceptions
    raise exceptions.RuntimeError ("Expecting 120, received: " + val)
else:
    print ("Value comparison successful -- Test passed.")
Ejemplo n.º 12
0
#/usr/bin/env python

import QtTesting

object1 = 'pqClientMainWindow/menubar/menuSources'
QtTesting.playCommand(object1, 'activate', 'RTAnalyticSource')
object2 = 'pqClientMainWindow/proxyTabDock/proxyTabWidget/qt_tabwidget_stackedwidget/objectInspector/Accept'
QtTesting.playCommand(object2, 'activate', '')
object3 = 'pqClientMainWindow/menubar/menuFilters/Common'
QtTesting.playCommand(object3, 'activate', 'Contour')
QtTesting.playCommand(object2, 'activate', '')
object5 = 'pqClientMainWindow/proxyTabDock/proxyTabWidget/qt_tabwidget_stackedwidget/objectInspector/ScrollArea/qt_scrollarea_viewport/PanelArea/Editor/1pqCollapsedGroup1/pqSampleScalarWidget'
QtTesting.setProperty(object5, 'samples', '120')
QtTesting.playCommand(object2, 'activate', '')
QtTesting.setProperty(object5, 'samples', '120;130;140;150')
QtTesting.playCommand(object2, 'activate', '')
object1 = 'pqClientMainWindow/menubar/menu_Edit'
QtTesting.playCommand(object1, 'activate', 'actionEditUndo')
# Need to wait a moment to allow the GUI to update.
import time
time.sleep(1)
val = QtTesting.getProperty(object5, 'samples')

if val != "120":
    import exceptions
    raise exceptions.RuntimeError, "Expecting 120, received: " + val
else:
    print "Value comparison successful -- Test passed."
# /usr/bin/env python

import QtTesting

object1 = "pqClientMainWindow/menubar/menuSources"
QtTesting.playCommand(object1, "activate", "RTAnalyticSource")
object2 = "pqClientMainWindow/objectInspectorDock/1pqProxyTabWidget0/qt_tabwidget_stackedwidget/objectInspector/Accept"
QtTesting.playCommand(object2, "activate", "")
object3 = "pqClientMainWindow/menubar/menuFilters/Common"
QtTesting.playCommand(object3, "activate", "Contour")
QtTesting.playCommand(object2, "activate", "")
object5 = "pqClientMainWindow/objectInspectorDock/1pqProxyTabWidget0/qt_tabwidget_stackedwidget/objectInspector/ScrollArea/qt_scrollarea_viewport/PanelArea/Editor/1pqCollapsedGroup1/pqSampleScalarWidget"
QtTesting.setProperty(object5, "samples", "120")
QtTesting.playCommand(object2, "activate", "")
QtTesting.setProperty(object5, "samples", "120;130;140;150")
QtTesting.playCommand(object2, "activate", "")
object1 = "pqClientMainWindow/menubar/menuEdit"
QtTesting.playCommand(object1, "activate", "actionEditUndo")
# Need to wait a moment to allow the GUI to update.
import time

time.sleep(1)
val = QtTesting.getProperty(object5, "samples")

if val != "120":
    import exceptions

    raise exceptions.RuntimeError, "Expecting 120, received: " + val
Ejemplo n.º 14
0
#/usr/bin/env python

import QtTesting

object1 = 'pqClientMainWindow/menubar/menuSources'
QtTesting.playCommand(object1, 'activate', 'RTAnalyticSource')
object2 = 'pqClientMainWindow/propertiesDock/propertiesPanel/Accept'
QtTesting.playCommand(object2, 'activate', '')
object3 = 'pqClientMainWindow/menubar/menuFilters/Common'
QtTesting.playCommand(object3, 'activate', 'Contour')
QtTesting.playCommand(object2, 'activate', '')
object5 = 'pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/ContourValues/ScalarValueList'
QtTesting.setProperty(object5, 'scalars', '120')
QtTesting.playCommand(object2, 'activate', '')
QtTesting.setProperty(object5, 'scalars', '120;130;140;150')
QtTesting.playCommand(object2, 'activate', '')
object1 = 'pqClientMainWindow/menubar/menu_Edit'
QtTesting.playCommand(object1, 'activate', 'actionEditUndo')
# Need to wait a moment to allow the GUI to update.
import time
time.sleep(1)
val = QtTesting.getProperty(object5, 'scalars')

if val != "120":
    import exceptions
    raise exceptions.RuntimeError("Expecting 120, received: " + val)
else:
    print("Value comparison successful -- Test passed.")