mirror of
https://github.com/OliveTin/OliveTin
synced 2025-12-14 01:55:39 +00:00
* cicd: Move cypress to selenium+mocha * cicd: with is not supported unless using an a container * cicd: relative path to mocha * cicd: the integration-tests runner now starts/stops OliveTin * cicd: Knowing the CWD helps debugging * cicd: Headless chrome * cicd: wait for integration-test server to be started * fmt: Mostly fix isses from eslint * cicd: #169 - Test multiple combo boxes * fmt: let should be const * cicd: Remove cypress entirely
35 lines
1.1 KiB
JavaScript
35 lines
1.1 KiB
JavaScript
import { expect } from 'chai'
|
|
import { By, until } from 'selenium-webdriver'
|
|
import fs from 'node:fs'
|
|
|
|
describe('config: multipleDropdowns', function () {
|
|
before(async function () {
|
|
await runner.start('multipleDropdowns')
|
|
})
|
|
|
|
after(async () => {
|
|
await runner.stop()
|
|
})
|
|
|
|
it('Multiple dropdowns are possible', async function() {
|
|
await webdriver.get('http://localhost:1337')
|
|
await webdriver.manage().setTimeouts({ implicit: 2000 });
|
|
|
|
const button = await webdriver.findElement(By.id('actionButton_bdc45101bbd12c1397557790d9f3e059')).findElement(By.tagName('button'));
|
|
|
|
expect(button).to.not.be.undefined;
|
|
|
|
await button.click()
|
|
|
|
const dialog = await webdriver.findElement(By.id('argument-popup'));
|
|
|
|
await webdriver.wait(until.elementIsVisible(dialog), 2000)
|
|
|
|
const selects = await dialog.findElements(By.tagName('select'))
|
|
|
|
expect(selects).to.have.length(2)
|
|
expect(await selects[0].findElements(By.tagName('option'))).to.have.length(2)
|
|
expect(await selects[1].findElements(By.tagName('option'))).to.have.length(3)
|
|
})
|
|
})
|