2016-07-11 13:06:23 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from include.common_classes_60 import PandoraWebDriverTestCase
|
2016-08-22 11:09:42 +02:00
|
|
|
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-09-19 15:14:01 +02:00
|
|
|
import unittest2, time, re
|
2017-01-11 17:29:40 +01:00
|
|
|
import logging
|
2016-07-11 13:06:23 +02:00
|
|
|
|
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
|
|
|
|
"""
|
|
|
|
|
2017-01-11 17:29:40 +01:00
|
|
|
logging.basicConfig(filename="Users.log", level=logging.INFO, filemode='w')
|
|
|
|
|
2016-07-11 13:06:23 +02:00
|
|
|
driver = self.driver
|
2016-08-08 19:01:42 +02:00
|
|
|
self.login()
|
2016-07-11 13:06:23 +02:00
|
|
|
detect_and_pass_all_wizards(driver)
|
|
|
|
|
|
|
|
activate_home_screen(driver,"Event list")
|
|
|
|
|
2016-08-08 19:01:42 +02:00
|
|
|
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")
|
|
|
|
|
2017-01-11 17:29:40 +01:00
|
|
|
logging.info("test_A_home_screen is correct")
|
|
|
|
|
2016-07-11 13:06:23 +02:00
|
|
|
if __name__ == "__main__":
|
2016-09-19 15:14:01 +02:00
|
|
|
unittest2.main()
|
2016-07-11 13:06:23 +02:00
|
|
|
|