Skip to content
Snippets Groups Projects
Unverified Commit 58ed989f authored by Varac's avatar Varac
Browse files

Fix SSO test

parent fae09075
No related branches found
No related tags found
No related merge requests found
......@@ -20,9 +20,6 @@ const assert = require('assert');
await openBrowser()
// await screencast.startScreencast('output.gif')
// Wait for manual screencast recording
// await waitFor(5000)
await goto(adminpanelUrl)
await click('Login')
await click('Login with OAS')
......@@ -38,32 +35,15 @@ const assert = require('assert');
await click('Log in with OpenAppStack')
await click('Continue with ' + username)
// Close potential nextcloud modal
// Close potential nextcloud first run wizard modal
// https://github.com/nextcloud/firstrunwizard/issues/488
// Unfortunately, we need to sleep a while since I haven't found a
// good way that closes the modal *if* it pops up, since these
// tests should also work on subsequent logins.
await waitFor(5000)
await press('Escape')
// Open document and type some text
await click(link(), above('Add notes'))
await click('Document')
await press('Enter')
let italicButtonId = '#id-toolbar-btn-italic'
await waitFor($(italicButtonId), globalTimeout)
// Activate italic button
let buttonStateBefore = await evaluate($(italicButtonId), (elem) => {return elem.getAttribute('class')})
await assert.ok(!buttonStateBefore.includes('active'))
await click($(italicButtonId))
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'])
// Deactivate italic finially
await click($(italicButtonId))
await waitFor(5000)
await closeTab()
await assert.ok(await text('Add notes, lists or links …').exists());
}
// Rocketchat
......@@ -95,28 +75,8 @@ const assert = require('assert');
await click(link(below('grafana')))
await click('Sign in with OpenAppStack')
await click('Continue with ' + username)
// Node exporter dashboard
// Couldn't select "Manage dashboards" from the sidebar menu easily,
// so we just go there
await goto(grafanaUrl + '/dashboards')
await click(link('Nodes'))
await('CPU Usage')
// await waitFor(2000)
// Explore Loki log messages
await goto(grafanaUrl + '/explore')
await click(image(toRightOf('Explore')))
await click('Loki')
await click('Log browser')
await click('app')
await click('cert-manager')
await click('grafana')
await click('Show logs')
await assert.ok(await text('Welcome to Grafana').exists());
}
// Wait a bit before closing browser
// await waitFor(20000)
} catch (error) {
await screenshot()
// await screencast.stopScreencast()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment