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

Lint

parent 10dabb18
No related branches found
No related tags found
No related merge requests found
const { openBrowser, goto, textBox, into, write, click, below, link, press, button, closeBrowser, screencast } = require('taiko')
const assert = require('assert').strict;
const { openBrowser, goto, textBox, into, write, click, toRightOf, below, link, press, image, waitFor, closeBrowser, screenshot, screencast } = require('taiko');
(async () => {
try {
const taiko_tests = process.env.TAIKO_TESTS || 'all'
const taikoTests = process.env.taikoTests || 'all'
const username = process.env.SSO_USERNAME
const pw = process.env.SSO_USER_PW
const domain = process.env.DOMAIN
const adminpanel_url = 'https://admin.' + domain
const grafana_url = 'https://grafana.' + domain
const adminpanelUrl = 'https://admin.' + domain
const grafanaUrl = 'https://grafana.' + domain
console.log('• Login to admin panel')
await openBrowser()
await screencast.startScreencast('output.gif')
await goto(adminpanel_url)
await goto(adminpanelUrl)
await click('Login')
await click('Login with OAS')
await write(username, into(textBox('Username')))
......@@ -23,7 +22,7 @@ const assert = require('assert').strict;
await click('Sign in')
// Nextcloud
if (taiko_tests.includes('nextcloud') || taiko_tests == 'all') {
if (taikoTests.includes('nextcloud') || taikoTests === 'all') {
console.log('• Nextcloud and Onlyoffice')
await click(link(below('nextcloud')))
await click('Log in with OpenAppStack')
......@@ -42,7 +41,7 @@ const assert = require('assert').strict;
}
// Rocketchat
if (taiko_tests.includes('rocketchat') || taiko_tests == 'all') {
if (taikoTests.includes('rocketchat') || taikoTests === 'all') {
// Navigate to rocketchat
// Breaks because of 2fa challenge which is not recieved
// by email
......@@ -53,33 +52,33 @@ const assert = require('assert').strict;
}
// Wordpress
if (taiko_tests.includes('wordpress') || taiko_tests == 'all') {
if (taikoTests.includes('wordpress') || taikoTests === 'all') {
console.log('• Wordpress')
await goto(adminpanel_url)
await goto(adminpanelUrl)
await click(link(below('wordpress')))
await click('Log in')
await click('Login with OpenID Connect')
await click('Continue with ' + username)
}
if (taiko_tests.includes('wordpress') || taiko_tests == 'all') {
if (taikoTests.includes('wordpress') || taikoTests === 'all') {
console.log('• Grafana')
await goto(adminpanel_url)
await goto(adminpanelUrl)
await click(link(below('grafana')))
await click('Sign in with OpenAppStack')
await click('Continue with ' + username)
}
// Grafana
if (taiko_tests.includes('grafana') || taiko_tests == 'all') {
if (taikoTests.includes('grafana') || taikoTests === 'all') {
// Node exporter dashboard
// Couldn't select "Manage dashboards" from the sidebar menu easily,
// so we just go there
await goto(grafana_url + '/dashboards')
await goto(grafanaUrl + '/dashboards')
click('Nodes')
// Explore Loki log messages
await goto(grafana_url + '/explore')
await goto(grafanaUrl + '/explore')
await click(image(toRightOf('Explore')))
await click('Loki')
await click('Log browser')
......
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