1 const assert = require('assert');
3 describe('Status Page', function () {
6 before(async function () {
7 page = await browser.newPage();
8 await page.goto('http://localhost:9999/status.html');
11 after(async function () {
15 it('should have software version', async function () {
16 // waits for fetching status details
17 await page.waitForFunction(
18 'document.querySelector(".col-sm-12 dl dd:nth-child(4)").textContent !== "undefined"'
20 let status_name = await page.$$eval('.col-sm-12 dl dt', elements => elements[1].textContent);
21 let version = await page.$$eval('.col-sm-12 dl dd', elements => elements[1].textContent);
23 assert.deepStrictEqual(status_name, 'Software version');
24 assert.ok(version !== 'undefined' && version.length > 1);