entities.js 1.0 KB

123456789101112131415161718192021222324252627282930
  1. import { describe, it, before, after } from 'mocha'
  2. import { expect } from 'chai'
  3. import { By, until } from 'selenium-webdriver'
  4. import { getRootAndWait, takeScreenshot } from '../lib/elements.js'
  5. describe('config: entities', function () {
  6. before(async function () {
  7. await runner.start('entities')
  8. })
  9. after(async () => {
  10. await runner.stop()
  11. })
  12. it('Entity buttons are rendered', async function() {
  13. await getRootAndWait()
  14. const buttons = await webdriver.findElement(By.id('root-group')).findElements(By.tagName('button'))
  15. expect(buttons).to.not.be.null
  16. expect(buttons).to.have.length(3)
  17. expect(await buttons[0].getAttribute('title')).to.be.equal('Ping server1')
  18. expect(await buttons[1].getAttribute('title')).to.be.equal('Ping server2')
  19. expect(await buttons[2].getAttribute('title')).to.be.equal('Ping server3')
  20. const dialogErr = await webdriver.findElement(By.id('big-error'))
  21. expect(dialogErr).to.not.be.null
  22. expect(await dialogErr.isDisplayed()).to.be.false
  23. })
  24. })