forked from aurelien.plancke/ScodocTestClient
changement d'id
This commit is contained in:
parent
1e2b8f3a87
commit
9c00e85369
@ -42,19 +42,19 @@ class PythonOrgSearch(unittest.TestCase):
|
|||||||
|
|
||||||
# Test : Verification de la connexion admin effective
|
# Test : Verification de la connexion admin effective
|
||||||
# @expected : "Bonjour admin" est présent sur la page d'accueil
|
# @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
|
driver = self.driver
|
||||||
self.assertTrue("admin" in driver.page_source)
|
self.assertTrue("admin" in driver.page_source)
|
||||||
|
|
||||||
# Test : Creer un département
|
# Test : Creer un département
|
||||||
# @expected : Le département est présent sur la page d'accueil
|
# @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 = self.driver
|
||||||
driver.get(BASE_URL + "/scodoc_admin")
|
driver.get(BASE_URL + "/scodoc_admin")
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
select = Select(driver.find_element_by_id("create-dept"))
|
select = Select(driver.find_element_by_id("create-dept"))
|
||||||
select.select_by_visible_text(NOM_DPT)
|
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)
|
time.sleep(1)
|
||||||
driver.find_element_by_id("tf_submit").click()
|
driver.find_element_by_id("tf_submit").click()
|
||||||
driver.get(BASE_URL)
|
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
|
# 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
|
# @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 = self.driver
|
||||||
driver.get(BASE_URL + "/scodoc_admin")
|
driver.get(BASE_URL + "/scodoc_admin")
|
||||||
select = Select(driver.find_element_by_id("delete-dept"))
|
select = Select(driver.find_element_by_id("delete-dept"))
|
||||||
select.select_by_visible_text(NOM_DPT)
|
select.select_by_visible_text(NOM_DPT)
|
||||||
select.submit()
|
driver.find_element_by_id("delete-dept").submit()
|
||||||
driver.get(BASE_URL)
|
driver.get(BASE_URL)
|
||||||
self.assertTrue(NOM_DPT not in driver.page_source)
|
self.assertTrue(NOM_DPT not in driver.page_source)
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ class PythonOrgSearch(unittest.TestCase):
|
|||||||
driver = self.driver
|
driver = self.driver
|
||||||
global URL
|
global URL
|
||||||
driver.get(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))
|
self.wait.until(EC.url_changes(URL))
|
||||||
driver.find_element_by_id("tf_acronyme").send_keys(ACRONYME_FORMATION)
|
driver.find_element_by_id("tf_acronyme").send_keys(ACRONYME_FORMATION)
|
||||||
driver.find_element_by_id("tf_titre").send_keys("TEST")
|
driver.find_element_by_id("tf_titre").send_keys("TEST")
|
||||||
|
@ -62,7 +62,7 @@ test4:
|
|||||||
champsInteractions:
|
champsInteractions:
|
||||||
[
|
[
|
||||||
ProgrammesLink,
|
ProgrammesLink,
|
||||||
create_formation_link,
|
link-create-formation,
|
||||||
tf_acronyme,
|
tf_acronyme,
|
||||||
tf_titre,
|
tf_titre,
|
||||||
tf_titre_officiel,
|
tf_titre_officiel,
|
||||||
@ -96,7 +96,7 @@ test6:
|
|||||||
tf_acronyme,
|
tf_acronyme,
|
||||||
tf_submit,
|
tf_submit,
|
||||||
tf_titre_officiel,
|
tf_titre_officiel,
|
||||||
create_formation_link,
|
link-create-formation,
|
||||||
errorMessage,
|
errorMessage,
|
||||||
]
|
]
|
||||||
role: *AdminDPT
|
role: *AdminDPT
|
||||||
@ -117,7 +117,7 @@ test7:
|
|||||||
tf_acronyme,
|
tf_acronyme,
|
||||||
tf_submit,
|
tf_submit,
|
||||||
tf_titre_officiel,
|
tf_titre_officiel,
|
||||||
create_formation_link,
|
link-create-formation,
|
||||||
errorMessage,
|
errorMessage,
|
||||||
]
|
]
|
||||||
role: *AdminDPT
|
role: *AdminDPT
|
||||||
|
@ -42,9 +42,9 @@ def main():
|
|||||||
driver.get(BASE_URL + "scodoc_admin")
|
driver.get(BASE_URL + "scodoc_admin")
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
try:
|
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)
|
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)
|
time.sleep(1)
|
||||||
driver.find_element_by_id("tf_submit").click()
|
driver.find_element_by_id("tf_submit").click()
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user