creation utilisateurs chef et enseignant pour tests
This commit is contained in:
parent
7d52d21bc1
commit
812a55f185
11
.env
11
.env
@ -1,11 +0,0 @@
|
|||||||
BASE_URL = "https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/"
|
|
||||||
NOM_DPT = "test01"
|
|
||||||
SCODOC_ADMIN_ID = "admin"
|
|
||||||
SCODOC_ADMIN_PASS = "root_pass_42"
|
|
||||||
SCODOC_ENS_ID = "enseignant"
|
|
||||||
SCODOC_ENS_PASS = "enseignant@"
|
|
||||||
SCODOC_CHEF_ID = "chefdesetudes"
|
|
||||||
SCODOC_CHEF_PASS = "passwordUS42"
|
|
||||||
LINK_SCODOC_SERVER = "root@scodoc-dev-iutinfo.univ-lille.fr"
|
|
||||||
BASE_NOT_SECURED_URL = "scodoc-dev-iutinfo.univ-lille.fr/"
|
|
||||||
NAVIGATEUR = "firefox"
|
|
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,2 +1,5 @@
|
|||||||
settings.json
|
settings.json
|
||||||
.vscode
|
.vscode
|
||||||
|
.env
|
||||||
|
*__pycache__*
|
||||||
|
*__pycache__/*
|
@ -290,8 +290,30 @@ if __name__ == "__main__":
|
|||||||
+ BASE_NOT_SECURED_URL
|
+ BASE_NOT_SECURED_URL
|
||||||
+ "force_admin_authentication"
|
+ "force_admin_authentication"
|
||||||
)
|
)
|
||||||
|
driver.get(BASE_URL)
|
||||||
driver.find_element_by_id("utilisateur_Vue").click()
|
driver.find_element_by_id("utilisateur_Vue").click()
|
||||||
if(SCODOC_CHEF_ID not in driver.page_source):
|
if SCODOC_CHEF_ID not in driver.page_source:
|
||||||
|
constructValue = Ens + NOM_DPT
|
||||||
|
driver.find_element_by_id("creer_Utilisateur").click()
|
||||||
unittest.main()
|
driver.find_element_by_id().send_keys(SCODOC_CHEF_ID)
|
||||||
|
driver.find_element_by_id().send_keys(SCODOC_CHEF_ID)
|
||||||
|
driver.find_element_by_id().send_keys("chef")
|
||||||
|
driver.find_element_by_id().send_keys(SCODOC_CHEF_PASS)
|
||||||
|
driver.find_element_by_id().send_keys(SCODOC_CHEF_PASS)
|
||||||
|
driver.find_element_by_xpath("//input[@name='" + constructValue + "]").click()
|
||||||
|
driver.find_element_by_xpath("//input[@name='force::list").click()
|
||||||
|
driver.find_element_by_id("tf_submit").click()
|
||||||
|
driver.find_element_by_id("utilisateur_Vue").click()
|
||||||
|
if SCODOC_ENS_ID not in driver.page_source:
|
||||||
|
constructValue = Ens + NOM_DPT
|
||||||
|
driver.find_element_by_id("creer_Utilisateur").click()
|
||||||
|
driver.find_element_by_id().send_keys(SCODOC_CHEF_ID)
|
||||||
|
driver.find_element_by_id().send_keys(SCODOC_CHEF_ID)
|
||||||
|
driver.find_element_by_id().send_keys("chef")
|
||||||
|
driver.find_element_by_id().send_keys(SCODOC_CHEF_PASS)
|
||||||
|
driver.find_element_by_id().send_keys(SCODOC_CHEF_PASS)
|
||||||
|
driver.find_element_by_xpath("//input[@name='" + constructValue + "]").click()
|
||||||
|
driver.find_element_by_xpath("//input[@name='force::list").click()
|
||||||
|
driver.find_element_by_id("tf_submit").click()
|
||||||
|
driver.find_element_by_id("utilisateur_Vue").click()
|
||||||
|
unittest.main()
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
I Configuaration
|
I Configuration
|
||||||
|
|
||||||
Environnement de test :
|
Environnement de test :
|
||||||
Editer le .envmodel pour remplacer les différentes informations qui permettent d'intéragir avec Scodoc (attention au / dans les liens, il y a des exemples)
|
Editer le .envmodel pour remplacer les différentes informations qui permettent d'intéragir avec Scodoc (attention au / dans les liens, il y a des exemples)
|
||||||
|
Loading…
Reference in New Issue
Block a user