changement d'id

This commit is contained in:
Aurélien Plancke 2021-06-25 02:12:04 +02:00
parent 1e2b8f3a87
commit 9c00e85369
4 changed files with 11 additions and 11 deletions

View File

@ -42,19 +42,19 @@ class PythonOrgSearch(unittest.TestCase):
# Test : Verification de la connexion admin effective
# @expected : "Bonjour admin" est présent sur la page d'accueil
def test_connexion_admin(self):
def test_01_connexion_admin(self):
driver = self.driver
self.assertTrue("admin" in driver.page_source)
# Test : Creer un département
# @expected : Le département est présent sur la page d'accueil
def test_create_departement(self):
def test_02_create_departement(self):
driver = self.driver
driver.get(BASE_URL + "/scodoc_admin")
time.sleep(2)
select = Select(driver.find_element_by_id("create-dept"))
select.select_by_visible_text(NOM_DPT)
driver.find_element_by_name("DeptId").submit()
driver.find_element_by_id("create-dept").submit()
time.sleep(1)
driver.find_element_by_id("tf_submit").click()
driver.get(BASE_URL)
@ -62,12 +62,12 @@ class PythonOrgSearch(unittest.TestCase):
# Test : Suppresion d'un département, puis lancement d'un script coté serveur pour supprimer sa base de données
# @expected : Le département n'apparait plus sur la page d'accueil
def test_delete_departement(self):
def test_03_delete_departement(self):
driver = self.driver
driver.get(BASE_URL + "/scodoc_admin")
select = Select(driver.find_element_by_id("delete-dept"))
select.select_by_visible_text(NOM_DPT)
select.submit()
driver.find_element_by_id("delete-dept").submit()
driver.get(BASE_URL)
self.assertTrue(NOM_DPT not in driver.page_source)

View File

@ -100,7 +100,7 @@ class PythonOrgSearch(unittest.TestCase):
driver = self.driver
global URL
driver.get(URL)
driver.find_element_by_id("create_formation_link").click()
driver.find_element_by_id("link-create-formation").click()
self.wait.until(EC.url_changes(URL))
driver.find_element_by_id("tf_acronyme").send_keys(ACRONYME_FORMATION)
driver.find_element_by_id("tf_titre").send_keys("TEST")

View File

@ -62,7 +62,7 @@ test4:
champsInteractions:
[
ProgrammesLink,
create_formation_link,
link-create-formation,
tf_acronyme,
tf_titre,
tf_titre_officiel,
@ -96,7 +96,7 @@ test6:
tf_acronyme,
tf_submit,
tf_titre_officiel,
create_formation_link,
link-create-formation,
errorMessage,
]
role: *AdminDPT
@ -117,7 +117,7 @@ test7:
tf_acronyme,
tf_submit,
tf_titre_officiel,
create_formation_link,
link-create-formation,
errorMessage,
]
role: *AdminDPT

View File

@ -42,9 +42,9 @@ def main():
driver.get(BASE_URL + "scodoc_admin")
time.sleep(2)
try:
select = Select(driver.find_element_by_id("CreateDept"))
select = Select(driver.find_element_by_id("create-dept"))
select.select_by_visible_text(NOM_DPT)
driver.find_element_by_name("DeptId").submit()
driver.find_element_by_id("create-dept").submit()
time.sleep(1)
driver.find_element_by_id("tf_submit").click()
time.sleep(1)