diff --git a/test/taiko/apps.js b/test/taiko/apps.js index 09a099c2f4306ca78e091b93f112265231b28480..40bb9f4db6bda6e8f6098f293948b4f27d885bcd 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))