cypress: add 'make check-proxy-mobile' command.

To run mobile test with php-proxy simulation.
It's an initial command, should be improved later,
after php proxy simulation nicely works with the
tests.

Change-Id: Id9d2bacfbf09ca34a2c84e0d32808749df4c1909
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102321
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
This commit is contained in:
Tamás Zolnai 2020-09-01 14:57:36 +02:00
parent 1951fdbd42
commit 0d7a58aa57
4 changed files with 31 additions and 12 deletions

View file

@ -205,6 +205,22 @@ do-run-cov: @JAILS_PATH@ $(NODE_BINS)
$(call run_all_multiuser_tests,COVERAGE_RUN="1")
@$(KILL_COMMAND) || true
check-proxy-mobile: @JAILS_PATH@ $(NODE_BINS)
$(call run_JS_error_check)
$(eval FREE_PORT:=9979)
@pkill loolwsd || pkill --signal SIGKILL loolwsd || true
@sleep 5
../test/run_unit.sh \
--test-name unit-php-proxy.la \
--log-file workdir/php-proxy.log \
--trs-file workdir/php-proxy.trs \
--color-tests yes \
--enable-hard-errors yes \
--expect-failure no -- ../test/unit-php-proxy.la &
@$(WAIT_ON_BINARY) http://localhost:$(FREE_PORT) --timeout 60000
$(call run_mobile_tests,$(spec))
@pkill loolwsd || pkill --signal SIGKILL loolwsd || true
@JAILS_PATH@:
mkdir -p $@

View file

@ -188,6 +188,9 @@ function afterAll(fileName) {
Cypress.env('SERVER_PORT') +
'/loleaflet/dist/admin/admin.html');
if (Cypress.env('SERVER_PORT') === 9979) {
cy.wait(5000);
} else {
cy.get('#uptime')
.should('not.have.text', '0');
@ -199,6 +202,7 @@ function afterAll(fileName) {
cy.get('#docview', { timeout: Cypress.config('defaultCommandTimeout') * 2.0 })
.invoke('text')
.should('not.match', regex);
}
cy.log('Waiting for closing the document - end.');
}

View file

@ -228,7 +228,6 @@ TESTS = \
unit-load.la \
unit-cursor.la \
unit-calc.la \
unit-php-proxy.la \
unit-insert-delete.la \
unit-close.la \
unit-bad-doc-load.la \

View file

@ -248,7 +248,7 @@ public:
lastRequestMS = Util::getNowInMS();
int64_t diff = 0;
while (diff < 15000)
while (diff < 600000)
{
auto nowMS = Util::getNowInMS();
diff = nowMS - lastRequestMS;