From 9c00e853695f54e14451ec18296f4cc19b67a634 Mon Sep 17 00:00:00 2001 From: aurelien Date: Fri, 25 Jun 2021 02:12:04 +0200 Subject: [PATCH] changement d'id --- 01_creation_departement_test.py | 10 +++++----- 02_creation_formation_test.py | 2 +- UserStoryNew.yaml | 6 +++--- creationSiteDepartement.py | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/01_creation_departement_test.py b/01_creation_departement_test.py index c5e3954..82cb7ea 100644 --- a/01_creation_departement_test.py +++ b/01_creation_departement_test.py @@ -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) diff --git a/02_creation_formation_test.py b/02_creation_formation_test.py index 42f8234..ff2cfa9 100644 --- a/02_creation_formation_test.py +++ b/02_creation_formation_test.py @@ -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") diff --git a/UserStoryNew.yaml b/UserStoryNew.yaml index ca2cd87..592822a 100644 --- a/UserStoryNew.yaml +++ b/UserStoryNew.yaml @@ -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 diff --git a/creationSiteDepartement.py b/creationSiteDepartement.py index d8d96cf..6d8ac4b 100644 --- a/creationSiteDepartement.py +++ b/creationSiteDepartement.py @@ -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)