tests(cypress): Add data-cy identifier to frames

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2023-02-02 12:12:22 +01:00
Родитель 4f40ae8ebd
Коммит 7b5b775a35
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4C614C6ED2CDE6DF
3 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -202,7 +202,7 @@ const documentsMain = {
+ '</form>'
// iframe that contains the Collabora Online Viewer
const frame = '<iframe id="loleafletframe_viewer" name="loleafletframe_viewer" allowfullscreen nonce="' + btoa(getRequestToken()) + '" style="width:100%;height:100%;position:absolute;"/>'
const frame = '<iframe data-cy="coolframe" id="loleafletframe" name="loleafletframe_viewer" allowfullscreen nonce="' + btoa(getRequestToken()) + '" style="width:100%;height:100%;position:absolute;"/>'
$('#revViewer').append(form)
$('#revViewer').append(frame)
@ -262,7 +262,7 @@ const documentsMain = {
+ '</form>'
// iframe that contains the Collabora Online
const frame = '<iframe id="loleafletframe" name="loleafletframe" nonce="' + btoa(getRequestToken()) + '" scrolling="no" allowfullscreen style="width:100%;height:100%;position:absolute;" />'
const frame = '<iframe data-cy="coolframe" id="loleafletframe" name="loleafletframe" nonce="' + btoa(getRequestToken()) + '" scrolling="no" allowfullscreen style="width:100%;height:100%;position:absolute;" />'
$('#mainContainer').append(form)
$('#mainContainer').append(frame)

Просмотреть файл

@ -93,7 +93,7 @@ const odfViewer = {
$('head').append($('<link rel="stylesheet" type="text/css" href="' + generateFilePath('richdocuments', 'css', 'mobile.css') + '"/>'))
const $iframe = $('<iframe id="richdocumentsframe" nonce="' + btoa(OC.requestToken) + '" scrolling="no" allowfullscreen src="' + documentUrl + '" />')
const $iframe = $('<iframe data-cy="documentframe" id="richdocumentsframe" nonce="' + btoa(OC.requestToken) + '" scrolling="no" allowfullscreen src="' + documentUrl + '" />')
odfViewer.loadingTimeout = setTimeout(odfViewer.onTimeout,
(OC.getCapabilities().richdocuments.config.timeout * 1000 || 15000))
$iframe.src = documentUrl

Просмотреть файл

@ -60,6 +60,7 @@
</div>
<iframe id="collaboraframe"
ref="documentFrame"
data-cy="documentframe"
class="office-viewer__iframe"
:style="{visibility: showIframe ? 'visible' : 'hidden' }"
:src="src" />