Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

test(profile-ui): r3-l6 await unavailable setup state

Josuébdcccfb5f2b1
diff --git a/profile-ui/app/components/__tests__/ProfilePortalHome.test.tsx b/profile-ui/app/components/__tests__/ProfilePortalHome.test.tsx
index 7ece535aa..6c5be6b6a 100644
--- a/profile-ui/app/components/__tests__/ProfilePortalHome.test.tsx
+++ b/profile-ui/app/components/__tests__/ProfilePortalHome.test.tsx
@@ -1,7 +1,7 @@
import React from 'react'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import '@testing-library/jest-dom/vitest'
-import { cleanup, render, screen } from '@testing-library/react'
+import { cleanup, render, screen, waitFor } from '@testing-library/react'
import { buildDesktopEnvironmentLink } from '@lib/desktopAppLinks'
import type { DesktopEnvironmentResponse } from '@/app/types/api'
import desktopEnvironmentFixture from '@/test/fixtures/desktop-environment-response.json'
@@ -74,7 +74,12 @@ describe('Profile Portal home desktop app link', () => {
render(<Page />)
- const unavailableStatus = await screen.findByRole('status')
+ await waitFor(() =>
+ expect(screen.getByRole('status')).toHaveTextContent(
+ 'Desktop app setup is unavailable right now.'
+ )
+ )
+ const unavailableStatus = screen.getByRole('status')
expect(unavailableStatus).toHaveTextContent('Desktop app setup is unavailable right now.')
expect(screen.getByRole('link', { name: 'Settings' })).toHaveAttribute(
@@ -92,7 +97,12 @@ describe('Profile Portal home desktop app link', () => {
render(<Page />)
- const unavailableStatus = await screen.findByRole('status')
+ await waitFor(() =>
+ expect(screen.getByRole('status')).toHaveTextContent(
+ 'Desktop app setup is unavailable right now.'
+ )
+ )
+ const unavailableStatus = screen.getByRole('status')
expect(unavailableStatus).toHaveTextContent('Desktop app setup is unavailable right now.')
expect(screen.getByRole('link', { name: 'Settings' })).toHaveAttribute(
diff --git a/profile-ui/package-lock.json b/profile-ui/package-lock.json
index 6a65235fd..1723bc763 100644
--- a/profile-ui/package-lock.json
+++ b/profile-ui/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-profile-ui",
- "version": "0.1.161",
+ "version": "0.1.162",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-profile-ui",
- "version": "0.1.161",
+ "version": "0.1.162",
"dependencies": {
"@clerum/desktop-app-links": "file:../packages/desktop-app-links",
"@clerum/frontend-components": "file:../packages/frontend-components",
diff --git a/profile-ui/package.json b/profile-ui/package.json
index a0e0c1e07..047685943 100644
--- a/profile-ui/package.json
+++ b/profile-ui/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-profile-ui",
- "version": "0.1.161",
+ "version": "0.1.162",
"private": true,
"scripts": {
"dev": "next dev",