Ejemplo n.º 1
0
    def test_startStopPlugin(self):
        print '=== Start/stop plugin test ==='

        print 'Open plugins dashboard'
        dashboard.open(self.browser)
        dashboard.openPlugin(self.browser)
        pluginNumber = 0

        print 'Get plugins table'
        pluginsTable = dashboard.plugins.waitPluginsTableHasNPlugins(
            self.browser, 1)
        startStopButton = dashboard.plugins.getPluginStartStopButton(
            pluginsTable, pluginNumber)

        self.assertEqual(
            dashboard.plugins.getPluginState(pluginsTable, pluginNumber),
            dashboard.plugins.PluginState.Running)

        print 'Stop plugin'
        self.assertTrue(tools.waitUntil(lambda: startStopButton.is_enabled()))
        startStopButton.click()
        self.assertTrue(
            tools.waitUntil(lambda: dashboard.plugins.getPluginState(
                pluginsTable, pluginNumber) is dashboard.plugins.PluginState.
                            Stopped))

        print 'Start plugin'
        self.assertTrue(tools.waitUntil(lambda: startStopButton.is_enabled()))
        startStopButton.click()
        self.assertTrue(
            tools.waitUntil(lambda: dashboard.plugins.getPluginState(
                pluginsTable, pluginNumber) is dashboard.plugins.PluginState.
                            Running))
Ejemplo n.º 2
0
 def setUp(self):
    database.deploy('OneFakePlugin')
    config.deploy("withDeveloperMode")
    self.serverProcess = yadomsServer.start()
    self.browser = webdriver.Firefox()
    self.browser.implicitly_wait(10)
    yadomsServer.openClient(self.browser)
    
    # Open plugins dashboard
    dashboard.open(self.browser)
    dashboard.openPlugin(self.browser)
Ejemplo n.º 3
0
    def setUp(self):
        database.deploy('OneFakePlugin')
        config.deploy("withDeveloperMode")
        self.serverProcess = yadomsServer.start()
        self.browser = webdriver.Firefox()
        self.browser.implicitly_wait(10)
        yadomsServer.openClient(self.browser)

        # Open plugins dashboard
        dashboard.open(self.browser)
        dashboard.openPlugin(self.browser)
Ejemplo n.º 4
0
 def setUp(self):
    yadomsServer.ensureStopped()
    database.deploy('OneFakePlugin')
    config.deploy("withDeveloperMode")
    self.serverProcess = yadomsServer.start()
    self.browser = webdriver.Chrome(options=tools.ChromeOptionsHelper.get())
    self.browser.implicitly_wait(10)
    yadomsServer.openClient(self.browser)
    
    # Open plugins dashboard
    dashboard.open(self.browser)
    dashboard.openPlugin(self.browser)
    def setUp(self):
        yadomsServer.ensureStopped()
        database.deploy('OneFakePlugin')
        config.deploy("nominal")
        self.serverProcess = yadomsServer.start()
        self.browser = webdriver.Chrome()
        self.browser.implicitly_wait(10)
        yadomsServer.openClient(self.browser)

        # Open plugins dashboard
        dashboard.open(self.browser)
        dashboard.openPlugin(self.browser)
Ejemplo n.º 6
0
def createPluginSequence(browser, pluginInstanceName, pluginType, setPluginConfigurationSequenceFct):
   """ Create plugin all-in-one sequence """

   print '  Open plugin dashboard'
   dashboard.open(browser)
   dashboard.openPlugin(browser)

   print '  Create new plugin'
   tools.waitUntil(lambda: getCreatePluginButton(browser).is_enabled())
   getCreatePluginButton(browser).click()
   newPluginModal = waitNewPluginModal(browser)
   newPluginModal.selectPlugin(i18n.getPlugin(pluginType)["name"]).click()
   newPluginModal.ok()

   setPluginConfigurationSequenceFct(pluginInstanceName)
Ejemplo n.º 7
0
def createPluginSequence(browser, pluginInstanceName, pluginType, setPluginConfigurationSequenceFct):
   """ Create plugin all-in-one sequence """

   print ('  Open plugin dashboard')
   dashboard.open(browser)
   dashboard.openPlugin(browser)

   print ('  Create new plugin')
   tools.waitUntil(lambda: getCreatePluginButton(browser).is_enabled())
   getCreatePluginButton(browser).click()
   newPluginModal = waitNewPluginModal(browser)
   newPluginModal.selectPlugin(pluginType).click()
   newPluginModal.clickAdd()

   setPluginConfigurationSequenceFct(pluginInstanceName)
Ejemplo n.º 8
0
   def test_startStopPlugin(self):
      print '=== Start/stop plugin test ==='

      print 'Open plugins dashboard'
      dashboard.open(self.browser)
      dashboard.openPlugin(self.browser)
      pluginNumber = 0
      
      print 'Get plugins table'
      pluginsTable = dashboard.plugins.waitPluginsTableHasNPlugins(self.browser, 1)
      startStopButton = dashboard.plugins.getPluginStartStopButton(pluginsTable, pluginNumber)
      
      self.assertEqual(dashboard.plugins.getPluginState(pluginsTable, pluginNumber), dashboard.plugins.PluginState.Running)

      print 'Stop plugin'
      self.assertTrue(tools.waitUntil(lambda: startStopButton.is_enabled()))
      startStopButton.click()
      self.assertTrue(tools.waitUntil(lambda: dashboard.plugins.getPluginState(pluginsTable, pluginNumber) is dashboard.plugins.PluginState.Stopped))

      print 'Start plugin'
      self.assertTrue(tools.waitUntil(lambda: startStopButton.is_enabled()))
      startStopButton.click()
      self.assertTrue(tools.waitUntil(lambda: dashboard.plugins.getPluginState(pluginsTable, pluginNumber) is dashboard.plugins.PluginState.Running))
    def test_autostartCheckbox(self):
        print '=== Autostart Checkbox test ==='
        print 'ref Issues : #182'
        pluginNumber = 0

        print '  Verify initial state'
        pluginsTable = dashboard.plugins.waitPluginsTableHasNPlugins(
            self.browser, 1)
        self.assertTrue(
            dashboard.plugins.getPluginAutoStartState(pluginsTable,
                                                      pluginNumber))

        print '  Uncheck the box'
        dashboard.plugins.getPluginAutoStart(pluginsTable,
                                             pluginNumber).click()
        tools.waitUntil(lambda: dashboard.plugins.getPluginAutoStartState(
            pluginsTable, pluginNumber) is False)

        print '  Reload page and check box state'
        dashboard.openSummary(self.browser)
        dashboard.openPlugin(self.browser)
        pluginsTable = dashboard.plugins.waitPluginsTableHasNPlugins(
            self.browser, 1)
        tools.waitUntil(lambda: dashboard.plugins.getPluginAutoStartState(
            pluginsTable, pluginNumber) is False)

        print '  Check the box'
        dashboard.plugins.getPluginAutoStart(pluginsTable,
                                             pluginNumber).click()
        tools.waitUntil(lambda: dashboard.plugins.getPluginAutoStartState(
            pluginsTable, pluginNumber) is True)

        print '  Reload page and check box state'
        dashboard.openPlugin(self.browser)
        tools.waitUntil(lambda: dashboard.plugins.getPluginAutoStartState(
            pluginsTable, pluginNumber) is True)