mirror of
https://git.cloudron.io/cloudron/peertube-app.git
synced 2024-11-25 02:51:16 +00:00
Better tab closing instructions
This commit is contained in:
parent
bf5ec0eae5
commit
c91051c145
1 changed files with 5 additions and 2 deletions
|
@ -12,11 +12,14 @@ require('chromedriver');
|
||||||
|
|
||||||
const execSync = require('child_process').execSync,
|
const execSync = require('child_process').execSync,
|
||||||
expect = require('expect.js'),
|
expect = require('expect.js'),
|
||||||
|
readlinePromises = require('readline/promises'),
|
||||||
path = require('path'),
|
path = require('path'),
|
||||||
util = require('util'),
|
util = require('util'),
|
||||||
{ Builder, By, Key, until } = require('selenium-webdriver'),
|
{ Builder, By, Key, until } = require('selenium-webdriver'),
|
||||||
{ Options } = require('selenium-webdriver/chrome');
|
{ Options } = require('selenium-webdriver/chrome');
|
||||||
|
|
||||||
|
const rl = readlinePromises.createInterface({ input: process.stdin, output: process.stdout });
|
||||||
|
|
||||||
if (!process.env.USERNAME || !process.env.PASSWORD || !process.env.EMAIL) {
|
if (!process.env.USERNAME || !process.env.PASSWORD || !process.env.EMAIL) {
|
||||||
console.log('USERNAME, EMAIL and PASSWORD env vars need to be set');
|
console.log('USERNAME, EMAIL and PASSWORD env vars need to be set');
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
|
@ -93,8 +96,8 @@ describe('Application life cycle test', function () {
|
||||||
await waitForElement(By.xpath('//a[contains(text(), "Configure my instance")]'));
|
await waitForElement(By.xpath('//a[contains(text(), "Configure my instance")]'));
|
||||||
await browser.findElement(By.xpath('//a[contains(text(), "Configure my instance")]')).click(); // this opens a new window
|
await browser.findElement(By.xpath('//a[contains(text(), "Configure my instance")]')).click(); // this opens a new window
|
||||||
|
|
||||||
console.log('Close the newly opened tab. Will wait for 60 seconds');
|
execSync('spd-say "Close the newly opened configuration tab."');
|
||||||
await browser.sleep(60000);
|
await rl.question('Is tab closed? ');
|
||||||
}
|
}
|
||||||
|
|
||||||
async function uploadVideo() {
|
async function uploadVideo() {
|
||||||
|
|
Loading…
Reference in a new issue