mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 07:44:35 +02:00
Added test development features
This commit is contained in:
parent
c723a34f2c
commit
94ed066b31
7
extras/build_ci_dev_vars.sh
Executable file
7
extras/build_ci_dev_vars.sh
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
export TRAVIS_JOB_NUMBER="DEBUG"
|
||||||
|
export TRAVIS_COMMIT="DEBUG"
|
||||||
|
export TRAVIS_BRANCH="DEBUG"
|
||||||
|
export SAUCE_USERNAME="DEBUG"
|
||||||
|
export SAUCE_ACCESS_KEY="DEBUG"
|
||||||
|
export DEVELOPMENT=1
|
@ -4,6 +4,17 @@ from selenium.webdriver.common.by import By
|
|||||||
from selenium.webdriver.support.ui import WebDriverWait
|
from selenium.webdriver.support.ui import WebDriverWait
|
||||||
from selenium.webdriver.support import expected_conditions as EC
|
from selenium.webdriver.support import expected_conditions as EC
|
||||||
|
|
||||||
|
import random
|
||||||
|
import string
|
||||||
|
|
||||||
|
def gen_random_string(size,preffix=None):
|
||||||
|
random_string = ''.join(random.SystemRandom().choice(string.ascii_uppercase string.digits) for _ in range(size))
|
||||||
|
if preffix:
|
||||||
|
return preffix+random_string
|
||||||
|
else:
|
||||||
|
return random_string
|
||||||
|
|
||||||
|
|
||||||
def login(driver,user="admin",passwd="pandora",pandora_url="http://127.0.0.1/"):
|
def login(driver,user="admin",passwd="pandora",pandora_url="http://127.0.0.1/"):
|
||||||
driver.get(pandora_url+"/pandora_console/index.php")
|
driver.get(pandora_url+"/pandora_console/index.php")
|
||||||
driver.find_element_by_id("nick").clear()
|
driver.find_element_by_id("nick").clear()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user