Ejemplo n.º 1
0
 def XtestKeywordsHelp(self):
     """Test help dialog works with context set to 'keywords'"""
     myHelp = Help(PARENT, theContext='keywords')
     myText = myHelp.ui.webView.page().currentFrame().toPlainText()
     myExpectedText = 'avoid using spaces'
     myMessage = ('Expected to find "%s" in \n\n"%s"'
                  % (myExpectedText, myText))
     assert myText.contains(myExpectedText), myMessage
Ejemplo n.º 2
0
 def XtestDockHelp(self):
     """Test help dialog works with context set to 'dock'"""
     myHelp = Help(PARENT, theContext='dock')
     myText = myHelp.ui.webView.page().currentFrame().toPlainText()
     myExpectedText = 'Using the InaSAFE Plugin'
     myMessage = ('Expected to find "%s" in \n\n"%s"'
                  % (myExpectedText, myText))
     assert myText.contains(myExpectedText), myMessage
Ejemplo n.º 3
0
    def XtestDialogLoads(self):
        """Basic test to ensure the keyword dialog has loaded"""

        myHelp = Help(PARENT)
        #myHelp.show()
        #QGISAPP.exec_()

        myText = myHelp.ui.webView.page().currentFrame().toPlainText()
        myHelp.close()
        myExpectedText = 'This is the project: InaSAFE - QGIS'
        myMessage = ('Expected to find "%s" in \n\n"%s"'
                     % (myExpectedText, myText))
        assert myText.contains(myExpectedText), myMessage
Ejemplo n.º 4
0
 def showHelp(self):
     """Load the help text for the options safe_qgis"""
     if not self.helpDialog:
         self.helpDialog = Help(self.iface.mainWindow(), 'options')
Ejemplo n.º 5
0
 def showHelp(self):
     """Load the help text for the keywords safe_qgis"""
     if self.helpDialog:
         del self.helpDialog
     self.helpDialog = Help(self.iface.mainWindow(), 'keywords')
Ejemplo n.º 6
0
 def showHelp(self):
     """Load the help text for the keywords safe_qgis"""
     if self.helpDialog:
         del self.helpDialog
     self.helpDialog = Help(self, 'impact_functions')