Commit graph

10195 commits

Author SHA1 Message Date
Tamás Zolnai
33245f42ab cypress: Disable SSL for the test loolwsd server.
Change-Id: I613768b3a91e5f34c64495cb5ca13312210f3549
2020-01-22 12:55:13 +01:00
Tamás Zolnai
d87fab2acf cypress: Don't use hardcoded wsd hash.
Change-Id: Iff7296c6a9def8df9ddb6d78a29e0adf64436b7e
2020-01-22 12:55:13 +01:00
Tamás Zolnai
2165ffa38c cypress: README: Add some installation \ test runner info.
Change-Id: I71eccf7e72eb634e83d97f89ea2c55d684009a19
2020-01-22 12:55:13 +01:00
Tor Lillqvist
d39a9f84d5 Add sources in sd/source/ui/slidesorter/view for breakpointing convenience
Change-Id: I1f8919f86b64dd6a9f6befec90b13956b2b845d3
2020-01-22 13:39:55 +02:00
Pranam Lashkari
8add3d1274 Moved: getMenuStructureForMobileWizard
moved the getMenuStructureForMobileWizard from map
to more appropriate place in JSDialogBuilder.js

Change-Id: I366b8317c6469652ee9469746ae7b78c2c3a1f7f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87169
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-22 10:12:56 +01:00
Miklos Vajna
9a92cd2415 Fix an UB in the DocumentBroker dtor
The problem is that both the DocBrokers map and the instance returned by
Admin::instance() are static, so there it's not safe to assume that by
the time the DocumentBroker dtor runs, the static Admin instance is
still alive. Still, the DocumentBroker dtor calls Admin::instance().

Fix this by clearing the DocBrokers map in LOOLWSD::cleanup(), which is
used exactly to destroy statics in a controlled order.

Sanitizers output was:

wsd/DocumentBroker.cpp:497:23: runtime error: member call on address 0x0000024a5ba0 which does not point to an object of type 'Admin'
0x0000024a5ba0: note: object is of type 'SocketPoll'
 00 00 00 00  50 21 45 01 00 00 00 00  b8 5b 4a 02 00 00 00 00  05 00 00 00 00 00 00 00  61 64 6d 69
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'SocketPoll'
    #0 0xa10af3 in DocumentBroker::~DocumentBroker() wsd/DocumentBroker.cpp:497:23
...
    #17 0x7fa27622ddc9 in exit (/lib64/libc.so.6+0x38dc9)
    #18 0x7fa276215f90 in __libc_start_main (/lib64/libc.so.6+0x20f90)
    #19 0x670189 in _start /home/abuild/rpmbuild/BUILD/glibc-2.26/csu/../sysdeps/x86_64/start.S:120

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior wsd/DocumentBroker.cpp:497:23 in

(Seen during make check CPPUNIT_TEST_NAME="unit-each-view".)

Change-Id: I02ad44deb9de06d9973216428c640248ea2512ce
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87174
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-22 09:19:05 +01:00
Mike Kaganski
0c0510cccf Implement proper proof-key value attribute
Change-Id: I3f2ad960ce6d3dad4d0b064492355b5643f345c8
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87148
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-21 19:28:32 +01:00
Tamás Zolnai
b06ec9c71b cypress: let's have these two commands in separate lines.
Change-Id: Idf7856518121ca2ce84a9eb8f77b6f596a21ca18
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87156
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-01-21 18:47:02 +01:00
Tamás Zolnai
8081afc8e0 eslint: Enable "semi" rule as an error.
This checks whether all statements end with a semicolon.
We already use this rule in the code, so I enable to check
this rule by eslint to keep the code consistent.

Change-Id: I5ea46376d2b6fb488224d4d69e4d117139763a8c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87154
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-01-21 18:32:33 +01:00
Miklos Vajna
a6af954b62 wsd: fix a typo in JWTAuth::cleanup()
Change-Id: I2c88403de12e2011746964b05a0c7e239dcbfd1b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87151
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-21 17:39:09 +01:00
Tamás Zolnai
c782c033b0 cypress: Use a better wait method for loolwsd server
Use the wait-on npm module for this.

Change-Id: I602f95aa79d46cf7b55bcc598e612bbc5342c52b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87150
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-01-21 17:37:28 +01:00
Pedro Pinto Silva
298f4297c2 Mobile: MobileWizard: swipe/scroll indicator: improve scroll detection for different exceptions
Change-Id: I2f3661b2eaafc8d8facb186e92738818431483e4
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87153
Reviewed-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Tested-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
2020-01-21 17:14:46 +01:00
Tamás Zolnai
7da6ea8404 cypress: mobile: Fix 'Close mobile wizard by context wizard' test case
It needs a better indicator that the mobile wizard actually opened
with the right content.

Change-Id: If1d146a6b02b2b5f79e1ac627dbec4fc43906f43
2020-01-21 16:13:01 +01:00
Tamás Zolnai
8f498034a2 cypress: Update README with instructions how to run one test case.
Change-Id: Ib6e80f92d64565471f30abc89b3ed4a1bbcebb20
(cherry picked from commit e11c0f8efa8a873eb699873613e86395d7e23200)
2020-01-21 16:13:01 +01:00
Tamás Zolnai
423f2eb0db cypress: Don't run cypress test for top level make check for now.
Change-Id: I06c724e82b3717e36a7a4550118baba3aac1a7f6
(cherry picked from commit b48ac5933c4b8671e8ba68c9f9d50216ff4dd620)
2020-01-21 16:13:01 +01:00
Tamás Zolnai
e82719b99e cypress: mobile: Add some tests about the state of mobile wizard.
Change-Id: I38869d7fcc03690610a19c7803a596cfebf75c7a
2020-01-21 16:13:01 +01:00
Tamás Zolnai
76c01fbe82 cypress: mobile: Fix mobile wizard id.
Change-Id: I171f98705e894f5a73afd7c92b489620f3bec4ac
2020-01-21 16:13:01 +01:00
Tamás Zolnai
abac31d4fe cypress: Remove obsolete scripts.
These were replaced by make commands.

Change-Id: I98978b52801b44a36c09388cf5eb3ed5a09326c3
2020-01-21 16:13:01 +01:00
Tamás Zolnai
58d99a8f61 cypress: mobile: add some examples for testing focus.
Change-Id: I63267bdd1d4b4db0d30da78c61b82c5d7d5535dc
2020-01-21 16:13:01 +01:00
Tamás Zolnai
d5f698acd5 cypress: Don't run npm install unconditionally.
Change-Id: I51ff6e7706075d15c213617fede89088499226ed
2020-01-21 16:13:01 +01:00
Tamás Zolnai
a410b54c47 cypress: Introduce more make rules to make easier to run tests.
Change-Id: Ic8ae881864ae931fe6abed73a6a6086d6e0e591d
2020-01-21 16:13:01 +01:00
Tamás Zolnai
545f3f9431 cypress: Introduce make rules for running group of tests.
It can handle dependencies and can use environment
variables.

Change-Id: Ib386cb7019d85b3dbd6c28417b3a481944b18aca
2020-01-21 16:13:01 +01:00
Tamás Zolnai
d413d55f91 cypress: Use eslint to check coding conventions during build.
Use loleaflet's config file to have the same
conventions under cypress_test folder too.
Update test code to pass esling check.

Change-Id: Iade932e6d3cd8941b5fc0897c56c68d2493f0dce
2020-01-21 16:13:01 +01:00
Tamás Zolnai
d614865b46 cypress: Move general cypress options to cypress.json
Change-Id: Iad6263f31ec9ef813424e4aab673c2ade1f7f3e5
2020-01-21 16:13:01 +01:00
Tamás Zolnai
eb47f78824 cypress: Move plugins folder out of cypress subfolder
Change-Id: Ia3a9a58b7f7e5e64c1e2f4211b75a33bbbb00c0e
2020-01-21 16:13:01 +01:00
Tamás Zolnai
aab8b4ada6 cypress: Always create a copy of the test document.
Before test execution. So the modifications won't
change the test documents.

Change-Id: I1b04fe96e8182033d44aeeaa3a7632dd81031a05
2020-01-21 16:13:01 +01:00
Tamás Zolnai
c5478b7a66 cypress: Use env variable to get file path.
Instead of a hard coded one. Also create new
test documents for cypress tests.

Change-Id: I5f9b2c6914669f77742e1a011d736bbf18c54877
2020-01-21 16:13:01 +01:00
Tamás Zolnai
20e5295ddd cypress: Make sure loolwsd is killed after make check.
Even if ony of the tests fails.

Change-Id: I18e7daff854fd51d4ba374d9d537ba76e171269c
2020-01-21 16:13:01 +01:00
Tamás Zolnai
66eb121856 cypress: Running make check locally works better then cyrun.
Change-Id: Ifcbefa925b3b46e7955cd3cfb107b105f053cf59
2020-01-21 16:13:01 +01:00
Tamás Zolnai
96c9e57894 cypress: mobile: Add some tests about pushing toolbar items.
Change-Id: I2b40dbee18fa04fbece4f4da0630e3ac619e0968
2020-01-21 16:13:01 +01:00
Tamás Zolnai
740267611f cypress: Update README about test execution.
Change-Id: I6c7b7fd8c77f89289630a06f9dbaf94ae5082aa8
2020-01-21 16:13:01 +01:00
Tamás Zolnai
11ef897266 cypress: Added a better wait method for document load.
Change-Id: I482df38159009f5583ad7ed9f676e09a350bb0a8
2020-01-21 16:13:01 +01:00
Tamás Zolnai
66d89d749f cypress: Run tests only if HAVE_LO_PATH is set.
Change-Id: I7d3103aa787f5bb1ed28a477276f2a656a915737
2020-01-21 16:13:01 +01:00
Tamás Zolnai
893a3df57b cypress: Add package-lock.json to gitignore
Change-Id: I3ec64262a50e6edf6116f5b7c546ee3a84d4d449
2020-01-21 16:13:01 +01:00
Tamás Zolnai
f2444df726 cypress: Add some commands to make easier to run tests.
Change-Id: I9428522717d3912ca20374a1efb1c61999ffc77f
2020-01-21 16:13:01 +01:00
Tamás Zolnai
d3dd01eb1b cypress: mobile: Add more tests for toolbar.
Change-Id: I144982a796e2e1c5178bdefa27575a0cfe47439b
2020-01-21 16:13:01 +01:00
Tamás Zolnai
524bbb3398 cypress: Initial integration of cypress test framework.
Change-Id: Ibf300b33d32ce3e7f1affbaf0a59364ddb618b56
2020-01-21 16:13:01 +01:00
Michael Meeks
f0bfe402fd test: forcibly serialize more
Change-Id: I2fd370c5bdd440e3be2c065f9b834ffa4e7f856b
2020-01-21 15:07:54 +00:00
Michael Meeks
50deb943bd test: simplify and remove obsolete /proc grokking code.
Change-Id: I482c56dd76067019d83196aa305d14703e25bb44
2020-01-21 15:07:54 +00:00
Michael Meeks
9126a641a9 test: switch to using ClientPortNumber to allow parallelism.
Change-Id: Ifef3bce1b217605000300b240ea74df4d264e0df
2020-01-21 15:07:54 +00:00
Michael Meeks
43d0de1234 test: serialize tests for now.
Change-Id: I6309976f324a66a57baf4678e49c0c1e09b9dc48
2020-01-21 15:07:54 +00:00
Michael Meeks
e844b89d6c test: simplify the timeout logic.
Change-Id: I0c253629b983f2813237536e6e2c6d04d5b97dd1
2020-01-21 15:07:54 +00:00
Michael Meeks
8f91659ae0 test: dung out redundant LOOL_TEST_CLIENT_PORT.
And cleanup other related oddities.

Change-Id: I2d179a2ece6a8553e10e406ad4e5da08a2ff58e5
2020-01-21 15:07:54 +00:00
Michael Meeks
9dfac6dab1 test: switch to parallel tests based on Unit framework.
Increase a few timeouts, bin old-style standalone unit tests,
fix a number of bugs.

Change-Id: Ia3d59466ecb9a9443807ba3445d04dd5f77e3dba
2020-01-21 15:07:54 +00:00
Michael Meeks
0599db3576 copyFile: de-poco-ize and handle EINTR and short writes.
Change-Id: I2046881c786a9f31f45c53f282de9ddd9a9cebcf
2020-01-21 15:07:54 +00:00
Michael Meeks
c187f414c5 kit: show the correct documentLoad URL when a template is used.
Change-Id: Ib9b3ac3e166dfbece8c7212fc239d517ce1c0bba
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87140
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-21 16:07:31 +01:00
Michael Meeks
b97ad1645a Clobber gio in the configuration.
Otherwise activation fails for http:// or https:// since the core
mis-identifies the (disabled via core: 1c081112714e) gio provider
still and won't load via the ucpdav1 provider.

Change-Id: I66a58da3f94a4479729a3e39ed5070e4a05dcf69
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87141
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-21 15:06:17 +01:00
Michael Meeks
aadf5af77b reduce verbosity of FileServer trace logging.
Change-Id: I5a57e91742be504bcb2e51b45f6890420e52bb91
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87134
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-21 14:39:21 +01:00
Jan Holesovsky
1c0fb25e90 android: When the cell cursor moves, focus the document.
This particularly happens when the user has entered something into the
formula input bar - after hitting Enter, the focus should return to the
sheet.

This is consistent with the desktop LibreOffece, where hitting Enter in
the formula input bar returns focus to the sheet too.

Change-Id: I020e008022e958f471d0cb31a8de986f576ba704
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86984
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-21 12:43:17 +01:00
Alexandru Vlăduţu
91175c854a tdf#130103: loleaflet fix save from menu for spreadsheets
When editing a cell in a spreadsheet, if you don't focus on another
element before clicking 'Save' in the menu, it won't actually save the
last edited cell. This is different from the 'save' toolbar icon, which
actually saves it.

Change-Id: I5bb7551ce9fad28f3108bee8a7a44735e01f9d93
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87119
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-01-21 11:34:12 +01:00