cypress_test/Makefile.am | 45 +++++----- cypress_test/integration_tests/multiuser/paragraph_prop_user1_spec.js | 7 - cypress_test/integration_tests/multiuser/paragraph_prop_user2_spec.js | 7 + 3 files changed, 35 insertions(+), 24 deletions(-)
New commits: commit f980eccde2e6abaf075980478212467da283549d Author: Tamás Zolnai <tamas.zol...@collabora.com> AuthorDate: Mon Jul 27 18:15:12 2020 +0200 Commit: Tamás Zolnai <tamas.zol...@collabora.com> CommitDate: Mon Jul 27 23:19:23 2020 +0200 cypress: update multi-user test case. Change-Id: I8e73c41df35b92305e31fd3c5e35d5c15ae6e8e8 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/99518 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zol...@collabora.com> diff --git a/cypress_test/Makefile.am b/cypress_test/Makefile.am index 150d981f1..2a0fc221a 100644 --- a/cypress_test/Makefile.am +++ b/cypress_test/Makefile.am @@ -63,7 +63,7 @@ MOBILE_TEST_FILES=$(subst $(MOBILE_TEST_FOLDER)/,,$(wildcard $(MOBILE_TEST_FOLDE DEKSTOP_TEST_FILES=$(subst $(DESKTOP_TEST_FOLDER)/,,$(wildcard $(DESKTOP_TEST_FOLDER)/*_spec.js) $(wildcard $(DESKTOP_TEST_FOLDER)/*/*_spec.js)) MULTIUSER_TEST_FILES= \ - userlist_user1_spec.js,userlist_user2_spec.js + paragraph_prop_user1_spec.js,paragraph_prop_user2_spec.js MOBILE_TEST_FILES_DONE= \ $(foreach test_file,$(MOBILE_TEST_FILES),$(MOBILE_TRACK_FOLDER)/$(test_file).done) diff --git a/cypress_test/integration_tests/multiuser/userlist_user1_spec.js b/cypress_test/integration_tests/multiuser/paragraph_prop_user1_spec.js similarity index 77% rename from cypress_test/integration_tests/multiuser/userlist_user1_spec.js rename to cypress_test/integration_tests/multiuser/paragraph_prop_user1_spec.js index 93f323b96..c64babdf3 100644 --- a/cypress_test/integration_tests/multiuser/userlist_user1_spec.js +++ b/cypress_test/integration_tests/multiuser/paragraph_prop_user1_spec.js @@ -2,7 +2,7 @@ var helper = require('../common/helper'); -describe('Check user list with user-1.', function() { +describe('Change paragraph properties: user-1.', function() { var testFileName = 'userlist.odt'; beforeEach(function() { @@ -13,7 +13,7 @@ describe('Check user list with user-1.', function() { helper.afterAll(testFileName); }); - it('Userlist visibility.', function() { + it('Change paragraph alignment.', function() { // user-2 loads the same document cy.get('#tb_actionbar_item_userlist') @@ -29,7 +29,8 @@ describe('Check user list with user-1.', function() { cy.get('#tb_editbar_item_centerpara .w2ui-button') .click(); - cy.get('#tb_editbar_item_centerpara .w2ui-button') + // user-2 changes the paragraph alignment + cy.get('#tb_editbar_item_rightpara .w2ui-button') .should('have.class', 'checked'); }); diff --git a/cypress_test/integration_tests/multiuser/userlist_user2_spec.js b/cypress_test/integration_tests/multiuser/paragraph_prop_user2_spec.js similarity index 80% rename from cypress_test/integration_tests/multiuser/userlist_user2_spec.js rename to cypress_test/integration_tests/multiuser/paragraph_prop_user2_spec.js index 7b7b9fa5e..3267f093c 100644 --- a/cypress_test/integration_tests/multiuser/userlist_user2_spec.js +++ b/cypress_test/integration_tests/multiuser/paragraph_prop_user2_spec.js @@ -2,7 +2,7 @@ var helper = require('../common/helper'); -describe('Check user list with user-2.', function() { +describe('Change paragraph properties: user-2.', function() { var testFileName = 'userlist.odt'; beforeEach(function() { @@ -16,7 +16,7 @@ describe('Check user list with user-2.', function() { helper.afterAll(testFileName); }); - it('Userlist visibility.', function() { + it('Change paragraph alignment.', function() { // user-1 loads the same document cy.get('#tb_actionbar_item_userlist') @@ -28,5 +28,8 @@ describe('Check user list with user-2.', function() { // user-1 changes the paragraph alignment cy.get('#tb_editbar_item_centerpara .w2ui-button') .should('have.class', 'checked'); + + cy.get('#tb_editbar_item_rightpara .w2ui-button') + .click(); }); }); commit bda83c263b8f005fc40b2204f1775420385e7de9 Author: Tamás Zolnai <tamas.zol...@collabora.com> AuthorDate: Mon Jul 27 15:33:27 2020 +0200 Commit: Tamás Zolnai <tamas.zol...@collabora.com> CommitDate: Mon Jul 27 23:19:14 2020 +0200 cypress: better way of running multi-user tests. Before we used the GNU make implicit parallelization which triggered by recipe structure. Instead of that we use linux's bakcground process feature and run one client in the background and the other one in the foreground. Change-Id: I9de899686ae67b47eee005f157b6622ae4c5fe33 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/99484 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Tamás Zolnai <tamas.zol...@collabora.com> diff --git a/cypress_test/Makefile.am b/cypress_test/Makefile.am index 9f6901bcf..150d981f1 100644 --- a/cypress_test/Makefile.am +++ b/cypress_test/Makefile.am @@ -62,8 +62,8 @@ MOBILE_TEST_FILES=$(subst $(MOBILE_TEST_FOLDER)/,,$(wildcard $(MOBILE_TEST_FOLDE DEKSTOP_TEST_FILES=$(subst $(DESKTOP_TEST_FOLDER)/,,$(wildcard $(DESKTOP_TEST_FOLDER)/*_spec.js) $(wildcard $(DESKTOP_TEST_FOLDER)/*/*_spec.js)) -MULTIUSER_TEST_FILES= $(subst $(MULTIUSER_TEST_FOLDER)/,,$(wildcard $(MULTIUSER_TEST_FOLDER)/*_spec.js) $(wildcard $(MULTIUSER_TEST_FOLDER)/*/*_spec.js)) - +MULTIUSER_TEST_FILES= \ + userlist_user1_spec.js,userlist_user2_spec.js MOBILE_TEST_FILES_DONE= \ $(foreach test_file,$(MOBILE_TEST_FILES),$(MOBILE_TRACK_FOLDER)/$(test_file).done) @@ -72,7 +72,7 @@ DESKTOP_TEST_FILES_DONE= \ $(foreach test_file,$(DEKSTOP_TEST_FILES),$(DESKTOP_TRACK_FOLDER)/$(test_file).done) MULTIUSER_TEST_FILES_DONE= \ - $(foreach test_file,$(MULTIUSER_TEST_FILES),$(MULTIUSER_TRACK_FOLDER)/$(test_file).done) + $(foreach test_file,$(subst $(COMMA),_,$(MULTIUSER_TEST_FILES)),$(MULTIUSER_TRACK_FOLDER)/$(test_file).done) check-local: do-check $(if $(wildcard $(ERROR_LOG)),$(error CypressError: some tests failed!)) @@ -108,11 +108,13 @@ $(DESKTOP_TEST_FILES_DONE): $(PID_FILE) @$(foreach done_file,$(DESKTOP_TEST_FILES_DONE),mkdir -p $(dir $(done_file)) && touch $(done_file) &&) true\ ) -# Multi-user tests are run only during parallel build. -$(MULTIUSER_TRACK_FOLDER)/userlist_user%_spec.js.done: $(PID_FILE) $(MOBILE_TEST_FILES_DONE) - $(if $(PARALLEL_BUILD),\ - $(call run_multiuser_tests,$(subst $(MULTIUSER_TRACK_FOLDER)/,,$(basename $@)),$(basename $@).log)\ - ,) +$(MULTIUSER_TEST_FILES_DONE): $(PID_FILE) $(MOBILE_TEST_FILES_DONE) + $(eval TEST_FILES=$(subst spec.js_,spec.js$(SPACE),$(notdir $@))) + $(eval USER1=$(dir $@)$(firstword $(TEST_FILES))) + $(eval USER2=$(basename $(dir $@)$(lastword $(TEST_FILES)))) + $(call run_multiuser_tests,\ + $(subst $(MULTIUSER_TRACK_FOLDER)/,,$(USER1)),$(USER1).log,\ + $(subst $(MULTIUSER_TRACK_FOLDER)/,,$(USER2)),$(USER2).log) @mkdir -p $(dir $@) && touch $@ check-desktop: @JAILS_PATH@ $(NODE_BINS) @@ -290,18 +292,23 @@ define run_mobile_tests endef define run_multiuser_tests - @echo "Running cypress multi-user test: $(1)" + @echo "Running cypress multi-user test: $(strip $(1)) - $(strip $(3))" @echo - $(if $(PARALLEL_BUILD),\ - @$(PARALLEL_SCRIPT) \ - --browser $(CHROME) \ - --config $(MULTIUSER_CONFIG) \ - --env $(MULTIUSER_ENV)$(if $(3),$(COMMA)$(3)) \ - --spec $(1) \ - --type multi-user \ - --log-file $(2) \ - ,\ - ) + @$(PARALLEL_SCRIPT) \ + --browser $(CHROME) \ + --config $(MULTIUSER_CONFIG) \ + --env $(MULTIUSER_ENV) \ + --spec $(1) \ + --type multi-user \ + --log-file $(2) & \ + $(PARALLEL_SCRIPT) \ + --browser $(CHROME) \ + --config $(MULTIUSER_CONFIG) \ + --env $(MULTIUSER_ENV) \ + --spec $(3) \ + --type multi-user \ + --log-file $(4) && \ + wait # waits the background process to be finished endef NODE_BINS = \ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits