From 0253eda736a5f69f68e5dd59ba1bff6690188cd0 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 12 Jul 2022 13:17:13 +0200 Subject: [PATCH] fix test --- tests/test_basic.py | 4 ++++ tests/test_selenium.py | 14 ++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/test_basic.py b/tests/test_basic.py index bb9196a2..4e81a709 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -72,6 +72,10 @@ def test_api_docs(client: Client): '/inventory/tag/devices/add/', '/inventory/tag/devices/{id}/del/', '/inventory/upload-snapshot/', + '/inventory/device/edit/{id}/', + '/inventory/upload-placeholder/', + '/inventory/lot/{lot_id}/upload-placeholder/', + '/inventory/placeholder-logs/', '/labels/', '/labels/add/', '/labels/print', diff --git a/tests/test_selenium.py b/tests/test_selenium.py index 33cd8c79..948e947e 100644 --- a/tests/test_selenium.py +++ b/tests/test_selenium.py @@ -42,10 +42,12 @@ class TestSelenium: lot_id = self.driver.current_url.split("/")[5] # 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) # select the first device + self.driver.find_element( By.CSS_SELECTOR, "tr:nth-child(1) .deviceSelect" ).click() @@ -95,10 +97,14 @@ class TestSelenium: self.driver.find_element(By.ID, "SaveAllActions").click() 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) # 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.implicitly_wait(3) - self.driver.find_element(By.LINK_TEXT, "Sign Out").click() + self.driver.find_element(By.CSS_SELECTOR, "li:nth-child(9) > .dropdown-item > span").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()