Revert "Add functions for delete reports"
This reverts commit 20849ff0ff
.
This commit is contained in:
parent
51bfd8df56
commit
7b0cf4c585
|
@ -1,7 +1,23 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from include.common_classes_60 import PandoraWebDriverTestCase
|
||||||
|
from include.common_functions_60 import login, click_menu_element, refresh_N_times_until_find_element, detect_and_pass_all_wizards, create_user, is_element_present, create_report, logout
|
||||||
|
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 StaleElementReferenceException
|
||||||
|
import unittest, time, re
|
||||||
|
|
||||||
def test_pan4(self):
|
|
||||||
|
class PAN4(PandoraWebDriverTestCase):
|
||||||
|
|
||||||
|
test_name = u'PAN_4'
|
||||||
|
test_description = u'Creates a user with Chief Operator permissions over the Applications group. Then creates two reports: one in the Applications group and other in the Servers group. Then, it checks that the given user can only see the Application report'
|
||||||
|
tickets_associated = []
|
||||||
|
|
||||||
|
def test_pan4(self):
|
||||||
driver = self.driver
|
driver = self.driver
|
||||||
login(driver,"admin","pandora",self.base_url)
|
login(driver,"admin","pandora")
|
||||||
detect_and_pass_all_wizards(driver)
|
detect_and_pass_all_wizards(driver)
|
||||||
|
|
||||||
#Creates a user with Chief Operator - Applications profile
|
#Creates a user with Chief Operator - Applications profile
|
||||||
|
@ -14,10 +30,10 @@ def test_pan4(self):
|
||||||
create_report(driver,"PAN_4_Servers","Servers")
|
create_report(driver,"PAN_4_Servers","Servers")
|
||||||
|
|
||||||
#Logout
|
#Logout
|
||||||
logout(driver,'http://127.0.0.1:85')
|
logout(driver,self.base_url)
|
||||||
|
|
||||||
#Login
|
#Login
|
||||||
login(driver,user='PAN_4',passwd='PAN_4',self.base_url)
|
login(driver,user='PAN_4',passwd='PAN_4')
|
||||||
detect_and_pass_all_wizards(driver)
|
detect_and_pass_all_wizards(driver)
|
||||||
|
|
||||||
#Check that the report is visible
|
#Check that the report is visible
|
||||||
|
@ -33,16 +49,9 @@ def test_pan4(self):
|
||||||
driver.find_element_by_id('text-search').clear()
|
driver.find_element_by_id('text-search').clear()
|
||||||
driver.find_element_by_id('text-search').send_keys("PAN_4_Servers")
|
driver.find_element_by_id('text-search').send_keys("PAN_4_Servers")
|
||||||
driver.find_element_by_id('submit-search_submit').click()
|
driver.find_element_by_id('submit-search_submit').click()
|
||||||
|
# ESTE NO ESTARÁ driver.find_element_by_id('report_list-0')
|
||||||
self.assertEqual("No data found." in driver.page_source,True)
|
self.assertEqual("No data found." in driver.page_source,True)
|
||||||
|
|
||||||
#Delete reports
|
|
||||||
logout(driver,self.base_url)
|
|
||||||
login(driver,self.base_url)
|
|
||||||
|
|
||||||
delete_report(driver,"PAN_4_Servers")
|
|
||||||
delete_report(driver,"PAN_4_Applications")
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
Loading…
Reference in New Issue