summaryrefslogtreecommitdiffstats
path: root/loleaflet
diff options
context:
space:
mode:
authorRash419 <rashesh.padia@collabora.com>2021-10-08 16:03:35 +0530
committerRashesh Padia <rasheshpadia419@gmail.com>2021-11-08 12:49:56 +0530
commitc9f8f32e6499798f6dde9e595a5c268a8eaea418 (patch)
tree1c828d225e21928a2ff2cfff644e33c2943e9da7 /loleaflet
parentcypress: added delay in annotation_spec.js (diff)
downloadonline-c9f8f32e6499798f6dde9e595a5c268a8eaea418.tar.gz
online-c9f8f32e6499798f6dde9e595a5c268a8eaea418.zip
cypress: added scrolling tests for desktop calc,impress and writer
loleaflet: added test-div for horizontal and vertical scrollbar to get position Signed-off-by: Rash419 <rashesh.padia@collabora.com> Change-Id: I61f5823c26e1dc0a1ec96257bc58cb51bb29024f
Diffstat (limited to 'loleaflet')
-rw-r--r--loleaflet/src/layer/tile/ScrollSection.ts27
1 files changed, 27 insertions, 0 deletions
diff --git a/loleaflet/src/layer/tile/ScrollSection.ts b/loleaflet/src/layer/tile/ScrollSection.ts
index ed15ec7415..a1df8563fe 100644
--- a/loleaflet/src/layer/tile/ScrollSection.ts
+++ b/loleaflet/src/layer/tile/ScrollSection.ts
@@ -389,6 +389,19 @@ class ScrollSection {
this.context.fillRect(startX, scrollProps.startY, this.sectionProperties.scrollBarThickness, scrollProps.scrollSize - this.sectionProperties.scrollBarThickness);
this.context.globalAlpha = 1.0;
+
+ if (this.containerObject.testing) {
+ var element: HTMLDivElement = <HTMLDivElement>document.getElementById('test-div-vertical-scrollbar');
+ if (!element) {
+ element = document.createElement('div');
+ element.id = 'test-div-vertical-scrollbar';
+ document.body.appendChild(element);
+ }
+ element.textContent = String(scrollProps.startY);
+ element.style.display = 'none';
+ element.style.position = 'fixed';
+ element.style.zIndex = '-1';
+ }
}
private drawHorizontalScrollBar () {
@@ -406,6 +419,20 @@ class ScrollSection {
this.context.fillRect(scrollProps.startX, startY, scrollProps.scrollSize - this.sectionProperties.scrollBarThickness, this.sectionProperties.scrollBarThickness);
this.context.globalAlpha = 1.0;
+
+ if (this.containerObject.testing) {
+ var element: HTMLDivElement = <HTMLDivElement>document.getElementById('test-div-horizontal-scrollbar');
+ if (!element) {
+ element = document.createElement('div');
+ element.id = 'test-div-horizontal-scrollbar';
+ document.body.appendChild(element);
+ }
+ element.textContent = String(scrollProps.startX);
+ element.style.display = 'none';
+ element.style.position = 'fixed';
+ element.style.zIndex = '-1';
+ }
+
}
private calculateCurrentAlpha (elapsedTime: number) {