Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MrFlashAccount committed Dec 19, 2024
1 parent 2591fc5 commit a0333b0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
3 changes: 1 addition & 2 deletions app/gui/integration-test/dashboard/actions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ async function login({ page }: MockParams, email = 'email@example.com', password
async function waitForLoaded(page: Page) {
await page.waitForLoadState()

await expect(page.getByTestId('spinner')).toHaveCount(0)
await expect(page.getByTestId('loading-app-message')).not.toBeVisible({ timeout: 30_000 })
await expect(page.getByTestId('loading-screen')).toHaveCount(0, { timeout: 30_000 })
}

/** Wait for the dashboard to load. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,11 @@ test("can't start an already running by another user", ({ page }) =>
}).driveTable.withRows(async (rows) => {
const row = rows.first()
const startProjectButton = row.getByTestId('open-project')
const stopProjectButton = row.getByTestId('stop-project')

await expect(row).toBeVisible()
await expect(row.getByTestId('switch-to-project')).not.toBeVisible()
await expect(startProjectButton).toBeDisabled()
await expect(startProjectButton).toHaveAccessibleName(
getText('xIsUsingTheProject', 'Test User'),
)
await expect(startProjectButton).not.toBeVisible()
await expect(stopProjectButton).toBeDisabled()
await expect(stopProjectButton).toHaveAccessibleName(getText('xIsUsingTheProject', 'Test User'))
}))
5 changes: 4 additions & 1 deletion app/gui/src/dashboard/pages/authentication/LoadingScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ export default function LoadingScreen() {
const { getText } = useText()

return (
<div className="grid h-screen w-screen place-items-center text-primary">
<div
className="grid h-screen w-screen place-items-center text-primary"
data-testid="loading-screen"
>
<div className="flex flex-col items-center gap-8 text-center">
<StatelessSpinner state="loading-fast" size={SPINNER_SIZE_PX} />

Expand Down

0 comments on commit a0333b0

Please sign in to comment.