forked from aurelien.plancke/ScodocTestClient
changement sur le nom des id et classe
This commit is contained in:
parent
137bc378b8
commit
1e2b8f3a87
@ -25,7 +25,7 @@ from selenium.webdriver.support.select import Select
|
|||||||
|
|
||||||
URL = BASE_URL + NOM_DPT + "/Scolarite"
|
URL = BASE_URL + NOM_DPT + "/Scolarite"
|
||||||
|
|
||||||
ACRONYME_FORMATION = "FormationTEST"
|
ACRONYME_FORMATION = "formationtest"
|
||||||
|
|
||||||
|
|
||||||
class PythonOrgSearch(unittest.TestCase):
|
class PythonOrgSearch(unittest.TestCase):
|
||||||
@ -74,7 +74,7 @@ class PythonOrgSearch(unittest.TestCase):
|
|||||||
driver = self.driver
|
driver = self.driver
|
||||||
global URL
|
global URL
|
||||||
driver.get(URL)
|
driver.get(URL)
|
||||||
idEditFormation = "edit_Formation_" + ACRONYME_FORMATION
|
idEditFormation = "edit-formation-" + ACRONYME_FORMATION
|
||||||
driver.find_element_by_id(idEditFormation).click()
|
driver.find_element_by_id(idEditFormation).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)
|
||||||
@ -87,7 +87,7 @@ class PythonOrgSearch(unittest.TestCase):
|
|||||||
self.assertTrue(ACRONYME_FORMATION + ACRONYME_FORMATION in textElementAcronyme)
|
self.assertTrue(ACRONYME_FORMATION + ACRONYME_FORMATION in textElementAcronyme)
|
||||||
# Remise du nom à celui de départ
|
# Remise du nom à celui de départ
|
||||||
driver.get(URL)
|
driver.get(URL)
|
||||||
idEditFormation = "edit_Formation_" + ACRONYME_FORMATION + ACRONYME_FORMATION
|
idEditFormation = "edit-formation-" + ACRONYME_FORMATION + ACRONYME_FORMATION
|
||||||
driver.find_element_by_id(idEditFormation).click()
|
driver.find_element_by_id(idEditFormation).click()
|
||||||
self.wait.until(EC.url_changes(URL))
|
self.wait.until(EC.url_changes(URL))
|
||||||
driver.find_element_by_id("tf_acronyme").clear()
|
driver.find_element_by_id("tf_acronyme").clear()
|
||||||
@ -118,7 +118,7 @@ class PythonOrgSearch(unittest.TestCase):
|
|||||||
driver = self.driver
|
driver = self.driver
|
||||||
global URL
|
global URL
|
||||||
driver.get(URL)
|
driver.get(URL)
|
||||||
idTitre = "titre_" + ACRONYME_FORMATION
|
idTitre = "titre-" + ACRONYME_FORMATION
|
||||||
driver.find_element_by_id(idTitre).click()
|
driver.find_element_by_id(idTitre).click()
|
||||||
self.wait.until(EC.url_changes(URL))
|
self.wait.until(EC.url_changes(URL))
|
||||||
driver.find_element_by_xpath("//a[contains(@href,'ue_create?')]").click()
|
driver.find_element_by_xpath("//a[contains(@href,'ue_create?')]").click()
|
||||||
@ -140,7 +140,7 @@ class PythonOrgSearch(unittest.TestCase):
|
|||||||
nomMat = "unematieretest"
|
nomMat = "unematieretest"
|
||||||
driver.get(URL)
|
driver.get(URL)
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
idTitre = "titre_" + ACRONYME_FORMATION
|
idTitre = "titre-" + ACRONYME_FORMATION
|
||||||
driver.find_element_by_id(idTitre).click()
|
driver.find_element_by_id(idTitre).click()
|
||||||
self.wait.until(EC.url_changes(URL))
|
self.wait.until(EC.url_changes(URL))
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
@ -166,7 +166,7 @@ class PythonOrgSearch(unittest.TestCase):
|
|||||||
driver = self.driver
|
driver = self.driver
|
||||||
global URL
|
global URL
|
||||||
driver.get(URL)
|
driver.get(URL)
|
||||||
idAddSemestre = "addSemestre_" + ACRONYME_FORMATION
|
idAddSemestre = "add-semestre-" + ACRONYME_FORMATION
|
||||||
driver.find_element_by_id(idAddSemestre).click()
|
driver.find_element_by_id(idAddSemestre).click()
|
||||||
self.wait.until(EC.url_changes(URL))
|
self.wait.until(EC.url_changes(URL))
|
||||||
driver.find_element_by_name("date_debut").send_keys("01/01/2021")
|
driver.find_element_by_name("date_debut").send_keys("01/01/2021")
|
||||||
@ -189,7 +189,7 @@ class PythonOrgSearch(unittest.TestCase):
|
|||||||
driver = self.driver
|
driver = self.driver
|
||||||
global URL
|
global URL
|
||||||
driver.get(URL)
|
driver.get(URL)
|
||||||
idTitre = "titre_" + ACRONYME_FORMATION
|
idTitre = "titre-" + ACRONYME_FORMATION
|
||||||
driver.find_element_by_id(idTitre).click()
|
driver.find_element_by_id(idTitre).click()
|
||||||
self.wait.until(EC.url_changes(URL))
|
self.wait.until(EC.url_changes(URL))
|
||||||
tmpurl = driver.current_url
|
tmpurl = driver.current_url
|
||||||
@ -212,7 +212,7 @@ class PythonOrgSearch(unittest.TestCase):
|
|||||||
driver = self.driver
|
driver = self.driver
|
||||||
global URL
|
global URL
|
||||||
driver.get(URL)
|
driver.get(URL)
|
||||||
idButtonDelete = "delete_Formation_" + ACRONYME_FORMATION
|
idButtonDelete = "delete-formation-" + ACRONYME_FORMATION
|
||||||
driver.find_element_by_id(idButtonDelete).click()
|
driver.find_element_by_id(idButtonDelete).click()
|
||||||
self.wait.until(EC.url_changes(URL))
|
self.wait.until(EC.url_changes(URL))
|
||||||
tmpURLDelete = driver.current_url
|
tmpURLDelete = driver.current_url
|
||||||
|
@ -85,7 +85,7 @@ class PythonOrgSearch(unittest.TestCase):
|
|||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
self.assertTrue(
|
self.assertTrue(
|
||||||
"Code étudiant (code_nip) dupliqué !"
|
"Code étudiant (code_nip) dupliqué !"
|
||||||
in driver.find_element_by_id("titleError").text
|
in driver.find_element_by_class_name("title-error").text
|
||||||
)
|
)
|
||||||
|
|
||||||
# Test Modification de l'adresse étudiant
|
# Test Modification de l'adresse étudiant
|
||||||
@ -108,7 +108,7 @@ class PythonOrgSearch(unittest.TestCase):
|
|||||||
driver.find_element_by_id("tf_submit").click()
|
driver.find_element_by_id("tf_submit").click()
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
self.assertTrue(
|
self.assertTrue(
|
||||||
codepostaldomicile in driver.find_element_by_id("adresse_etudiant").text
|
codepostaldomicile in driver.find_element_by_id("student-adress").text
|
||||||
)
|
)
|
||||||
|
|
||||||
# Test Inscription d'un étudiant dans un semestre
|
# Test Inscription d'un étudiant dans un semestre
|
||||||
@ -127,7 +127,7 @@ class PythonOrgSearch(unittest.TestCase):
|
|||||||
self.wait.until(EC.url_changes(URL))
|
self.wait.until(EC.url_changes(URL))
|
||||||
try:
|
try:
|
||||||
semestres = driver.find_elements_by_xpath(
|
semestres = driver.find_elements_by_xpath(
|
||||||
"//a[contains(@id,'inscription_Semestre_')]"
|
"//a[contains(@id,'inscription-semestre-')]"
|
||||||
)
|
)
|
||||||
except NoSuchElementException:
|
except NoSuchElementException:
|
||||||
self.assertFalse(True)
|
self.assertFalse(True)
|
||||||
|
@ -93,7 +93,7 @@ class PythonOrgSearch(unittest.TestCase):
|
|||||||
searchBar.send_keys(etudiant)
|
searchBar.send_keys(etudiant)
|
||||||
searchBar.submit()
|
searchBar.submit()
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
MOY_UE1 = driver.find_element_by_id("ue_" + ue_name).text
|
MOY_UE1 = driver.find_element_by_id("ue-" + ue_name).text
|
||||||
if "12" not in MOY_UE1:
|
if "12" not in MOY_UE1:
|
||||||
noteBonne = False
|
noteBonne = False
|
||||||
self.assertTrue(noteBonne)
|
self.assertTrue(noteBonne)
|
||||||
@ -129,7 +129,7 @@ class PythonOrgSearch(unittest.TestCase):
|
|||||||
searchBar.send_keys(etudiant)
|
searchBar.send_keys(etudiant)
|
||||||
searchBar.submit()
|
searchBar.submit()
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
MOY_UE2 = driver.find_element_by_id("ue_" + ue_name).text
|
MOY_UE2 = driver.find_element_by_id("ue-" + ue_name).text
|
||||||
if "8" not in MOY_UE2:
|
if "8" not in MOY_UE2:
|
||||||
noteBonne = False
|
noteBonne = False
|
||||||
|
|
||||||
@ -167,7 +167,7 @@ class PythonOrgSearch(unittest.TestCase):
|
|||||||
url = self.url
|
url = self.url
|
||||||
driver.get(url)
|
driver.get(url)
|
||||||
driver.find_element_by_id("link-programmes").click()
|
driver.find_element_by_id("link-programmes").click()
|
||||||
driver.find_element_by_id("titre_DUT Info").click()
|
driver.find_element_by_id("titre-DUT Info").click()
|
||||||
driver.find_element_by_xpath("//span[contains(text(),'M1101')]").click()
|
driver.find_element_by_xpath("//span[contains(text(),'M1101')]").click()
|
||||||
driver.find_element_by_id("tf_coefficient").clear()
|
driver.find_element_by_id("tf_coefficient").clear()
|
||||||
driver.find_element_by_id("tf_coefficient").send_keys(COEFF_UE1)
|
driver.find_element_by_id("tf_coefficient").send_keys(COEFF_UE1)
|
||||||
@ -350,11 +350,11 @@ class PythonOrgSearch(unittest.TestCase):
|
|||||||
moyenneBonne = False
|
moyenneBonne = False
|
||||||
if ue_name not in ueListText:
|
if ue_name not in ueListText:
|
||||||
affichageMoyenne = False
|
affichageMoyenne = False
|
||||||
MOY_UE1 = driver.find_element_by_id("ue_" + ue_name).text
|
MOY_UE1 = driver.find_element_by_id("ue-" + ue_name).text
|
||||||
if float(0) != float(MOY_UE1):
|
if float(0) != float(MOY_UE1):
|
||||||
noteExcuseeEgaleAZero = False
|
noteExcuseeEgaleAZero = False
|
||||||
elif numeroEtu == 1:
|
elif numeroEtu == 1:
|
||||||
MOY_UE1 = driver.find_element_by_id("ue_" + ue_name).text
|
MOY_UE1 = driver.find_element_by_id("ue-" + ue_name).text
|
||||||
moyEtudiant2 = (
|
moyEtudiant2 = (
|
||||||
float(MOY_UE1) * COEFF_UE1
|
float(MOY_UE1) * COEFF_UE1
|
||||||
+ (float(MOY_UE2) - float(moyenneBonusEtudiant2)) * COEFF_UE2
|
+ (float(MOY_UE2) - float(moyenneBonusEtudiant2)) * COEFF_UE2
|
||||||
|
@ -66,7 +66,7 @@ class PythonOrgSearch(unittest.TestCase):
|
|||||||
).click()
|
).click()
|
||||||
self.wait.until(EC.url_changes(URL_ETUDIANT))
|
self.wait.until(EC.url_changes(URL_ETUDIANT))
|
||||||
URL_DECISION = driver.current_url
|
URL_DECISION = driver.current_url
|
||||||
driver.find_element_by_id("choice_input_10").click()
|
driver.find_element_by_id("input-choice-10").click()
|
||||||
driver.find_element_by_id("subut").click()
|
driver.find_element_by_id("subut").click()
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
driver.get(URL_ETUDIANT)
|
driver.get(URL_ETUDIANT)
|
||||||
@ -87,7 +87,7 @@ class PythonOrgSearch(unittest.TestCase):
|
|||||||
).click()
|
).click()
|
||||||
self.wait.until(EC.url_changes(URL_ETUDIANT))
|
self.wait.until(EC.url_changes(URL_ETUDIANT))
|
||||||
URL_DECISION = driver.current_url
|
URL_DECISION = driver.current_url
|
||||||
driver.find_element_by_id("choice_input_40").click()
|
driver.find_element_by_id("input-choice-40").click()
|
||||||
driver.find_element_by_id("subut").click()
|
driver.find_element_by_id("subut").click()
|
||||||
driver.get(URL_ETUDIANT)
|
driver.get(URL_ETUDIANT)
|
||||||
self.assertTrue("ATJ" in driver.find_element_by_class_name("rcp_dec").text)
|
self.assertTrue("ATJ" in driver.find_element_by_class_name("rcp_dec").text)
|
||||||
@ -107,7 +107,7 @@ class PythonOrgSearch(unittest.TestCase):
|
|||||||
).click()
|
).click()
|
||||||
self.wait.until(EC.url_changes(URL_ETUDIANT))
|
self.wait.until(EC.url_changes(URL_ETUDIANT))
|
||||||
URL_DECISION = driver.current_url
|
URL_DECISION = driver.current_url
|
||||||
driver.find_element_by_id("choice_input_30").click()
|
driver.find_element_by_id("input-choice-30").click()
|
||||||
driver.find_element_by_id("subut").click()
|
driver.find_element_by_id("subut").click()
|
||||||
driver.get(URL_ETUDIANT)
|
driver.get(URL_ETUDIANT)
|
||||||
self.assertTrue("ATB" in driver.find_element_by_class_name("rcp_dec").text)
|
self.assertTrue("ATB" in driver.find_element_by_class_name("rcp_dec").text)
|
||||||
@ -117,7 +117,7 @@ class PythonOrgSearch(unittest.TestCase):
|
|||||||
).click()
|
).click()
|
||||||
self.wait.until(EC.url_changes(URL_ETUDIANT))
|
self.wait.until(EC.url_changes(URL_ETUDIANT))
|
||||||
URL_DECISION = driver.current_url
|
URL_DECISION = driver.current_url
|
||||||
driver.find_element_by_id("choice_input_580").click()
|
driver.find_element_by_id("input-choice-580").click()
|
||||||
driver.find_element_by_id("subut").click()
|
driver.find_element_by_id("subut").click()
|
||||||
driver.get(URL_ETUDIANT)
|
driver.get(URL_ETUDIANT)
|
||||||
self.assertTrue("ATB" in driver.find_element_by_class_name("rcp_dec").text)
|
self.assertTrue("ATB" in driver.find_element_by_class_name("rcp_dec").text)
|
||||||
@ -137,7 +137,7 @@ class PythonOrgSearch(unittest.TestCase):
|
|||||||
).click()
|
).click()
|
||||||
self.wait.until(EC.url_changes(URL_ETUDIANT))
|
self.wait.until(EC.url_changes(URL_ETUDIANT))
|
||||||
URL_DECISION = driver.current_url
|
URL_DECISION = driver.current_url
|
||||||
driver.find_element_by_id("choice_input_40").click()
|
driver.find_element_by_id("input-choice-40").click()
|
||||||
driver.find_element_by_id("subut").click()
|
driver.find_element_by_id("subut").click()
|
||||||
driver.get(URL_ETUDIANT)
|
driver.get(URL_ETUDIANT)
|
||||||
self.assertTrue("ATJ" in driver.find_element_by_class_name("rcp_dec").text)
|
self.assertTrue("ATJ" in driver.find_element_by_class_name("rcp_dec").text)
|
||||||
@ -147,7 +147,7 @@ class PythonOrgSearch(unittest.TestCase):
|
|||||||
).click()
|
).click()
|
||||||
self.wait.until(EC.url_changes(URL_ETUDIANT))
|
self.wait.until(EC.url_changes(URL_ETUDIANT))
|
||||||
URL_DECISION = driver.current_url
|
URL_DECISION = driver.current_url
|
||||||
driver.find_element_by_id("choice_input_580").click()
|
driver.find_element_by_id("input-choice-580").click()
|
||||||
driver.find_element_by_id("subut").click()
|
driver.find_element_by_id("subut").click()
|
||||||
driver.get(URL_ETUDIANT)
|
driver.get(URL_ETUDIANT)
|
||||||
self.assertTrue("ATB" in driver.find_element_by_class_name("rcp_dec").text)
|
self.assertTrue("ATB" in driver.find_element_by_class_name("rcp_dec").text)
|
||||||
|
@ -170,7 +170,7 @@ test10:
|
|||||||
tf_code_nip,
|
tf_code_nip,
|
||||||
dont_check_homonyms:list,
|
dont_check_homonyms:list,
|
||||||
tf_submit,
|
tf_submit,
|
||||||
titleError,
|
title-error,
|
||||||
]
|
]
|
||||||
role: [*AdminDPT, *Secretaire]
|
role: [*AdminDPT, *Secretaire]
|
||||||
createur: Aurélien
|
createur: Aurélien
|
||||||
@ -180,10 +180,10 @@ test11:
|
|||||||
Se rendre sur la fiche étudiante d'un étudiant avec l'aide de la recherche à l'id in-expnom(sidebar)
|
Se rendre sur la fiche étudiante d'un étudiant avec l'aide de la recherche à l'id in-expnom(sidebar)
|
||||||
Clicker sur changer de coordonnées
|
Clicker sur changer de coordonnées
|
||||||
Remplir le formulaire et le soumestre
|
Remplir le formulaire et le soumestre
|
||||||
resultat: L'élèment à l'id adresse_etudiant contient désormais les informations mise à jour.
|
resultat: L'élèment à l'id student-adress contient désormais les informations mise à jour.
|
||||||
etat: *ProgramCreated
|
etat: *ProgramCreated
|
||||||
page: *Scolarite
|
page: *Scolarite
|
||||||
champsModifie: adresse_etudiant
|
champsModifie: student-adress
|
||||||
champsInteractions:
|
champsInteractions:
|
||||||
[in-expnom, tf_domicile, tf_codepostaldomicile, tf_paysdomicile, tf_submit]
|
[in-expnom, tf_domicile, tf_codepostaldomicile, tf_paysdomicile, tf_submit]
|
||||||
role: [*AdminDPT, *Secretaire]
|
role: [*AdminDPT, *Secretaire]
|
||||||
@ -196,7 +196,7 @@ test12:
|
|||||||
page: *Scolarite
|
page: *Scolarite
|
||||||
champsModifie: null
|
champsModifie: null
|
||||||
champsInteractions:
|
champsInteractions:
|
||||||
[in-expnom, url_inscription_with_modules, inscription_Semestre_]
|
[in-expnom, url_inscription_with_modules, inscription-semestre-]
|
||||||
role: *Secretaire
|
role: *Secretaire
|
||||||
createur: Aurélien
|
createur: Aurélien
|
||||||
test13:
|
test13:
|
||||||
@ -420,7 +420,7 @@ test34:
|
|||||||
[
|
[
|
||||||
id:in-expnom,
|
id:in-expnom,
|
||||||
id:ProgrammesLink,
|
id:ProgrammesLink,
|
||||||
id:titre_,
|
id:titre-,
|
||||||
id:tf_coefficient,
|
id:tf_coefficient,
|
||||||
id:tf_submit,
|
id:tf_submit,
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user