mirror of
https://github.com/OliveTin/OliveTin
synced 2025-12-13 17:45:36 +00:00
cicd: fix broken test, hopefully
This commit is contained in:
5
integration-tests/lib/elements.js
Normal file
5
integration-tests/lib/elements.js
Normal file
@@ -0,0 +1,5 @@
|
||||
import { By } from 'selenium-webdriver'
|
||||
|
||||
export async function getActionButtons (webdriver) {
|
||||
return await webdriver.findElement(By.id('contentActions')).findElements(By.tagName('button'))
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
import { describe, before, after } from 'mocha'
|
||||
import { describe, it, before, after } from 'mocha'
|
||||
import { expect } from 'chai'
|
||||
import { By, until } from 'selenium-webdriver'
|
||||
import { getActionButtons } from '../lib/elements.js'
|
||||
|
||||
describe('config: multipleDropdowns', function () {
|
||||
before(async function () {
|
||||
@@ -15,15 +16,19 @@ describe('config: multipleDropdowns', function () {
|
||||
await webdriver.get(runner.baseUrl())
|
||||
await webdriver.manage().setTimeouts({ implicit: 2000 })
|
||||
|
||||
const buttons = await webdriver.findElements(By.tagName('button'))
|
||||
let button = null
|
||||
const buttons = await getActionButtons(webdriver)
|
||||
|
||||
let button = null
|
||||
for (const b of buttons) {
|
||||
if (await b.getAttribute('title') === 'Test multiple dropdowns') {
|
||||
const title = await b.getAttribute('title')
|
||||
|
||||
console.log('title: ' + title)
|
||||
if (title === 'Test multiple dropdowns') {
|
||||
button = b
|
||||
}
|
||||
}
|
||||
|
||||
expect(buttons).to.have.length(2)
|
||||
expect(button).to.not.be.null
|
||||
|
||||
await button.click()
|
||||
|
||||
Reference in New Issue
Block a user