diff --git a/frontend/playwright-tests/ami.ci.spec.ts b/frontend/playwright-tests/ami.ci.spec.ts index 4cefa9f56b..f2989360ad 100644 --- a/frontend/playwright-tests/ami.ci.spec.ts +++ b/frontend/playwright-tests/ami.ci.spec.ts @@ -29,7 +29,11 @@ test('PHRMA: Medicare AMI', async ({ page }) => { await page .getByRole('button', { name: 'Population vs. distribution' }) .click() - await page.getByLabel('Comparison bar chart showing').getByRole('img').click() + await page + .getByLabel('Comparison bar chart showing') + .getByRole('img') + .nth(1) + .click() await page.getByRole('heading', { name: 'Summary for acute' }).click() await page.getByText('Gender: The Medicare source').click() await page.getByText('Sexual Orientation:').click() diff --git a/frontend/playwright-tests/black_men_gun_homicides.ci.spec.ts b/frontend/playwright-tests/black_men_gun_homicides.ci.spec.ts index c98b02da6f..c09851fbfb 100644 --- a/frontend/playwright-tests/black_men_gun_homicides.ci.spec.ts +++ b/frontend/playwright-tests/black_men_gun_homicides.ci.spec.ts @@ -63,7 +63,11 @@ test('Black Men Homicide Test: Bottom Half of Cards', async ({ page }) => { .locator('#population-vs-distribution') .getByRole('heading', { name: 'Black (NH) Men' }) .click() - await page.getByLabel('Comparison bar chart showing').getByRole('img').click() + await page + .getByLabel('Comparison bar chart showing') + .getByRole('img') + .nth(1) + .click() await page.getByRole('button', { name: 'Data table' }).click() await page.getByRole('heading', { name: 'Summary of Black male gun' }).click() await page diff --git a/frontend/playwright-tests/cawp.ci.spec.ts b/frontend/playwright-tests/cawp.ci.spec.ts index 3ae12f0d8a..f2749d8dcb 100644 --- a/frontend/playwright-tests/cawp.ci.spec.ts +++ b/frontend/playwright-tests/cawp.ci.spec.ts @@ -41,7 +41,6 @@ test('CAWP: Congress', async ({ page }) => { .getByLabel( 'Comparison bar chart showing Population vs. distribution of total women in US congress in the United States', ) - .getByRole('img') .click() await page .getByLabel( diff --git a/frontend/playwright-tests/drinking.nightly.spec.ts b/frontend/playwright-tests/drinking.nightly.spec.ts index cbf9eb3f67..d0b73419f6 100644 --- a/frontend/playwright-tests/drinking.nightly.spec.ts +++ b/frontend/playwright-tests/drinking.nightly.spec.ts @@ -38,7 +38,6 @@ test('Excessive Drinking Flow', async ({ page }) => { .getByLabel( 'Comparison bar chart showing Population vs. distribution of total adult excessive drinking cases in the United States', ) - .getByRole('img') .click() await page .getByRole('heading', { diff --git a/frontend/playwright-tests/maternal_mortality.nightly.spec.ts b/frontend/playwright-tests/maternal_mortality.nightly.spec.ts index d51b467ec9..5a5a37d978 100644 --- a/frontend/playwright-tests/maternal_mortality.nightly.spec.ts +++ b/frontend/playwright-tests/maternal_mortality.nightly.spec.ts @@ -48,7 +48,7 @@ test('Maternal Mortality', async ({ page }) => { .locator('#population-vs-distribution') .getByRole('heading', { name: 'New Mothers, Ages 10-' }) .click() - await page.getByLabel('Comparison bar chart showing').getByRole('img').click() + await page.getByLabel('Comparison bar chart showing').click() await page.getByRole('heading', { name: 'Summary for maternal' }).click() await page .getByRole('figure', { name: 'Summary for maternal' })