Compare commits
No commits in common. "491c50ebc0d372052a22de461775d61d84885373" and "545be29ac69a9151e9e58b32ef30ac7e9556a17b" have entirely different histories.
491c50ebc0
...
545be29ac6
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,4 +4,3 @@ settings.json
|
|||||||
*__pycache__*
|
*__pycache__*
|
||||||
*__pycache__/*
|
*__pycache__/*
|
||||||
geckodriver.log
|
geckodriver.log
|
||||||
*/output/*
|
|
@ -2,7 +2,6 @@
|
|||||||
import unittest
|
import unittest
|
||||||
import time
|
import time
|
||||||
import subprocess
|
import subprocess
|
||||||
import HtmlTestRunner
|
|
||||||
from setting import (
|
from setting import (
|
||||||
SCODOC_ADMIN_ID,
|
SCODOC_ADMIN_ID,
|
||||||
SCODOC_ADMIN_PASS,
|
SCODOC_ADMIN_PASS,
|
||||||
@ -87,4 +86,4 @@ if __name__ == "__main__":
|
|||||||
cmdProcess = ["./scriptCreationDepartement.sh", LINK_SCODOC_SERVER, NOM_DPT]
|
cmdProcess = ["./scriptCreationDepartement.sh", LINK_SCODOC_SERVER, NOM_DPT]
|
||||||
process = subprocess.Popen(cmdProcess)
|
process = subprocess.Popen(cmdProcess)
|
||||||
process.wait()
|
process.wait()
|
||||||
unittest.main(testRunner=HtmlTestRunner.HTMLTestRunner(output="./output"))
|
unittest.main()
|
@ -2,7 +2,6 @@
|
|||||||
import unittest
|
import unittest
|
||||||
import time
|
import time
|
||||||
import subprocess
|
import subprocess
|
||||||
import HtmlTestRunner
|
|
||||||
from setting import (
|
from setting import (
|
||||||
SCODOC_ADMIN_ID,
|
SCODOC_ADMIN_ID,
|
||||||
SCODOC_ADMIN_PASS,
|
SCODOC_ADMIN_PASS,
|
||||||
@ -119,14 +118,17 @@ class PythonOrgSearch(unittest.TestCase):
|
|||||||
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()
|
||||||
driver.find_element_by_id("tf_titre").send_keys("UE TEST")
|
driver.find_element_by_id('tf_titre').send_keys("UE TEST")
|
||||||
driver.find_element_by_id("tf_acronyme").send_keys("TEST")
|
driver.find_element_by_id('tf_acronyme').send_keys("TEST")
|
||||||
driver.find_element_by_id("tf_submit").click()
|
driver.find_element_by_id('tf_submit').click()
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
driver.get(URL)
|
driver.get(URL)
|
||||||
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))
|
||||||
self.assertTrue("TEST UE TEST" in driver.page_source)
|
self.assertTrue(
|
||||||
|
"TEST UE TEST"
|
||||||
|
in driver.page_source
|
||||||
|
)
|
||||||
driver.get(URL)
|
driver.get(URL)
|
||||||
|
|
||||||
# Test : Ajout d'une matière dans la formation
|
# Test : Ajout d'une matière dans la formation
|
||||||
@ -136,19 +138,16 @@ class PythonOrgSearch(unittest.TestCase):
|
|||||||
global URL
|
global URL
|
||||||
nomMat = "unematieretest"
|
nomMat = "unematieretest"
|
||||||
driver.get(URL)
|
driver.get(URL)
|
||||||
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)
|
|
||||||
driver.find_element_by_xpath("//a[contains(@href,'matiere_create?')]").click()
|
driver.find_element_by_xpath("//a[contains(@href,'matiere_create?')]").click()
|
||||||
driver.find_element_by_id("tf_titre").send_keys(nomMat)
|
driver.find_element_by_id('tf_titre').send_keys(nomMat)
|
||||||
driver.find_element_by_id("tf_numero").send_keys("1")
|
driver.find_element_by_id('tf_numero').send_keys("1")
|
||||||
driver.find_element_by_id("tf_submit").click()
|
driver.find_element_by_id('tf_submit').click()
|
||||||
time.sleep(3)
|
time.sleep(1)
|
||||||
driver.get(URL)
|
driver.get(URL)
|
||||||
driver.find_element_by_id(idTitre).click()
|
driver.find_element_by_id(idTitre).click()
|
||||||
time.sleep(3)
|
|
||||||
self.wait.until(EC.url_changes(URL))
|
self.wait.until(EC.url_changes(URL))
|
||||||
elements = driver.find_elements_by_xpath("//a[contains(@href,'matiere_edit?')]")
|
elements = driver.find_elements_by_xpath("//a[contains(@href,'matiere_edit?')]")
|
||||||
matIsPresent = False
|
matIsPresent = False
|
||||||
@ -179,7 +178,6 @@ class PythonOrgSearch(unittest.TestCase):
|
|||||||
driver.get(URL)
|
driver.get(URL)
|
||||||
|
|
||||||
self.assertTrue((NOM_DPT.upper() + "-" + "DUT" + "--") in driver.page_source)
|
self.assertTrue((NOM_DPT.upper() + "-" + "DUT" + "--") in driver.page_source)
|
||||||
|
|
||||||
# Test : Dupplique une formation sous une nouvelle version
|
# Test : Dupplique une formation sous une nouvelle version
|
||||||
# @expected : La formation est dupliquée et à la version "2"
|
# @expected : La formation est dupliquée et à la version "2"
|
||||||
def test_017_creer_nouvelle_version_formation(self):
|
def test_017_creer_nouvelle_version_formation(self):
|
||||||
@ -190,19 +188,16 @@ class PythonOrgSearch(unittest.TestCase):
|
|||||||
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
|
||||||
driver.find_element_by_xpath(
|
driver.find_element_by_xpath("//a[contains(@href,'formation_create_new_version?')]").click()
|
||||||
"//a[contains(@href,'formation_create_new_version?')]"
|
|
||||||
).click()
|
|
||||||
self.wait.until(EC.url_changes(tmpurl))
|
self.wait.until(EC.url_changes(tmpurl))
|
||||||
self.assertTrue("Nouvelle version !" in driver.page_source)
|
self.assertTrue("Nouvelle version !" in driver.page_source)
|
||||||
driver.get(URL)
|
driver.get(URL)
|
||||||
elements = driver.find_elements_by_class_name("version")
|
elements = driver.find_elements_by_class_name("version")
|
||||||
versionIsPresent = False
|
versionIsPresent = False
|
||||||
for element in elements:
|
for element in elements:
|
||||||
if element.text == "2":
|
if element.text == '2':
|
||||||
versionIsPresent = True
|
versionIsPresent = True
|
||||||
self.assertTrue(versionIsPresent)
|
self.assertTrue(versionIsPresent)
|
||||||
|
|
||||||
# Test : Supprime une formation après avoir supprimé les semestres qui y sont rattachés
|
# Test : Supprime une formation après avoir supprimé les semestres qui y sont rattachés
|
||||||
# @expected : La formation n'apparait plus dans le tableau des formations
|
# @expected : La formation n'apparait plus dans le tableau des formations
|
||||||
def test_020_delete_formation(self):
|
def test_020_delete_formation(self):
|
||||||
@ -257,4 +252,22 @@ if __name__ == "__main__":
|
|||||||
cmdProcess = ["./scriptCreationDepartement.sh", LINK_SCODOC_SERVER, NOM_DPT]
|
cmdProcess = ["./scriptCreationDepartement.sh", LINK_SCODOC_SERVER, NOM_DPT]
|
||||||
process = subprocess.Popen(cmdProcess)
|
process = subprocess.Popen(cmdProcess)
|
||||||
process.wait()
|
process.wait()
|
||||||
unittest.main(testRunner=HtmlTestRunner.HTMLTestRunner(output="./output"))
|
#driver = webdriver.Firefox()
|
||||||
|
#driver.get(
|
||||||
|
# "https://"
|
||||||
|
# + SCODOC_ADMIN_ID
|
||||||
|
# + ":"
|
||||||
|
# + SCODOC_ADMIN_PASS
|
||||||
|
# + "@"
|
||||||
|
# + BASE_NOT_SECURED_URL
|
||||||
|
# + "force_admin_authentication"
|
||||||
|
# )
|
||||||
|
#driver.get(BASE_URL + "/scodoc_admin")
|
||||||
|
#time.sleep(2)
|
||||||
|
#select = Select(driver.find_element_by_id("CreateDept"))
|
||||||
|
#select.select_by_visible_text(NOM_DPT)
|
||||||
|
#driver.find_element_by_name("DeptId").submit()
|
||||||
|
#time.sleep(1)
|
||||||
|
#driver.find_element_by_id("tf_submit").click()
|
||||||
|
#driver.close()
|
||||||
|
unittest.main()
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import unittest
|
import unittest
|
||||||
import time
|
import time
|
||||||
import HtmlTestRunner
|
|
||||||
import subprocess
|
import subprocess
|
||||||
from setting import (
|
from setting import (
|
||||||
SCODOC_ADMIN_ID,
|
SCODOC_ADMIN_ID,
|
||||||
@ -196,4 +195,4 @@ if __name__ == "__main__":
|
|||||||
]
|
]
|
||||||
process = subprocess.Popen(cmdProcess)
|
process = subprocess.Popen(cmdProcess)
|
||||||
process.wait()
|
process.wait()
|
||||||
unittest.main(testRunner=HtmlTestRunner.HTMLTestRunner(output="./output"))
|
unittest.main()
|
@ -2,7 +2,6 @@ import unittest
|
|||||||
import time
|
import time
|
||||||
import urllib.parse as urlparse
|
import urllib.parse as urlparse
|
||||||
import subprocess
|
import subprocess
|
||||||
import HtmlTestRunner
|
|
||||||
from setting import (
|
from setting import (
|
||||||
SCODOC_ADMIN_ID,
|
SCODOC_ADMIN_ID,
|
||||||
SCODOC_ADMIN_PASS,
|
SCODOC_ADMIN_PASS,
|
||||||
@ -165,4 +164,4 @@ if __name__ == "__main__":
|
|||||||
]
|
]
|
||||||
process = subprocess.Popen(cmdProcess)
|
process = subprocess.Popen(cmdProcess)
|
||||||
process.wait()
|
process.wait()
|
||||||
unittest.main(testRunner=HtmlTestRunner.HTMLTestRunner(output="./output"))
|
unittest.main()
|
@ -2,7 +2,6 @@ import unittest
|
|||||||
import time
|
import time
|
||||||
import subprocess
|
import subprocess
|
||||||
import urllib.parse as urlparse
|
import urllib.parse as urlparse
|
||||||
import HtmlTestRunner
|
|
||||||
from setting import (
|
from setting import (
|
||||||
SCODOC_ADMIN_ID,
|
SCODOC_ADMIN_ID,
|
||||||
SCODOC_ADMIN_PASS,
|
SCODOC_ADMIN_PASS,
|
||||||
@ -396,4 +395,4 @@ if __name__ == "__main__":
|
|||||||
driver.find_element_by_id("tf_submit").click()
|
driver.find_element_by_id("tf_submit").click()
|
||||||
driver.find_element_by_id("utilisateurs_Vue").click()
|
driver.find_element_by_id("utilisateurs_Vue").click()
|
||||||
driver.close()
|
driver.close()
|
||||||
unittest.main(testRunner=HtmlTestRunner.HTMLTestRunner(output="./output"))
|
unittest.main(warnings="ignore")
|
||||||
|
@ -2,7 +2,6 @@ import unittest
|
|||||||
import time
|
import time
|
||||||
import subprocess
|
import subprocess
|
||||||
import urllib.parse as urlparse
|
import urllib.parse as urlparse
|
||||||
import HtmlTestRunner
|
|
||||||
from setting import (
|
from setting import (
|
||||||
SCODOC_ADMIN_ID,
|
SCODOC_ADMIN_ID,
|
||||||
SCODOC_ADMIN_PASS,
|
SCODOC_ADMIN_PASS,
|
||||||
@ -445,4 +444,4 @@ if __name__ == "__main__":
|
|||||||
]
|
]
|
||||||
process = subprocess.Popen(cmdProcess)
|
process = subprocess.Popen(cmdProcess)
|
||||||
process.wait()
|
process.wait()
|
||||||
unittest.main(testRunner=HtmlTestRunner.HTMLTestRunner(output="./output"))
|
unittest.main(warnings="ignore")
|
@ -2,7 +2,6 @@ import unittest
|
|||||||
import time
|
import time
|
||||||
import subprocess
|
import subprocess
|
||||||
import urllib.parse as urlparse
|
import urllib.parse as urlparse
|
||||||
import HtmlTestRunner
|
|
||||||
from setting import (
|
from setting import (
|
||||||
SCODOC_ADMIN_ID,
|
SCODOC_ADMIN_ID,
|
||||||
SCODOC_ADMIN_PASS,
|
SCODOC_ADMIN_PASS,
|
||||||
@ -233,4 +232,4 @@ if __name__ == "__main__":
|
|||||||
]
|
]
|
||||||
process = subprocess.Popen(cmdProcess)
|
process = subprocess.Popen(cmdProcess)
|
||||||
process.wait()
|
process.wait()
|
||||||
unittest.main(testRunner=HtmlTestRunner.HTMLTestRunner(output="./output"))
|
unittest.main(warnings="ignore")
|
@ -589,22 +589,28 @@ test48:
|
|||||||
page: *Notes
|
page: *Notes
|
||||||
champsModifie: null
|
champsModifie: null
|
||||||
champsInteractions:
|
champsInteractions:
|
||||||
[id:tf_titre, id:tf_acronyme, id:tf_submit, link:ue_create]
|
[
|
||||||
|
id:tf_titre,
|
||||||
|
id:tf_acronyme,
|
||||||
|
id:tf_submit,
|
||||||
|
link:ue_create
|
||||||
|
]
|
||||||
role: *AdminDPT
|
role: *AdminDPT
|
||||||
createur: Aurélien
|
createur: Aurélien
|
||||||
test49:
|
test49:
|
||||||
intitulé: Ajout d'une matière à la formation créée
|
intitulé: Ajout d'une matière à l'UE créée
|
||||||
operation: Soumettre le formulaire d'ajout de matière
|
operation: Soumettre le formulaire d'ajout de matière
|
||||||
resultat: La page sur laquelle on est dirigée contient la classe notes_matiere_list et l'intitulé de la matière est présent
|
resultat: La page sur laquelle on est dirigée contient la classe notes_matiere_list et un de ses enfants contient Systeme
|
||||||
etat: *MatiereCreated
|
etat: *MatiereCreated
|
||||||
page: *Notes
|
page: *Notes
|
||||||
champsModifie: null
|
champsModifie: null
|
||||||
champsInteractions: [
|
champsInteractions:
|
||||||
|
[
|
||||||
id:tf_titre,
|
id:tf_titre,
|
||||||
id:tf_acronyme,
|
id:tf_acronyme,
|
||||||
id:tf_submit,
|
id:tf_submit,
|
||||||
link:matiere_create
|
link:matiere_create
|
||||||
link:matiere_edit,
|
link:matiere_edit
|
||||||
]
|
]
|
||||||
role: *AdminDPT
|
role: *AdminDPT
|
||||||
createur: Aurélien
|
createur: Aurélien
|
||||||
|
Loading…
Reference in New Issue
Block a user