pandorafms/tests/console/Users.py

46 lines
1.2 KiB
Python
Raw Normal View History

2016-07-11 13:06:23 +02:00
# -*- coding: utf-8 -*-
from include.common_classes_60 import PandoraWebDriverTestCase
from include.common_functions_60 import login, logout, click_menu_element, detect_and_pass_all_wizards, activate_home_screen
2016-07-11 13:06:23 +02:00
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import NoAlertPresentException
2016-07-19 12:12:31 +02:00
from selenium.webdriver.remote.webelement import WebElement
2016-08-18 11:33:30 +02:00
2016-07-11 13:06:23 +02:00
import unittest, time, re
2016-08-18 11:33:30 +02:00
class Users(PandoraWebDriverTestCase):
2016-07-11 13:06:23 +02:00
2016-08-18 11:33:30 +02:00
test_name = u'Users'
test_description = u'Users tests'
2016-07-11 13:06:23 +02:00
tickets_associated = []
2016-08-18 11:33:30 +02:00
def test_A_home_screen(self):
2016-07-11 13:06:23 +02:00
2016-08-18 11:33:30 +02:00
u"""
Modify home screen, and check that change is correct. Return this change
"""
2016-07-11 13:06:23 +02:00
driver = self.driver
self.login()
2016-07-11 13:06:23 +02:00
detect_and_pass_all_wizards(driver)
activate_home_screen(driver,"Event list")
self.logout()
self.login()
2016-07-19 10:39:07 +02:00
2016-08-18 11:33:30 +02:00
element = driver.find_element_by_xpath('//a[contains(.,"Event control filter")]')
self.assertIsInstance(element,WebElement)
2016-07-19 10:39:07 +02:00
2016-07-11 13:06:23 +02:00
#Return this change
activate_home_screen(driver,"Default")
if __name__ == "__main__":
unittest.main()