fix broken test locators
This commit is contained in:
@@ -45,12 +45,12 @@ export async function showNumericPlot(browser: Page) {
|
||||
async function valuePreviewGuttersShowChartIcon(name: string, browser: Page) {
|
||||
for (let retries = 0; retries < 2; retries += 1) {
|
||||
try {
|
||||
return await browser.locator(`//*[contains(@data-test-type, "ShowChart")][contains(@data-test, "${name}")]`)
|
||||
return await browser.locator(`//*[contains(@data-test-type, "ShowChart")][contains(@data-test, "${name}")]`).first()
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
return browser.locator(`//*[contains(@data-test-type, "ShowChart")][contains(@data-test, "${name}")]`)
|
||||
return browser.locator(`//*[contains(@data-test-type, "ShowChart")][contains(@data-test, "${name}")]`).first()
|
||||
}
|
||||
|
||||
async function chartSettings(name: string, browser: Page) {
|
||||
|
||||
Reference in New Issue
Block a user