38 lines
1022 B
JavaScript
38 lines
1022 B
JavaScript
import { describe, it, before, after } from 'mocha'
|
|
import { expect } from 'chai'
|
|
import { By, until, Condition } from 'selenium-webdriver'
|
|
//import * as waitOn from 'wait-on'
|
|
import {
|
|
getRootAndWait,
|
|
openSidebar,
|
|
getNavigationLinks,
|
|
takeScreenshotOnFailure,
|
|
} from '../../lib/elements.js'
|
|
|
|
describe('config: empty dashboards are hidden', function () {
|
|
before(async function () {
|
|
await runner.start('emptyDashboardsAreHidden')
|
|
})
|
|
|
|
after(async () => {
|
|
await runner.stop()
|
|
})
|
|
|
|
afterEach(function () {
|
|
takeScreenshotOnFailure(this.currentTest, webdriver);
|
|
});
|
|
|
|
it('Test hidden dashboard', async function () {
|
|
await getRootAndWait()
|
|
|
|
await openSidebar()
|
|
|
|
const title = await webdriver.getTitle()
|
|
expect(title).to.be.equal("Actions - OliveTin")
|
|
|
|
const navigationLinks = await getNavigationLinks()
|
|
expect(navigationLinks).to.not.be.empty
|
|
expect(navigationLinks.length).to.be.equal(3, 'Expected the nav to only have 3 links') // entities + logs + diagnostics
|
|
})
|
|
})
|