chore: fix broken integration test for fieldset markup
This commit is contained in:
parent
8bad1b5400
commit
0046ae427d
|
|
@ -42,15 +42,15 @@ describe('config: dashboards with basic fieldsets', function () {
|
||||||
expect(actionButtons).to.have.length(5, 'Expected 5 action buttons')
|
expect(actionButtons).to.have.length(5, 'Expected 5 action buttons')
|
||||||
|
|
||||||
// Check that we have the expected number of fieldsets
|
// Check that we have the expected number of fieldsets
|
||||||
const allFieldsets = await webdriver.findElements(By.css('fieldset'))
|
const dashboardRows = await webdriver.findElements(By.css('.dashboard-row'))
|
||||||
expect(allFieldsets).to.have.length(3, 'Expected 3 fieldsets total')
|
expect(dashboardRows).to.have.length(3, 'Expected 3 dashboard rows total')
|
||||||
|
|
||||||
// Check that we have fieldsets with the expected titles
|
// Check that we have fieldsets with the expected titles
|
||||||
const fieldsetTitles = []
|
const fieldsetTitles = []
|
||||||
for (let i = 0; i < allFieldsets.length; i++) {
|
for (let i = 0; i < dashboardRows.length; i++) {
|
||||||
const legend = await allFieldsets[i].findElements(By.css('legend'))
|
const titleElements = await dashboardRows[i].findElements(By.css('h2'))
|
||||||
if (legend.length > 0) {
|
if (titleElements.length > 0) {
|
||||||
const title = await legend[0].getText()
|
const title = await titleElements[0].getText()
|
||||||
fieldsetTitles.push(title)
|
fieldsetTitles.push(title)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue