fix test
This commit is contained in:
parent
963f42b248
commit
0253eda736
|
@ -72,6 +72,10 @@ def test_api_docs(client: Client):
|
||||||
'/inventory/tag/devices/add/',
|
'/inventory/tag/devices/add/',
|
||||||
'/inventory/tag/devices/{id}/del/',
|
'/inventory/tag/devices/{id}/del/',
|
||||||
'/inventory/upload-snapshot/',
|
'/inventory/upload-snapshot/',
|
||||||
|
'/inventory/device/edit/{id}/',
|
||||||
|
'/inventory/upload-placeholder/',
|
||||||
|
'/inventory/lot/{lot_id}/upload-placeholder/',
|
||||||
|
'/inventory/placeholder-logs/',
|
||||||
'/labels/',
|
'/labels/',
|
||||||
'/labels/add/',
|
'/labels/add/',
|
||||||
'/labels/print',
|
'/labels/print',
|
||||||
|
|
|
@ -42,10 +42,12 @@ class TestSelenium:
|
||||||
lot_id = self.driver.current_url.split("/")[5]
|
lot_id = self.driver.current_url.split("/")[5]
|
||||||
|
|
||||||
# go to unassigned
|
# go to unassigned
|
||||||
self.driver.find_element(By.CSS_SELECTOR, ".nav-item:nth-child(5) span").click()
|
# self.driver.find_element(By.CSS_SELECTOR, ".nav-item:nth-child(5) span").click()
|
||||||
|
self.driver.find_element(By.CSS_SELECTOR, ".nav-item:nth-child(7) span").click()
|
||||||
self.driver.implicitly_wait(3)
|
self.driver.implicitly_wait(3)
|
||||||
|
|
||||||
# select the first device
|
# select the first device
|
||||||
|
|
||||||
self.driver.find_element(
|
self.driver.find_element(
|
||||||
By.CSS_SELECTOR, "tr:nth-child(1) .deviceSelect"
|
By.CSS_SELECTOR, "tr:nth-child(1) .deviceSelect"
|
||||||
).click()
|
).click()
|
||||||
|
@ -95,10 +97,14 @@ class TestSelenium:
|
||||||
self.driver.find_element(By.ID, "SaveAllActions").click()
|
self.driver.find_element(By.ID, "SaveAllActions").click()
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
|
|
||||||
self.driver.find_element(By.CSS_SELECTOR, ".nav-item:nth-child(5) span").click()
|
# self.driver.find_element(By.CSS_SELECTOR, ".nav-item:nth-child(5) span").click()
|
||||||
|
self.driver.find_element(By.CSS_SELECTOR, ".nav-item:nth-child(7) span").click()
|
||||||
self.driver.implicitly_wait(3)
|
self.driver.implicitly_wait(3)
|
||||||
|
|
||||||
# logout
|
# logout
|
||||||
|
# self.driver.find_element(By.CSS_SELECTOR, ".d-md-block:nth-child(2)").click()
|
||||||
self.driver.find_element(By.CSS_SELECTOR, ".d-md-block:nth-child(2)").click()
|
self.driver.find_element(By.CSS_SELECTOR, ".d-md-block:nth-child(2)").click()
|
||||||
self.driver.implicitly_wait(3)
|
self.driver.find_element(By.CSS_SELECTOR, "li:nth-child(9) > .dropdown-item > span").click()
|
||||||
self.driver.find_element(By.LINK_TEXT, "Sign Out").click()
|
# self.driver.find_element(By.CSS_SELECTOR, ".d-md-block").click()
|
||||||
|
# self.driver.implicitly_wait(3)
|
||||||
|
# self.driver.find_element(By.LINK_TEXT, "Sign Out").click()
|
||||||
|
|
Reference in New Issue