Change-Id: I0f7e993c40563a9644dd040fc3913613d4482a7f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92163
Tested-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Reviewed-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
In parallel build try to run the specific test files
for a second time if they fail. Let's be realist,
testing an online application always has some
unreliabilities, let's make things more reliable with
running test more times and abort the build only if
the test fails consistently.
This is enabled only for parallel builds now, so we
have it on Jenkins. A simple make check will be more
deterministic. I also added an option to disable second
chance for parallel build: see CYPRESS_NO_SECOND_CHANCE
make file variable.
Change-Id: Ib7c554a238ded7ee15908b9f0c2d2c92ef0dcf32
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91987
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
show ticks for record and show option in mobile wizard
Change-Id: I8146a5d484ea7e7304c22e77a642d0b46f00bd91
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92108
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
We need to catch the downloadas message already in
-[DocumentViewController
userContentController:didReceiveScriptMessage:] and use an
UIDocumentPickerViewController to let the user choose where to
download (or export) the document. The iOS-specific code in
ChildSession::downloadAs() can go away.
Change-Id: I626b9986ec6156f7e83bda02b04e65f7819f8017
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92112
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
It is used (just once, but still) in the remaining parts of
w2ui-1.5.rc1.js.
Change-Id: Ic59f9c0d7d10b3556a4f8fbe08b7af2faa77d941
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92043
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
The switch away from LOOLWebSocket and the use of a websocket
for talking to forkit removes the need for the pipe code.
Change-Id: Ifb0c6c88681289e7a1709d9bc3281532935c7be4
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92033
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
This mends several problems from commit
5710c86323.
Change-Id: I1b29f29ca81679608a2692488fa1ef22b2e62dfd
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92032
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
It's useful to run a test suite more times, until it fails
when a failure comes up randomly.
Change-Id: I33708eff1db65f571c2cde323aaa683e6e1676e7
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92031
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
There is clearly not enough space for the normal sidebar when one of the
dimensions is below 768.
Change-Id: Iac27f12f837b9e6a64d1cce7b8376009bbe2c15f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92004
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
The L.Browser detects the browser capabilities, but the
window.mode.isMobile()/isTablet()/isDesktop() is what decides what form
factor are we targeting in the particular instance of the Online.
This commit tries to kill convert the L.Browser.mobile checks into the
appropriate window.mode.isXYZ(), hope I got the intention right on most
of the places - it wouldn't be correct to blindly convert everything to
(isMobile() || isTablet()).
Change-Id: I57430058ec15deb5f67f9c645d234f998fbf539d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92003
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Using an indicator after changing the trasnparency solves the issue.
Change-Id: I21f3f0571dbc42685594c868c056ce1b314df714
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92030
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
This chage only affects mobile view
> moving changes to new files
> Increase document container's bottom position (it was cropping tabs container)
> Fix default browser borders that were afecting position
> Desktop
> Also Fix document container on desktop
> Fix icons' elements being cropped (perv, next and plus)
> Adjust Margins for those w2ui elements
> Discovered that plus.svg whas not centered and fixed it
Change-Id: Id54a491e9c2a6afef468aca8d858bf91b83d03ce
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91270
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
With the change that is reverted here, the editing session on Android
returns without proper cleanup which leads to occassional hangs when
the user tries to open a new editing session quickly.
Also, in the iOS app, with the change that is reverted, when closing
the document we never get the LOK_CALLBACK_UNO_COMMAND_RESULT for the
.uno:Save and thus we never get to save it properly from the system's
point of view.
This reverts commit a73590d81f.
Change-Id: Ia77fe2fd9b59d30c343ca1e10f69d5a434bc3628
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91915
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91965
Reviewed-by: Tor Lillqvist <tml@collabora.com>
I don't know why it happens, but I found a bug report about it
with a solution:
https://github.com/cypress-io/cypress/issues/4889
So let's check whether changing this setting solves this issue.
Change-Id: If1f1162d9c7cfb4f68f816285644dc88b35f872b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91956
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
cy.get().contains() behaves unexpectedly. With pseudo code:
// First find the item using the selector
do {
item = get(selector)
} while (item == undefined)
// Then wait until it get's the right content.
// Item points to an object which can change it time.
do {
} while (item.content != specified_content)
What we actually need is something like this:
// Wait for an item which matches both the selector and content.
do {
item = get(selector)
} while (item == undefined || item.content != specified_content)
The new selectItemByContent() method behaves like this.
It just looks wierd when you experience a test failure in the
interactive test runner and you check the DOM and you can see
the right item with the rigth content and the test still fails.
Change-Id: I0b1466a165451e831401e1f4b500ce16bd3f38b0
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91955
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Besides, the loleaflet.html isn't passed through any file server that
would replace it anyway.
Change-Id: Ie8c4a58d83e697d441b9a34236092fe3240a7e25
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91931
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
So we don't need to close the mobile wizard before copying.
The main issue was with contains() method, which first
selects the HTML items and waits until these items gets
the content 'Copy'. What we actually need is to wait until
an item appears with the content 'Copy'. Not the existing
items's content is updated with the 'Copy' text, but new
items are created.
Change-Id: I235d2756ce41a099267fa335c215d3eca6f468c2
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91913
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
This was added in commit 70af76e28c
(Replaced pipe with websocket based on Unix socket in communication with
ForKit, 2020-04-02), but it seems to me that the shared_from_this()
member function (which is now available, due to ineritance) is not
actually called anywhere, so this is not necessary.
Additionally, Debian 8 / gcc-4.9 has problems compiling this:
In file included from /usr/include/c++/4.9/bits/shared_ptr.h:52:0,
from /usr/include/c++/4.9/memory:82,
from wsd/AdminModel.hpp:13,
from wsd/AdminModel.cpp:12:
/usr/include/c++/4.9/bits/shared_ptr_base.h: In instantiation of ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_make_shared_tag, const _Alloc&, _Args&& ...) [with _Alloc = std::allocator<ForKitProcWSHandler>; _Args = {std::shared_ptr<StreamSocket>&, const Poco::Net::HTTPRequest&}; _Tp = ForKitProcWSHandler; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2u]’:
/usr/include/c++/4.9/bits/shared_ptr.h:316:64: required from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_make_shared_tag, const _Alloc&, _Args&& ...) [with _Alloc = std::allocator<ForKitProcWSHandler>; _Args = {std::shared_ptr<StreamSocket>&, const Poco::Net::HTTPRequest&}; _Tp = ForKitProcWSHandler]’
/usr/include/c++/4.9/bits/shared_ptr.h:588:39: required from ‘std::shared_ptr<_Tp1> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = ForKitProcWSHandler; _Alloc = std::allocator<ForKitProcWSHandler>; _Args = {std::shared_ptr<StreamSocket>&, const Poco::Net::HTTPRequest&}]’
/usr/include/c++/4.9/bits/shared_ptr.h:604:42: required from ‘std::shared_ptr<_Tp1> std::make_shared(_Args&& ...) [with _Tp = ForKitProcWSHandler; _Args = {std::shared_ptr<StreamSocket>&, const Poco::Net::HTTPRequest&}]’
./wsd/LOOLWSD.hpp:201:97: required from here
/usr/include/c++/4.9/bits/shared_ptr_base.h:1096:64: error: call of overloaded ‘__enable_shared_from_this_helper(std::__shared_count<>&, ForKitProcWSHandler*&, ForKitProcWSHandler*&)’ is ambiguous
So just remove it till that inheritance is needed.
Change-Id: I74d38b90bcf06d4490feed31783c098ed831f1ee
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91879
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Gabriel Masei <gabriel.masei@1and1.ro>
Now, finally, I think it works as it should, knock on wood. After an
auto-save (or explicit save by tapping the button), the edited
document does show up with its auto-saved contents if you open it from
iCloud Drive or Nextcloud while it is still open in the iOS app.
What I was missing was that the document hadn't actually been saved by
the core (to the temporary copy) until we get the
LOK_CALLBACK_UNO_COMMAND_RESULT for the .uno:Save. We must call the
-[UIDocumentsaveToURL:forSaveOperation:completionHandler:] only upon
receiving that callback.
Change-Id: I10486f3bc587c871ee2644a0c097493f33baf420
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91880
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Import cypress-wait-until directly in the test file. This module
is not intended to use everywhere, so it's not a big issue
if we need to import it before use.
Change-Id: I33ff8ae1eae2ec124b286cd7760d5571e5c67531
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91874
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Also add dummy, run-every-build test to validate wopi like proofs.
Change-Id: Ic2dc647a8d61693ae87b6523aaa30632979fd5d6
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91854
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
unit-admin is currently disabled, so... how to reproduce:
Edit loleaflet/admin/src/AdminSocketOverview.js to try to kill e.g. pid
0.
Expected result:
[ admin ] WRN Invalid PID to kill (not a document pid)| wsd/Admin.cpp:168
Change-Id: I06dda68b38096689c1b9327cefba2cbfc96805f8
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91868
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
It is enough to call the -[UIDocument
saveToURL:forSaveOperation:completionHandler:] only in
DocumentBroker::sendUnoSave(). And on the other hand, in
-[DocumentViewController bye] we can't want for the
LOOLWSD::lokit_main_mutex as the main queue is needed for parts of
what the saveToURL does.
Also, use a separate copy of the document as the file that is actually
edited by LO core. This matches what the Android app does. I think it
is useful to do this in order to avoid some hangs that I noticed. They
probably were caused by both LO core and the system frameworks
occasionally accessing the same document file at the same time.
Change-Id: Idb65be23a7cb6ad1288fbbd23c7471e0fb8d52f4
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91851
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>