changement sur le nom des id et classe

This commit is contained in:
Aurélien Plancke 2021-06-25 01:07:44 +02:00
parent 137bc378b8
commit 1e2b8f3a87
5 changed files with 27 additions and 27 deletions

View File

@ -25,7 +25,7 @@ from selenium.webdriver.support.select import Select
URL = BASE_URL + NOM_DPT + "/Scolarite"
ACRONYME_FORMATION = "FormationTEST"
ACRONYME_FORMATION = "formationtest"
class PythonOrgSearch(unittest.TestCase):
@ -74,7 +74,7 @@ class PythonOrgSearch(unittest.TestCase):
driver = self.driver
global URL
driver.get(URL)
idEditFormation = "edit_Formation_" + ACRONYME_FORMATION
idEditFormation = "edit-formation-" + ACRONYME_FORMATION
driver.find_element_by_id(idEditFormation).click()
self.wait.until(EC.url_changes(URL))
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)
# Remise du nom à celui de départ
driver.get(URL)
idEditFormation = "edit_Formation_" + ACRONYME_FORMATION + ACRONYME_FORMATION
idEditFormation = "edit-formation-" + ACRONYME_FORMATION + ACRONYME_FORMATION
driver.find_element_by_id(idEditFormation).click()
self.wait.until(EC.url_changes(URL))
driver.find_element_by_id("tf_acronyme").clear()
@ -118,7 +118,7 @@ class PythonOrgSearch(unittest.TestCase):
driver = self.driver
global URL
driver.get(URL)
idTitre = "titre_" + ACRONYME_FORMATION
idTitre = "titre-" + ACRONYME_FORMATION
driver.find_element_by_id(idTitre).click()
self.wait.until(EC.url_changes(URL))
driver.find_element_by_xpath("//a[contains(@href,'ue_create?')]").click()
@ -140,7 +140,7 @@ class PythonOrgSearch(unittest.TestCase):
nomMat = "unematieretest"
driver.get(URL)
time.sleep(3)
idTitre = "titre_" + ACRONYME_FORMATION
idTitre = "titre-" + ACRONYME_FORMATION
driver.find_element_by_id(idTitre).click()
self.wait.until(EC.url_changes(URL))
time.sleep(3)
@ -166,7 +166,7 @@ class PythonOrgSearch(unittest.TestCase):
driver = self.driver
global URL
driver.get(URL)
idAddSemestre = "addSemestre_" + ACRONYME_FORMATION
idAddSemestre = "add-semestre-" + ACRONYME_FORMATION
driver.find_element_by_id(idAddSemestre).click()
self.wait.until(EC.url_changes(URL))
driver.find_element_by_name("date_debut").send_keys("01/01/2021")
@ -189,7 +189,7 @@ class PythonOrgSearch(unittest.TestCase):
driver = self.driver
global URL
driver.get(URL)
idTitre = "titre_" + ACRONYME_FORMATION
idTitre = "titre-" + ACRONYME_FORMATION
driver.find_element_by_id(idTitre).click()
self.wait.until(EC.url_changes(URL))
tmpurl = driver.current_url
@ -212,7 +212,7 @@ class PythonOrgSearch(unittest.TestCase):
driver = self.driver
global URL
driver.get(URL)
idButtonDelete = "delete_Formation_" + ACRONYME_FORMATION
idButtonDelete = "delete-formation-" + ACRONYME_FORMATION
driver.find_element_by_id(idButtonDelete).click()
self.wait.until(EC.url_changes(URL))
tmpURLDelete = driver.current_url

View File

@ -85,7 +85,7 @@ class PythonOrgSearch(unittest.TestCase):
time.sleep(1)
self.assertTrue(
"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
@ -108,7 +108,7 @@ class PythonOrgSearch(unittest.TestCase):
driver.find_element_by_id("tf_submit").click()
time.sleep(1)
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
@ -127,7 +127,7 @@ class PythonOrgSearch(unittest.TestCase):
self.wait.until(EC.url_changes(URL))
try:
semestres = driver.find_elements_by_xpath(
"//a[contains(@id,'inscription_Semestre_')]"
"//a[contains(@id,'inscription-semestre-')]"
)
except NoSuchElementException:
self.assertFalse(True)

View File

@ -93,7 +93,7 @@ class PythonOrgSearch(unittest.TestCase):
searchBar.send_keys(etudiant)
searchBar.submit()
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:
noteBonne = False
self.assertTrue(noteBonne)
@ -129,7 +129,7 @@ class PythonOrgSearch(unittest.TestCase):
searchBar.send_keys(etudiant)
searchBar.submit()
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:
noteBonne = False
@ -167,7 +167,7 @@ class PythonOrgSearch(unittest.TestCase):
url = self.url
driver.get(url)
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_id("tf_coefficient").clear()
driver.find_element_by_id("tf_coefficient").send_keys(COEFF_UE1)
@ -350,11 +350,11 @@ class PythonOrgSearch(unittest.TestCase):
moyenneBonne = False
if ue_name not in ueListText:
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):
noteExcuseeEgaleAZero = False
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 = (
float(MOY_UE1) * COEFF_UE1
+ (float(MOY_UE2) - float(moyenneBonusEtudiant2)) * COEFF_UE2

View File

@ -66,7 +66,7 @@ class PythonOrgSearch(unittest.TestCase):
).click()
self.wait.until(EC.url_changes(URL_ETUDIANT))
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()
time.sleep(1)
driver.get(URL_ETUDIANT)
@ -87,7 +87,7 @@ class PythonOrgSearch(unittest.TestCase):
).click()
self.wait.until(EC.url_changes(URL_ETUDIANT))
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.get(URL_ETUDIANT)
self.assertTrue("ATJ" in driver.find_element_by_class_name("rcp_dec").text)
@ -107,7 +107,7 @@ class PythonOrgSearch(unittest.TestCase):
).click()
self.wait.until(EC.url_changes(URL_ETUDIANT))
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.get(URL_ETUDIANT)
self.assertTrue("ATB" in driver.find_element_by_class_name("rcp_dec").text)
@ -117,7 +117,7 @@ class PythonOrgSearch(unittest.TestCase):
).click()
self.wait.until(EC.url_changes(URL_ETUDIANT))
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.get(URL_ETUDIANT)
self.assertTrue("ATB" in driver.find_element_by_class_name("rcp_dec").text)
@ -137,7 +137,7 @@ class PythonOrgSearch(unittest.TestCase):
).click()
self.wait.until(EC.url_changes(URL_ETUDIANT))
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.get(URL_ETUDIANT)
self.assertTrue("ATJ" in driver.find_element_by_class_name("rcp_dec").text)
@ -147,7 +147,7 @@ class PythonOrgSearch(unittest.TestCase):
).click()
self.wait.until(EC.url_changes(URL_ETUDIANT))
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.get(URL_ETUDIANT)
self.assertTrue("ATB" in driver.find_element_by_class_name("rcp_dec").text)

View File

@ -170,7 +170,7 @@ test10:
tf_code_nip,
dont_check_homonyms:list,
tf_submit,
titleError,
title-error,
]
role: [*AdminDPT, *Secretaire]
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)
Clicker sur changer de coordonnées
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
page: *Scolarite
champsModifie: adresse_etudiant
champsModifie: student-adress
champsInteractions:
[in-expnom, tf_domicile, tf_codepostaldomicile, tf_paysdomicile, tf_submit]
role: [*AdminDPT, *Secretaire]
@ -196,7 +196,7 @@ test12:
page: *Scolarite
champsModifie: null
champsInteractions:
[in-expnom, url_inscription_with_modules, inscription_Semestre_]
[in-expnom, url_inscription_with_modules, inscription-semestre-]
role: *Secretaire
createur: Aurélien
test13:
@ -420,7 +420,7 @@ test34:
[
id:in-expnom,
id:ProgrammesLink,
id:titre_,
id:titre-,
id:tf_coefficient,
id:tf_submit,
]