Skip to content

Commit

Permalink
feat: replaced alerts component, fixed unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Rassl committed Oct 2, 2024
1 parent bc813d4 commit 555ee1b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
File renamed without changes.
8 changes: 5 additions & 3 deletions src/components/App/AppBar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { useNavigate } from 'react-router-dom'
import styled from 'styled-components'
import { Alerts } from '~/components/Alerts'
import { Flex } from '~/components/common/Flex'
import { Text } from '~/components/common/Text'
import { Stats } from '~/components/Stats'
import { useAiSummaryStore } from '~/stores/useAiSummaryStore'
import { useAppStore } from '~/stores/useAppStore'
import { useDataStore } from '~/stores/useDataStore'
import { colors } from '~/utils/colors'
import { media } from '~/utils/media'
import { useAiSummaryStore } from '~/stores/useAiSummaryStore'
import { useDataStore } from '~/stores/useDataStore'
import { useNavigate } from 'react-router-dom'

export const AppBar = () => {
const appMetaData = useAppStore((s) => s.appMetaData)
Expand Down Expand Up @@ -39,6 +40,7 @@ export const AppBar = () => {
<Text className="subtitle">Second Brain</Text>
</TitleWrapper>
<Stats />
<Alerts />
</Header>
)
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/Stats/__tests__/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const mockStats = {

const mockBudget = 20000

describe.skip('Component Test Stats', () => {
describe('Component Test Stats', () => {
beforeEach(() => {
jest.clearAllMocks()
mockedUseDataStore.mockImplementation(() => [mockStats, jest.fn().mockImplementation((stats) => stats)])
Expand Down Expand Up @@ -154,7 +154,7 @@ describe.skip('Component Test Stats', () => {
})
})

it.skip('should render the button only if totalProcessing is present and greater than 0', async () => {
it('should render the button only if totalProcessing is present and greater than 0', async () => {
const mockedGetTotalProcessing = getTotalProcessing as jest.MockedFunction<() => Promise<ProcessingResponse>>

const mockResponse: ProcessingResponse = {
Expand Down
2 changes: 0 additions & 2 deletions src/components/Stats/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { colors } from '~/utils/colors'
import DocumentIcon from '../Icons/DocumentIcon'
import EpisodeIcon from '../Icons/EpisodeIcon'
import { Flex } from '../common/Flex'
import { Alerts } from './Alerts'
import { Animation } from './Animation'

interface StatConfigItem {
Expand Down Expand Up @@ -192,7 +191,6 @@ export const Stats = () => {
</Tooltip>
</Budget>
</StatisticsBudget>
<Alerts />
</StatisticsContainer>
)
}
Expand Down

0 comments on commit 555ee1b

Please sign in to comment.