diff --git a/frontend/tests/common-locators/spinner.ts b/frontend/tests/common-locators/spinner.ts index 1009a41b..0e136074 100644 --- a/frontend/tests/common-locators/spinner.ts +++ b/frontend/tests/common-locators/spinner.ts @@ -1,7 +1,7 @@ import { expect, type Locator } from '@playwright/test'; export function getSpinnerIn(locator: Locator) { - return locator.getByTestId('spinner-loading-state'); + return locator.getByTestId('spinner-loading-state').and(locator.locator(':visible')); } export async function waitForSpinnerStateToBeIdle(locator: Locator, timeout?: number) {