Commit graph

13842 commits

Author SHA1 Message Date
Pedro Pinto Silva
069684ca97 Expose CSV as an additional download option...
* on classic
* on notebookbar
* allow it in readonly mode

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I29ed6ed40810ba0e59cdb4d55b9898d016653678
2021-02-04 13:23:57 +01:00
Jan Holesovsky
c23502926b CheckFileInfo: Report mis-spelled CheckFileInfo properties as errors.
To be able to locate them in the logs more easily; this is likely to
catch mistakes early in the development of new integrations.

Change-Id: I11c528d11e4a4e1d13f8d32085fa1bf1a163b779
Signed-off-by: Jan Holesovsky <kendy@collabora.com>
2021-02-03 16:14:57 +01:00
Tamás Zolnai
bb7af8b733 cypress: throw and Error object here to get backtrace in cypress log.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I8bb36da750f6bb0855d0118b139e2090e2dbcc85
2021-02-03 14:56:32 +01:00
Tamás Zolnai
ca65e63da6 cypress: dont mention video recording option for multi-user tests.
It does not work when two cypress instances running at the
same time.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Iae7fe4c4dcc4bb0a970763001e4f966b60f988f2
2021-02-03 14:56:32 +01:00
Tor Lillqvist
c999c5c86d Also save cellviewcursor: messages for handling when we are ready
Without this, when joining an editing session of a spreadsheet, you
don't see the cell cursor of another participant until they move the
cell cursor.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I87b8ad584d57bce52b39706fa9f0bbf56a59082a
2021-02-03 15:54:11 +02:00
Jan Holesovsky
efd9b93652 Trivial script to find unused functions in JavaScript
I haven't found any more advanced approach to finding unused JS
functions, but this seems to produce at least some results, so better
than nothing.

There is nothing new to remove though, the last round of cleanup has
removed what was there to remove.

Signed-off-by: Jan Holesovsky <kendy@collabora.com>
Change-Id: If39fecb7781cc78b30cb95da354c71d3547b7ae7
2021-02-03 13:54:46 +01:00
Gökay Şatır
18c4ad5584 Calc: GroupBase.js is added for shared functions.
Row and column groups share some of the functions. They are moved into a file.

Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I268daf2c293f0cac150587a23001f873e23b4dfc
2021-02-02 20:31:37 +03:00
Gökay Şatır
06293d3530 Row & Column Groups: Some fixups.
More comments are added.
Early exits are used.
Unused functions are deleted.
Some functions are renamed for better explanation.

Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: If835fbb9bbae6898c4847b2c428a3e36f042b60a
2021-02-02 20:31:37 +03:00
Tor Lillqvist
cd1a0c8d27 eslint is pickier in the co-6-4 branch, so cherry-pick fix here, too
Change-Id: I47d09ea9e3da0c60f07821dee9197cbefc7080dc
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-02-02 19:14:45 +02:00
Tamás Zolnai
0b8973696d cypress: interfer: we can enable retries for the test user.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I40172946709fc50290b568be26d510b4cbb12531
2021-02-02 16:00:46 +01:00
Tamás Zolnai
81dda79b94 cypress: interfer: move cell cursor instead of text cursor in calc.
It's not necessary to have any text in the first cell, so
double click won't work for every test document. However the
spreadsheet is always there so we can move the cursor through
the different cells.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Icea63a971fb77d915e027569a80c9a8a8b855a01
2021-02-02 16:00:46 +01:00
Tamás Zolnai
e0421d5090 cypress: reenable master view related tests.
Now that it was fixed in core branches.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Iaccc994b0e58402dc173941357af43517dd0178b
2021-02-02 16:00:46 +01:00
Tamás Zolnai
df8144d44c Revert "cypress: make sure the cell selection is visible before run test steps."
This reverts commit 129ae61684.

This is actually undefined, whether the cell cursor would be there
or not. We get cell cursor messages after loading the document,
so if we step into editing mode before these messages, then we
will have the cell cursor, but if we wait some seconds after
opening the document, then the cell cursor won't be displayed.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I7a4e9e5adbbbe312f21789fe872726bbf67565e6
2021-02-02 13:49:50 +01:00
Tamás Zolnai
0671c687a1 cypress: update writer field tests.
There is no more span inside the HTML representation
of a text field. After this commit:
b982d0e6f94ca70765231ff4242c829f5bec5def

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Ic64a20dcb0534876af062a1fb40cb0e39fd27f10
2021-02-02 12:10:21 +01:00
Gökay Şatır
f9ebb450ab AutoFilter DropDown: Replace div reference with section reference.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I82ac56f320083f3fe0ba3ee6104cad341c69120b
2021-02-02 09:49:48 +01:00
Gökay Şatır
855c7aaf7c Cypress: Make column & row header tests work with canvas sections.
CanvasSectionContainer has now capability of creating divs below sections, for testing.

Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Ia735758ce27af558718da50935502723112e838e
2021-02-02 09:49:48 +01:00
Gökay Şatır
1fdcc0baa5 CanvasSectionContainer: Enable creating test divs for automated tests.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: If735aa39fc98959578904e3ea86b893449a119b5
2021-02-02 09:49:48 +01:00
Gökay Şatır
8a8f9f4e6d CanvasTileLayer: Set canvas border for Calc column groups.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I87bd288436cdbdcf866dead00d47bc6aa5f72f4f
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
2021-02-02 09:49:48 +01:00
Gökay Şatır
ad7a01ac93 CanvasSectionContainer: Add onRemove function.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I2bc45c36a104b6b76f9a18e18dcda39b8b3d2072
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
2021-02-02 09:49:48 +01:00
Gökay Şatır
1413ee6768 Calc: Adjust header and group font sizes.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I09b0146abd1d16305978c212f5cf5446e1b2ec54
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
2021-02-02 09:49:48 +01:00
Gökay Şatır
5f1090dcb1 CanvasTileLayer: Position canvas on mobile, tablet and desktop.
Remove "spreadsheet-row-column-frame" div. Since row & column headers and groups are drawn onto the same canvas with tiles, that div shouldn't exist.

Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
2021-02-02 09:49:48 +01:00
Gökay Şatır
d576895c57 Calc: Add Row Group and Column Group sections.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Ib44e5e6a9e047c347a239a155b86f091467f5149
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
2021-02-02 09:49:48 +01:00
Gökay Şatır
2d8df66167 Calc: Draw Column & Row Headers on tiles canvas.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
2021-02-02 09:49:48 +01:00
Gökay Şatır
e2dbff061a CanvasTileLayer: Give id to tiles canvas.
Centralize re-painting event.

Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Idc37a4ce2206627f1a30162652169fbc7ae0ce03
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
2021-02-02 09:49:48 +01:00
Tamás Zolnai
3b05151641 cypress: move formulabar related check into beforeAll() helper method.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I46b05c8533b4f323e181d3d4fd2acc1e4626e164
2021-02-01 22:11:32 +01:00
Szymon Kłos
969f9f9860 Revert "Don't block handling of touch events"
This reverts commit 284e8ce308.

We have to disable panning handler to avoid panning when resizing
the selection using handles.

Change-Id: I9994b3e9ba32bc3e43567d43e547eada311c050e
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-02-01 17:43:27 +01:00
Tamás Zolnai
0cd14ef422 cypress: use checkDialogAndClose() helper method here.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Iec8be699d10640154d711b47a9d11400e2aefa1b
2021-02-01 16:07:15 +01:00
Pedro Pinto Silva
b0a38ebe21 loleaflet: server recycling: Improve message
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I4cecb72acc927707b68711478c5474326d456d82
2021-02-01 15:01:07 +01:00
Tamás Zolnai
c69b163c38 cypress: let's be more specific here about the cursor.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: If9d475374fb27a727f5cf7f38f3a0b4b47f142f6
2021-02-01 13:28:54 +01:00
Tamás Zolnai
64a22ea2dd cypress: make dblClickOnFirstCell() method closer to real mouse events.
It causes an issue for calc to use cypress's dblclick() method
and it will select the wrong cell. In the log, I see only a
double click when we simulate user events with cypress, however
when I do double click manually, first I see a single click and
then a double click in the log. So let's do the same with cypress
simulation too.


Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I18e92fc354558e09bb5cb3a12e45cbb669ac97bc
2021-02-01 13:28:54 +01:00
Henry Castro
71c595ca4b loleaflet: do not update cursor from other views
Change-Id: I5e0cd6cfa6c5a5db61dcfbfa557c9ec3bc4c8977
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-02-01 07:19:45 -04:00
Tamás Zolnai
02e22e20f3 cypress: make dblClickOnFirstCell() more stable.
Visibility of the blinking cursor is not good enough
on dekstop, beacuse it changes position after it is
displayed. So let's wait some time to step cell editing
mode.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I86fe7fd5be68f36126ba3d390b29740b33cf3d8e
2021-02-01 11:59:43 +01:00
Tamás Zolnai
6d62c32950 cypress: add a selector parameter to cursor related methods.
So we can specify which cursor we need here. The default is
the document cursor, but this methods can be used for
formulabar cursor or dialog cursor too. More cursors might
exists at the same time, that's why simple '.blinking-cursor'
selector does not work.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I1fd04e188ab53e70d0e8303fd7502f183c18bef3
2021-02-01 11:59:43 +01:00
Ashod Nakashian
2304b52587 wsd: correct assertion on storage and not tilecache
We already access _storage before the assertion,
so it must move before the first use.

Also, we have no use for _tileCache when uploading,
so no point in asserting its validity here.

Change-Id: I4196d0719e6750cfd2dba8d5f449a1b76286bde9
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-31 22:20:59 -05:00
Ashod Nakashian
8a37738fdb wsd: documentation of DocumentBroker states
This details the design of the DocumentBroker
states and state-machines as they are to be
eventually implemented. Not everything described
is current, but the goal is to document what
the design ought to be, not what it is.

Change-Id: I938177812777af058b46c41a396407d0a083cbc4
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-31 22:20:59 -05:00
Ashod Nakashian
aba6d5b6c5 wsd: log at info level when we force uploading
Change-Id: Ic6da7e2c0f29ddbf5884b75866794609f69f8a8f
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-31 22:20:59 -05:00
Ashod Nakashian
523cfec790 wsd: save -> upload
Change-Id: I08445bd9f726225809c443f4bdfc611bbfc03bf6
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-31 22:20:59 -05:00
Ashod Nakashian
30f7ea2e9a wsd: remove default arguments of uploadToStorageInternal
Only the last argument (force) was implicit, and only
in one call (of total two calls). Explicit is better.

Change-Id: Ic26f4dd265f48156d1730f1b95bb70145ca47873
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-31 22:20:59 -05:00
Ashod Nakashian
2b96bf3fd6 wsd: move the loaded flag into DocumentStatus
The loaded flag is used to track whether or not
the document was ever loaded. It does *not* reflect
whether or not the document is currently loaded,
rather it is used to save the document, if necessary,
before unloaded.

This is why we need to track it as a separate boolean,
rather than implicitly tracking this state via the
DocumentState enum, which would not be able to
differentiate between a failed-to-load state and
one of a normal end-of-life, after loading.

Change-Id: I1fc3fb09c31cadf7ebb6b0123e462e78dd0af356
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-29 09:22:36 -05:00
Ashod Nakashian
048c468caa wsd: move the markToDestroy flag into DocumentStatus
The markToDestroy flag tracks whether or not the
document is in the process of being unloaded.

Change-Id: I8f2339f75ed6d7c5d318eb1d467d6a9cbc1d61c2
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-29 09:22:36 -05:00
Ashod Nakashian
1041346928 wsd: move the closeRequested flag into DocumentStatus
The closeRequested flag tracks owner termination.

Change-Id: I91d7491396cd8db6ca493ba8015a5310c361a2f3
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-29 09:22:36 -05:00
Ashod Nakashian
ca0c2a24cc wsd: introduce DocumentState class
DocumentState is responsible for tracking
the state of the document, properly documenting
the different stages of the document lifetime
and encapsulating all the relevant members.

DocumentState is still unused in this commit.

Change-Id: Ic2c8de3a9f2d42c5550c5f4ad5f889040f697890
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-29 09:22:36 -05:00
Ashod Nakashian
190141e942 wsd: test: disable external http regression tests
These are not needed to be executed on an ongoing
basis, only when modifying the http code.

As the external service is only used to verify
the initial implementation, it will also get
replaced with an internal (loopback) one.

Disabling for now to avoid noise when randomly
failing, due to network or other reasons.

Change-Id: I54f5203c39e48ba442313698d519b035200b41e5
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-29 09:09:58 -05:00
Tamás Zolnai
129ae61684 cypress: make sure the cell selection is visible before run test steps.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I3ce151f8ebe9405c5830630e941c94ab9ef2f7ae
2021-01-29 12:42:46 +01:00
Yunusemre Şentürk
f69448898a Bring kubernetes proof-of-concept setup with just collabora-online
Signed-off-by: Yunusemre Şentürk <yunusemre@collabora.com>
Change-Id: I5daeeea3746bb107b3c4e0b3b68efa0adacb773f
2021-01-29 11:17:28 +01:00
Tor Lillqvist
989d57b580 In Cypress tests throw error if dialog image cache is inconsistent wrt server
We have a dummy spreadsheet document with a column of cells each in a
different font size. The font size of the current cell is displayed in
the sidebar.

In the test we step through the cells first downwards and then back.
Thus the sidebar image that contains the font size will be updated as
we step through the cells. At first nothing will be found in cache,
but when returning, the images should be found in the cache. If the
cache in the JS client is not consistent with that in the server we
will throw an exception.

Change-Id: I439263c7923d985679fafa0125cd2d7f635e0995
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-01-29 12:08:58 +02:00
Tamás Zolnai
18169d795b cypress: mention video recording option in failure log.
It's a useful option to create a video during headless run.
It's much closer to the headless build wrt. timing, than
interactive test runner.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Ic9889209ac07b9fe0a9b6e326e60513412950780
2021-01-29 11:04:49 +01:00
Gökay Şatır
1df8fc91d2 Revert "Disable Freeze panes menu & notebookbar entries on tablets."
This reverts commit 6c2d725c58.

Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I50c248e3d2dfc7b06a9d0d2c1da3fe8a52d26560
2021-01-29 10:25:45 +03:00
Pedro Pinto Silva
3b398d8e9d dev doc: postmessage-api: Favicon and styling
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I469051b3bd4fd8371ab3d0593922c71d15272445
2021-01-28 19:41:41 +01:00
Miklos Vajna
b04f498ff4 test: avoid http status 512 and higher when interacting with poco
The last enumerator in Poco::Net::HTTPResponse::HTTPStatus is 511.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Id183916729c8d13f63fe0d6e0d7ca7e84c8afaeb
2021-01-28 16:40:00 +01:00