Finally, a robust solution for checking sheet contents
Uses .should() to make a retriable assertion, subject to normal
timeouts and with no need to wait before.
Fixes sporadic failures in desktop/calc/autofilter_spec.js
Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I9c4e36b3bcdf0968e9b95237f3f17f284d2628de
Some code in this file is unused. In particular, the conditions to
fulfill touch scrolling will never be met since
I9016fc15ad3ccb3664af348fdcdca006495b0778, and the _performScroll
handler is never called. Let's delete it!
Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: Id34380f09300935dcb74435d8d94104d235f6f21
Previously we did not take into account whether something was RTL when
scrolling it with ScrollSection. By introduing a new isRTL function to
check this, we can do something different (in this case scrolling the
other direction) if we are controlling an element that should be RTL.
We need to introduce a function, as whether we are using RTL can change
over the lifetime of the ScrollSection
Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: If4261a3e32375f6127241b846b97a3b4ac29eb0b
Previously when we were in RTL mode panning would be flipped. This
commit unflips it
Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: Iea4d16918b054d355e6d8695e0dc1d6ededd6793
- it is on the left below slides list
- handle disabled state in CSS for regular unotoolbuttons
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Iebff6e7db0234a4f61c532397bab697c1071595d
Forkit forking children is done in response to socket messages,
and parent process death should kill us too.
In general if we are relying on a poll to spin to achieve
something, we have a performance bug; this should exacerbate them
to flush them out.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I60d1c3b3c2532bbd686a3d3cfdea10f2a541a19a
In-line and specialize helper used just once.
Simplify code-flow, and reduce duplication.
Reduce duplicate logging.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I1ed68fdff5edfb10466d8bd13e88e5d2a5a71a63
This lets us detect when Kit processes die without waiting for
the poll() timeout and feebly spinning the PrisonerPoll loop.
Instead we get notified immediately; but to do this we then need
to be able to safely transfer the socket between SocketPolls.
SocketPoll's should own Sockets - so by switching ChildProcess to
use a weak_ptr and also the NewChildren list - we can have standard
ownership and a sensible transfer between SocketPolls. A Socket is
owned either by PrisonerPoll or a DocumentBroker in the normal way.
Clean the NewChildren list as/when children are unexpectedly killed
apparently there are still some ownership issues probably around
the strong ChildProcess _ws pointer.
Change-Id: Ie541a9d03e36aee53fd57c45953e0de21ebe1828
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
With faster starting spare kits we can end up waiting for a state
where there are no live or spare kits, but the spare kit has already
beaten us to the punch:
[testCrashKit] (+1124ms): Killing coolkit instances.| httpcrashtest.cpp:151
[killPid] (+1124ms): Killing 1650047| httpcrashtest.cpp:257
[killPid] (+1124ms): Killing 1650071| httpcrashtest.cpp:257
[waitForKitProcessCount] (+1124ms): Waiting for kit process count: Doc Kits: 0 Spare Kits: 0 | KitPidHelpers.cpp:70
[waitForKitProcessCount] (+1124ms): Current kit processes: Doc Kits: [1650047, ] Spare Kits: [1650071, ]| KitPidHelpers.cpp:80
...
Forking a coolkit process with jailId: 09X67pOy1HAgSk9G as spare coolkit #5.| kit/ForKit.cpp:406
...
[waitForKitProcessCount] (+1558ms): Current kit processes: Doc Kits: [] Spare Kits: [1650083, ]| KitPidHelpers.cpp:94
... fail ...
Avoid this by intersecting before & after to ensure are all before are
dead.
Cleanup exposing the more problematic wait-for-zero-spare method.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I6f0ba87139b58f9bf1770ebbc5cac95b5063679e
- SheetsBar is on the bottom in Calc, with buttons + tabs
- add callabck for edit field - only fired after ENTER
this fixes issue from FormulaBar conversion to JSDialog
- fix cypress mobile
- simplify CSS
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I7a286c87564e5ee0a89055ab4faa4daef9af31f5
In order to handle commands in a more structured way.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: If7e2aed089cda1df59b2bf2b454b540d36391df0
To distinguish it from the local variables that it's not using.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I1d1fe3a6506afd43cbfc8b1084a4d321f5d743d1
Previously there was no dark mode user SVG, which led to a failed load.
Additionally, we were using L.LOUtil.checkIfImageExists which sometimes
hides the image if it is unable to substitute it for a light mode one.
This caused the layout to fail as avatars were required to properly
space everything else.
By changing this so we provide both a dark and light mode user image, we
can avoid using the function which problematically hides the images in
this case.
Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: I16172a4d3148390896e3d475b7810598d94ceb27
Previously the borders and text of the following chip were hardcoded to
be black, but this doesn't work excellently in dark mode. Using the css
variable will make the text and user border always be a color that can
be read.
It may be sensible for us to also change the pool of following border
colors as they are all very dark, but that can wait for a future PR.
Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: Ia2dcdf24ae12f5d45f59ef7ba3c2ed8e4ab5acf4
there might be coolwsds launched from another service which doesn't
match -u coolwsd, so use -t coolwsd instead to capture all of them
then their output might be interleaved, so switch to another log
format that retains the name[pid] and stable sort on that column
so we have all the matching lines for a name[pid] contiguous but
ordered within that by time. After the sort, cut to drop the
columns that are additional over the 'cat' format.
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Id1d1c37001249ff348d6c09c005fb0836133258c
Comment Undo-Redo:
AssertionError: Timed out retrying after 10000ms: expected '<div#comment-container-2.cool-annotation.cool-annotation-collapsed-show>' to have class 'tracked-deleted-comment-show'
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Iae9361e5189ec8795a6dc6e0ac83cc99d653a538
Merge cells:
AssertionError: Timed out retrying after 10000ms: Expected to find element: `#copy-paste-container table td`, but never found it. Queried from:
> cy.get(#coolframe, [object Object]).its(0.contentDocument, [object Object])
at Context.eval (integration_tests/mobile/calc/bottom_toolbar_spec.js:74:50)
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I8ecca00d9a1c5cc35949b4b6f875092b487d60c4
Test failed in 23.05 because of a change in .leaflet-marker-icon
Rewrite openContextMenu and remove uses of .leaflet-marker-icon
Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: Iecfacdd192ea723001ed56e6c9f0c32645a6af2c
E.g. unit-copy-paste emitted a warning like this:
wsd-1576653-1576734 2024-03-20 21:28:53.448488 +0000 [ docbroker_002 ] DBG ToClient-005: Missing <body> ...
This is a real problem in case the clipboard has HTML, but it's fine
when the clipboard is just plain text.
Fix the noise by returning early when the body of the clipboardcontent
message contains just plain text.
This works because the body never starts with plain text when HTML is
also available: the JSON case is not an issue and the entire clipboard
dump lists HTML before plain text.
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I1ff51249fb710e3a9c127917aae4178c22738668
It was part of the removed Vereign document signing feature.
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ibe8a31102eaefcfba1898ad2f31226c24e12f330
WebSocketSession is used exclusively for tests,
so it's best that it is located in the test
directory.
Change-Id: I88333d619902df7991c3f26b94ed309246446ae0
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
problem:
in impress get into textbox editing and then try to drag and move text box,
you get js error because map is null
regression from 9cf64b0726
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I586c5f242241aa50f62c49371c994aeb7c370525
- The title of the modal window is currently marked with a <span> tag instead of an appropriate heading
tag (such as <h2> , <h3> , etc.).
- This affects the semantic structure of the page and makes it difficult for
users with assistive technologies like screen readers to effectively navigate the page.
- The modal title is not recognized as such, which hinders orientation and understanding of the content.
- Solution:
- replace <span> tag with <h2>(header tag) for `ui-dialog-title`.
- to make font-size consistent added css rule for `ui-dialog-title`.
Note: this will change all js dialog title withg header tags ( not only specific to writer but also effeted for every document type)
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I5a1e276c3a129400aa5834e186a263db95f01833
Partial revert of commit aa259d7337.
Also make idle tests run before multiuser
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I87024193d81bcadc9ea77e9033dceb3c6250d966
Container was showing in cypress mobile tests.
In Calc, this blocked clicks from reaching the top left cell.
Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I7ceab551b7247962d9517f52560e6e03646511bf
In case the selection is complex (not simple), we used to just request
HTML, and then the browser converted that to plain text, which has the
downsides already mentioned in commit
7f9de46688 (cool#8465 clipboard: improve
handling of plain text copy, simple case, 2024-03-08).
Steps to support this:
1) Clipboard.js now asks for the text/html,text/plain;charset=utf-8 MIME
types.
2) wsd: ClientRequestDispatcher::handleClipboardRequest() now maps this
to DocumentBroker::CLIP_REQUEST_GET_HTML_PLAIN_ONLY
3) ClientSession::handleClipboardRequest() maps this to the HTML+plain
text MIME type list.
4) kit: ChildSession::getClipboard() is now improved to take a list of
MIME types, not just 1 or everything.
5) kit: ChildSession::getClipboard() now emits JSON in case not all, but
multiple MIME types are requested.
6) wsd: ClientSession::postProcessCopyPayload() now knows how to
postprocess clipboardcontent messages, which may or may not be JSON
(it's JSON if more formats are requested explicitly, leaving the 1
format or all format cases unchanged)
7) Control.DownloadProgress.js now handles the case when we get JSON and
sets the core-provided plain text next to the HTML.
Leave the handling of non-JSON case in, because this means we can
copy from an old COOL server to a new one.
Note that this approach has the benefit that once the clipboard marker
is inserted, the length of the text/html format would change, which
means we can't parse the clipboard data till the marker is removed.
Emitting JSON for html+text means adding the marker keeps the ability to
parse the HTML and the plain text part of the clipboard in JS.
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I67a1f669e8a638d34cc25a2f288a7b30884b9892
Reduce the uses of MOBILEAPP conditionals by using the isMobileApp
function.
Signed-off-by: Jaume Pujantell <jaume.pujantell@collabora.com>
Change-Id: If541307fbc457b342674cc560b6c53454f3904cf
Removed all MOBILEAPP preprocessor conditionals from Util.hpp/.cpp
Added isMobileApp function to help remove further conditionals.
Signed-off-by: Jaume Pujantell <jaume.pujantell@collabora.com>
Change-Id: I038a4db47ec2a2c7bb10f5696df5571b13bd9a61
This allows for setting common headers
only once and have it on all file
types and scenarios.
Change-Id: Ia9d67ac5dbf59dd6e22beea0b4ae162ccb846b33
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
The explicit header entries were needed
with Poco, but since we always set them
in our http::Response constructor, these
are redundant.
Change-Id: Ifde48fd3048018747dae3e84560b31960e511a25
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
We always create http::Response instances
with these headers. These explicit entries
are vestiges from Poco sockets.
Change-Id: I65c263e95b253e22e4e6deae57fffc5616311c84
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This is an internal helper and doesn't need
to pollute widely used headers, especially
that it pulls Poco headers with it.
Change-Id: I67a5aa64589d3f37141aff612f7fb807bb190d6f
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>