forked from sio2project/oioioi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_cypress.sh
More file actions
executable file
·34 lines (26 loc) · 827 Bytes
/
test_cypress.sh
File metadata and controls
executable file
·34 lines (26 loc) · 827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# https://intoli.com/blog/exit-on-errors-in-bash-scripts/
set -e
# Run this script with -g to run CyPress with GUI
# or without to run tests in terminal mode.
# cy:run runs tests in terminal mode
# cy:open opens interactive gui
echo -e "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo -e " Remember to flush the database "
echo -e " and create superuser admin, admin. "
echo -e "Some tests may relay on an empty database"
echo -e "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
gui='run'
while getopts 'g' flag; do
case "${flag}" in
g) gui='open' ;;
esac
done
pushd oioioi_cypress
# Resolve dependencies
yarn
# Wait for a server
npx wait-on http://localhost:8000 --timeout 30000
# Run tests
CYPRESS_baseUrl=http://localhost:8000 yarn cy:${gui}
popd