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

Add taiko demo script for PTF showcase

parent 2f7fc67a
No related branches found
No related tags found
No related merge requests found
# Prototypefund demo with taiko
Setup:
npm install -g taiko-video taiko
sudo apt install ffmpeg
Start taiko with:
taiko --observe ptf-demo.js
Record video:
taiko --observe ptf-demo.js --plugin video
const { openBrowser, goto, textBox, into, write, click, below, link, press, button, closeBrowser } = require('taiko');
const assert = require('assert').strict;
(async () => {
try {
var username = process.env.SSO_USERNAME;
var pw = process.env.SSO_USER_PW;
// Login to admin panel
var url = process.env.ADMINPANEL_URL;
await openBrowser();
await goto(url);
await click('Login')
await click('Login with OAS')
await write(username, into(textBox('Username')));
await write(pw, into(textBox('Password')));
await click('Remember me')
await click('Sign in');
// Navigate to nextcloud
await click(link(below('nextcloud')));
await click('Log in with OpenAppStack');
await click('Continue with demo');
// Close potential nextcloud modal
await press('Escape');
// Open document
await click(link('Documents'));
await click(link('Welcome to Nextcloud Hub.docx'));
// Room for interactive session
// ...
// Logout
click(image())
click('Log out')
// Navigate to rocketchat
// Breaks because of 2fa challenge which is not recieved
// by email
// TODO: Create issue
// await click(link(below('rocketchat')));
// await click('Login via OpenAppStack');
// await click('Continue with demo');
// Wordpress
await goto(url);
await click(link(below('wordpress')));
await click('Log in');
await click('Login with OpenID Connect');
await click('Continue with demo');
await click('Log out');
// Grafana
await goto(url);
await click(link(below('grafana')));
await click('Sign in with OpenAppStack');
await click('Continue with demo');
} catch (error) {
console.error(error);
} finally {
await closeBrowser();
}
})();
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