@@ -21,6 +21,8 @@ Options (* indicates it is required):"
*\-p ,\--password \<Parameter>\ The password of the user.
\-h ,\--url \<Parameter>\ The URL of the host e.g. https://www.minds.com/ - defaults to use localhost.
\-u ,\--username \<Parameter>\ The username - defaults to cypress_e2e_test.
\-pu ,\--pro_username \<Parameter>\ The pro users username.
\-pp ,\--pro_password \<Parameter>\ The pro users password
\-v ,\---video \<Parameter>\ true if you want video providing.
\-e, \--env \<Parameter>\ add additional env variables e.g. production=true
"
...
...
@@ -54,6 +56,8 @@ POSITIONAL=()
# set default arguments
url="http://localhost"
username="minds_cypress_tests"
pro_username="minds_cypress_tests_pro"
pro_password="123123213"
env=""
_video=false
while[[$# -gt 0 ]]
...
...
@@ -77,6 +81,14 @@ case $key in
_video="$2"
shift 2
;;
-pu|--pro-username)
pro_username="$2"
shift 2
;;
-pp|--pro-password)
pro_password="$2"
shift 2
;;
-e|--env)
env=",$2"
shift 2
...
...
@@ -108,5 +120,5 @@ init_args $@
# while [[ $PWD != '/' && ${PWD##*/} != 'front' ]]; do cd ..; done
#run cypress with args.
echo$(npm bin)/cypress open --configbaseUrl=$url,video=$_video--envusername=$username,password=$password$env$POSITIONAL
$(npm bin)/cypress open --configbaseUrl=$url,video=$_video--envusername=$username,password=$password$env$POSITIONAL
echo$(npm bin)/cypress open --configbaseUrl=$url,video=$_video--envusername=$username,password=$password,pro_username=$pro_username,pro_password=$pro_password$env$POSITIONAL
$(npm bin)/cypress open --configbaseUrl=$url,video=$_video--envusername=$username,password=$password,pro_username=$pro_username,pro_password=$pro_password$env$POSITIONAL