Skip to content

Commit

Permalink
chore: improved spinner query in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
FoHoOV committed May 29, 2024
1 parent a5aa5c6 commit 132d3fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/tests/common-locators/spinner.ts
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down

0 comments on commit 132d3fa

Please sign in to comment.