From 5f617d94db71b7f08370433ace17b97c2b1f3ccf Mon Sep 17 00:00:00 2001 From: Maxim Khlobystov Date: Wed, 8 Mar 2023 15:33:05 +0000 Subject: [PATCH] New whiteboard tests + refactoring --- .../zoom-tool/component.jsx | 2 + .../playwright/core/constants.js | 1 + .../playwright/core/elements.js | 6 ++ bigbluebutton-tests/playwright/core/util.js | 10 +++ .../playwright/layouts/layouts.spec.js | 12 ++-- .../playwright/whiteboard/drawArrow.js | 35 ++++++++++ .../playwright/whiteboard/drawEllipse.js | 27 +++----- .../playwright/whiteboard/drawLine.js | 27 +++----- .../playwright/whiteboard/drawPencil.js | 27 +++----- .../playwright/whiteboard/drawRectangle.js | 27 +++----- .../playwright/whiteboard/drawStickyNote.js | 27 +++----- .../playwright/whiteboard/drawText.js | 27 +++----- .../playwright/whiteboard/drawTriangle.js | 27 +++----- .../playwright/whiteboard/eraser.js | 48 +++++++++++++ .../playwright/whiteboard/pan.js | 40 +++++++++++ .../playwright/whiteboard/whiteboard.spec.js | 65 ++++++++++++++---- .../moderator1-arrow-Chromium-linux.png | Bin 0 -> 57923 bytes .../moderator1-eraser1-Chromium-linux.png | Bin 0 -> 56895 bytes .../moderator1-eraser2-Chromium-linux.png | Bin 0 -> 53647 bytes .../moderator1-pan-Chromium-linux.png | Bin 0 -> 48564 bytes .../moderator1-zoom125-Chromium-linux.png | Bin 0 -> 52157 bytes .../moderator1-zoom400-Chromium-linux.png | Bin 0 -> 29302 bytes .../moderator2-arrow-Chromium-linux.png | Bin 0 -> 48026 bytes .../moderator2-eraser1-Chromium-linux.png | Bin 0 -> 56895 bytes .../moderator2-eraser2-Chromium-linux.png | Bin 0 -> 43674 bytes .../moderator2-pan-Chromium-linux.png | Bin 0 -> 41301 bytes .../moderator2-zoom125-Chromium-linux.png | Bin 0 -> 43313 bytes .../moderator2-zoom400-Chromium-linux.png | Bin 0 -> 20785 bytes .../playwright/whiteboard/zoom.js | 49 +++++++++++++ 29 files changed, 325 insertions(+), 132 deletions(-) create mode 100644 bigbluebutton-tests/playwright/whiteboard/drawArrow.js create mode 100644 bigbluebutton-tests/playwright/whiteboard/eraser.js create mode 100644 bigbluebutton-tests/playwright/whiteboard/pan.js create mode 100644 bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.js-snapshots/moderator1-arrow-Chromium-linux.png create mode 100644 bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.js-snapshots/moderator1-eraser1-Chromium-linux.png create mode 100644 bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.js-snapshots/moderator1-eraser2-Chromium-linux.png create mode 100644 bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.js-snapshots/moderator1-pan-Chromium-linux.png create mode 100644 bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.js-snapshots/moderator1-zoom125-Chromium-linux.png create mode 100644 bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.js-snapshots/moderator1-zoom400-Chromium-linux.png create mode 100644 bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.js-snapshots/moderator2-arrow-Chromium-linux.png create mode 100644 bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.js-snapshots/moderator2-eraser1-Chromium-linux.png create mode 100644 bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.js-snapshots/moderator2-eraser2-Chromium-linux.png create mode 100644 bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.js-snapshots/moderator2-pan-Chromium-linux.png create mode 100644 bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.js-snapshots/moderator2-zoom125-Chromium-linux.png create mode 100644 bigbluebutton-tests/playwright/whiteboard/whiteboard.spec.js-snapshots/moderator2-zoom400-Chromium-linux.png create mode 100644 bigbluebutton-tests/playwright/whiteboard/zoom.js diff --git a/bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/zoom-tool/component.jsx b/bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/zoom-tool/component.jsx index 1be591113e..8476f098a9 100644 --- a/bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/zoom-tool/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/presentation/presentation-toolbar/zoom-tool/component.jsx @@ -179,6 +179,7 @@ class ZoomTool extends PureComponent { aria-describedby="zoomOutDescription" aria-label={zoomOutAriaLabel} label={intl.formatMessage(intlMessages.zoomOutLabel)} + data-test="zoomOutBtn" icon="substract" onClick={() => { }} disabled={(zoomValue <= minBound) || !isMeteorConnected} @@ -198,6 +199,7 @@ class ZoomTool extends PureComponent { size="md" onClick={() => this.resetZoom()} label={intl.formatMessage(intlMessages.resetZoomLabel)} + data-test="resetZoomButton" hideLabel />