| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- 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,
- waitForNavigationLinks,
- takeScreenshotOnFailure,
- } from '../../lib/elements.js'
- describe('config: empty dashboards are hidden', function () {
- this.timeout(30000)
- 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()
- await waitForNavigationLinks(3)
- 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
- })
- })
|