2020-01-10 09:38:37 -06:00
|
|
|
CYPRESS_BINARY = ${top_srcdir}/cypress_test/node_modules/cypress/bin/cypress
|
|
|
|
|
|
|
|
DESKTOP_TEST_FOLDER = integration_tests/desktop
|
|
|
|
MOBILE_TEST_FOLDER = integration_tests/mobile
|
|
|
|
MOBILE_USER_AGENT = "cypress mobile test"
|
|
|
|
|
2020-01-12 06:05:04 -06:00
|
|
|
if HAVE_LO_PATH
|
2020-01-10 09:38:37 -06:00
|
|
|
check-local: @JAILS_PATH@
|
|
|
|
@npm install
|
|
|
|
@echo
|
|
|
|
@pkill loolwsd || true
|
|
|
|
@echo "Launching loolwsd for testing.."
|
|
|
|
@fc-cache "@LO_PATH@"/share/fonts/truetype
|
|
|
|
@echo
|
|
|
|
../loolwsd --o:sys_template_path="@SYSTEMPLATE_PATH@" \
|
|
|
|
--o:child_root_path="@JAILS_PATH@" --o:storage.filesystem[@allow]=true \
|
|
|
|
--o:ssl.cert_file_path="$(abs_top_srcdir)/etc/cert.pem" \
|
|
|
|
--o:ssl.key_file_path="$(abs_top_srcdir)/etc/key.pem" \
|
|
|
|
--o:ssl.ca_file_path="$(abs_top_srcdir)/etc/ca-chain.cert.pem" \
|
|
|
|
--o:admin_console.username=admin --o:admin_console.password=admin \
|
|
|
|
--o:logging.file[@enable]=true --o:logging.level=trace > /dev/null 2>&1 &
|
|
|
|
@sleep 10
|
|
|
|
@echo
|
|
|
|
@echo "Running cypress desktop tests..."
|
|
|
|
@echo
|
2020-01-14 09:05:33 -06:00
|
|
|
$(CYPRESS_BINARY) run --browser chrome \
|
2020-01-14 11:14:23 -06:00
|
|
|
--config integrationFolder=$(DESKTOP_TEST_FOLDER),video=false,pluginsFile=plugins/index.js \
|
2020-01-14 10:10:07 -06:00
|
|
|
--headless \
|
2020-01-14 11:08:51 -06:00
|
|
|
--env DATA_FOLDER=$(abs_top_srcdir)/cypress_test/data/desktop/,WORKDIR=$(abs_top_srcdir)/cypress_test/workdir/desktop/ || \
|
2020-01-14 09:05:33 -06:00
|
|
|
(pkill loolwsd && false)
|
2020-01-10 09:38:37 -06:00
|
|
|
@echo
|
|
|
|
@echo "Running cypress mobile tests..."
|
|
|
|
@echo
|
2020-01-14 09:05:33 -06:00
|
|
|
$(CYPRESS_BINARY) run --browser chrome \
|
2020-01-14 11:14:23 -06:00
|
|
|
--config integrationFolder=$(MOBILE_TEST_FOLDER),video=false,userAgent=$(MOBILE_USER_AGENT),pluginsFile=plugins/index.js \
|
2020-01-14 10:10:07 -06:00
|
|
|
--headless \
|
2020-01-14 11:08:51 -06:00
|
|
|
--env DATA_FOLDER=$(abs_top_srcdir)/cypress_test/data/mobile/,WORKDIR=$(abs_top_srcdir)/cypress_test/workdir/mobile/ || \
|
2020-01-14 09:05:33 -06:00
|
|
|
(pkill loolwsd && false)
|
2020-01-10 09:38:37 -06:00
|
|
|
@pkill loolwsd || true
|
2020-01-12 06:05:04 -06:00
|
|
|
endif
|
2020-01-10 09:38:37 -06:00
|
|
|
|
|
|
|
clean-local:
|
|
|
|
rm -rf node_modules
|
2020-01-14 11:08:51 -06:00
|
|
|
rm -rf workdir
|
2020-01-14 11:14:23 -06:00
|
|
|
rm -rf cypress
|