Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2020-07-09 14:01:01 +0300
committerAzul <azul@riseup.net>2020-08-11 17:09:44 +0300
commite955b5af377dcb7b3092ba867d11da2253a482dd (patch)
tree99428323a464625a966f963ff160a4267e5d3d46 /src/tests
parent7d5f0db033fb7b4becf495e01e3d4760694cf688 (diff)
fix: use Viewer state to determine current dir
This is more relyable then parsing the window location query for dir: * ?dir does not change when navigating between files right now * ?dir is not present when the viewer is used from within other apps. We used to fallback to the viewer state which solved the latter. However it is easier and less error prone to just rely on viewer state in the first place. Signed-off-by: Azul <azul@riseup.net>
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/helpers/links.spec.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/tests/helpers/links.spec.js b/src/tests/helpers/links.spec.js
index a72072fd9..426d80f6a 100644
--- a/src/tests/helpers/links.spec.js
+++ b/src/tests/helpers/links.spec.js
@@ -1,13 +1,14 @@
import { domHref, parseHref } from '../../helpers/links'
-global.OC = {
- Util: {
- History: {
- parseUrlQuery: () => ({
- dir: '/Wiki',
- }),
+global.OCA = {
+ Viewer: {
+ state: {
+ file: '/Wiki/file.md',
},
},
+}
+
+global.OC = {
config: {modRewriteWorking: true},
webroot: ''
}