@ -1038,7 +1038,48 @@ class testrun(unittest.TestCase):
self . assertTrue (
len ( driver . find_elements_by_xpath ( ' //*[@id= " q-app " ]//div//main//div//table/tbody/tr[1]/td[contains(., " Active " )] ' ) ) > 0 , " Status was not changed " )
print ( " OK " )
print ( " Go to reseller details page... " , end = " " )
driver . find_element_by_xpath ( ' //*[@id= " q-app " ]/div//main//div//table/tbody/tr[1]/td[7]/button ' ) . click ( )
WebDriverWait ( driver , 10. ) . until ( EC . element_to_be_clickable ( ( By . XPATH , ' /html/body//div/a[contains(., " Edit " )] ' ) ) )
driver . find_element_by_xpath ( ' /html/body//div/a[contains(., " Details " )] ' ) . click ( )
wait_for_invisibility ( driver , ' //*[@id= " q-app " ]/div//main//div[@role= " progressbar " ] ' )
print ( " OK " )
print ( " Check if reseller base information is correct... " , end = " " )
self . assertTrue ( driver . find_element_by_xpath ( ' //*[@id= " q-app " ]/div//main//div//table//tr/td[2] ' ) . text == resellername , " Reseller name is not correct " )
print ( " OK " )
print ( " Try to edit reseller information... " , end = " " )
driver . find_element_by_xpath ( ' //*[@id= " q-app " ]/div//main//div//table//tr/td[4]/button ' ) . click ( )
driver . find_element_by_xpath ( ' /html/body/div[contains(., " Edit " )] ' ) . click ( )
driver . find_element_by_xpath ( ' //*[@id= " q-app " ]//div//main//form//div//label[@label= " Status " ] ' ) . click ( )
WebDriverWait ( driver , 10 ) . until ( EC . visibility_of_element_located ( ( By . XPATH , ' /html/body/div//div[@class= " q-virtual-scroll__content " ]/div[2] ' ) ) )
time . sleep ( 1 )
driver . find_element_by_xpath ( ' /html/body//div[@class= " q-virtual-scroll__content " ]/div[2] ' ) . click ( )
driver . find_element_by_xpath ( ' //*[@id= " q-app " ]/div//main//div/button[contains(., " Save " )] ' ) . click ( )
wait_for_invisibility ( driver , ' //*[@id= " q-app " ]/div//main//div[@role= " progressbar " ] ' )
click_js ( driver , ' //*[@id= " q-app " ]/div//main//div/button[contains(., " Close " )] ' )
print ( " OK " )
print ( " Check if reseller status was changed... " , end = " " )
self . assertTrue ( driver . find_element_by_xpath ( ' //*[@id= " q-app " ]/div//main//div//table//tr/td[3] ' ) . text == " locked " , " Reseller status is not correct " )
print ( " OK " )
print ( " Check if reseller contract information is correct... " , end = " " )
driver . find_element_by_xpath ( ' //*[@id= " q-app " ]/div//main//div//aside//a[contains(., " Reseller Contract " )] ' ) . click ( )
self . assertTrue ( driver . find_element_by_xpath ( ' //*[@id= " q-app " ]/div//main//div//table//tr/td[2] ' ) . text == resellercontract , " Reseller contract name is not correct " )
print ( " OK " )
print ( " Try to edit reseller contract information... " , end = " " )
driver . find_element_by_xpath ( ' //*[@id= " q-app " ]/div//main//div//table//tr/td[6]/button ' ) . click ( )
driver . find_element_by_xpath ( ' /html/body/div[contains(., " Edit " )] ' ) . click ( )
driver . find_element_by_xpath ( ' //*[@id= " q-app " ]/div//main//form/div/div[1]/div[1]/div[4]/div/label ' ) . click ( )
WebDriverWait ( driver , 10 ) . until ( EC . visibility_of_element_located ( ( By . XPATH , ' /html/body/div//div[@class= " q-virtual-scroll__content " ]/div[2] ' ) ) )
time . sleep ( 1 )
driver . find_element_by_xpath ( ' /html/body//div[@class= " q-virtual-scroll__content " ]/div[2] ' ) . click ( )
driver . find_element_by_xpath ( ' //*[@id= " q-app " ]/div//main//div/button[contains(., " Save " )] ' ) . click ( )
wait_for_invisibility ( driver , ' //*[@id= " q-app " ]/div//main//div[@role= " progressbar " ] ' )
click_js ( driver , ' //*[@id= " q-app " ]/div//main//div/button[contains(., " Close " )] ' )
print ( " OK " )
print ( " Check if reseller contract status was changed... " , end = " " )
self . assertTrue ( driver . find_element_by_xpath ( ' //*[@id= " q-app " ]/div//main//div//table//tr/td[5] ' ) . text == " pending " , " Reseller contract status is not correct " )
print ( " Try to delete Reseller... " , end = " " )
driver . find_element_by_xpath ( ' //*[@id= " q-app " ]/div//aside//div/a[contains(., " Resellers " )] ' ) . click ( )
wait_for_invisibility ( driver , ' //*[@id= " q-app " ]/div//main//div/table/thead/tr[2]/th/div[@role= " progressbar " ] ' )
driver . find_element_by_xpath ( ' //*[@id= " q-app " ]/div//main//div//table/tbody/tr[1]/td[7]/button ' ) . click ( )
WebDriverWait ( driver , 10 ) . until ( EC . visibility_of_element_located ( ( By . XPATH , ' /html/body/div[4]/div/div ' ) ) )