diff --git a/mesop/components/uploader/e2e/uploader_test.ts b/mesop/components/uploader/e2e/uploader_test.ts index 73123ae8..3c34e476 100644 --- a/mesop/components/uploader/e2e/uploader_test.ts +++ b/mesop/components/uploader/e2e/uploader_test.ts @@ -22,7 +22,7 @@ test('test upload file', async ({page}) => { // Check that we can re-upload the same file. // Also check that the icon in the button is being rendered in the composite // uploader component. - await page.locator('//*[@role="img"]').click(); + await page.locator('//*[@role="img" and text()=" upload"]').click(); const fileChooser2 = await fileChooserPromise; await fileChooser2.setFiles(path.join(__dirname, 'mesop_robot.jpeg')); await expect(page.getByText('File name: mesop_robot.jpeg')).toHaveCount(1);