From e0998ac496b8e7c17913256df7fc8e593873ee9e Mon Sep 17 00:00:00 2001 From: Varac <varac@varac.net> Date: Mon, 9 Aug 2021 14:35:30 +0200 Subject: [PATCH] Taiko: reload files page because of bug in NC20 --- test/taiko/apps.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/test/taiko/apps.js b/test/taiko/apps.js index 09a099c2f..40bb9f4db 100644 --- a/test/taiko/apps.js +++ b/test/taiko/apps.js @@ -67,15 +67,22 @@ const assert = require('assert'); // Test if calendar app is enabled await click('Calendar') await waitFor(async () => (await text("Settings & Import").isVisible()), globalTimeout) - await click('Dashboard') - await waitFor(async () => (await text("Set location for weather").isVisible()), globalTimeout) console.log('• Nextcloud Onlyoffice integration') // Open document and type some text await click('Files') + // Force page reload because of random empty pages for files app + // https://open.greenhost.net/openappstack/nextcloud/-/issues/973 + await reload() + await waitFor(async () => (await link({class:'new'}).isVisible()), globalTimeout) await click(link({class:'new'})) await click('Document') + + // Create random file name because NC20 will complain if file already + // exists + const file_rand = 'test-' + Math.random().toString(16).substr(2, 12) + await press([...file_rand, 'Enter']) await press('Enter') let italicButtonId = '#id-toolbar-btn-italic' @@ -88,7 +95,7 @@ const assert = require('assert'); let buttonStateAfter = await evaluate($(italicButtonId), (elem) => {return elem.getAttribute('class')}) await assert.ok(buttonStateAfter.includes('active')) - await press(['H', 'i', ' ', 'f', 'r', 'o', 'm', ' ', 't', 'a', 'i', 'k', 'o', '!', 'Enter']) + await press([...'Hi from taiko!', 'Enter']) // Deactivate italic finially await click($(italicButtonId)) -- GitLab