Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { type OrganizationEventResponse, OrganizationEventTargetType } from 'qovery-typescript-axios'
import {
type OrganizationEventResponse,
OrganizationEventTargetType,
OrganizationEventType,
} from 'qovery-typescript-axios'
import { type ReactNode } from 'react'
import { eventsFactoryMock } from '@qovery/shared/factories'
import { dateFullFormat } from '@qovery/shared/util-dates'
Expand Down Expand Up @@ -114,6 +118,15 @@ describe('RowEvent', () => {
expect(screen.getByText('unsupported-target')).not.toHaveAttribute('href')
})

it.each([OrganizationEventType.POLICY_FAILED, OrganizationEventType.ACCESS_DENIED])(
'should render %s as a failed event',
(eventType) => {
renderWithProviders(<RowEvent {...props} event={{ ...props.event, event_type: eventType }} />)

expect(screen.getByTestId('tag').querySelector('.text-negative')).toBeInTheDocument()
}
)

it('should render Agent task for the agentic workflow target type', () => {
renderWithProviders(
<RowEvent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ export function RowEvent(props: RowEventProps) {
return <span className="truncate">{target_name}</span>
}

const isEventTypeFailed = event.event_type?.toLowerCase().includes('fail')
const isEventTypeFailed =
event.event_type === OrganizationEventType.ACCESS_DENIED || event.event_type?.toLowerCase().includes('fail')

const eventIcon = match(event.event_type)
.with(
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"mermaid": "11.6.0",
"monaco-editor": "0.53.0",
"posthog-js": "1.345.1",
"qovery-typescript-axios": "1.1.987",
"qovery-typescript-axios": "1.1.988",
Comment thread
mzottolaqovery marked this conversation as resolved.
"react": "18.3.1",
"react-country-flag": "3.0.2",
"react-datepicker": "4.12.0",
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6428,7 +6428,7 @@ __metadata:
prettier: 3.2.5
prettier-plugin-tailwindcss: 0.5.14
pretty-quick: 4.0.0
qovery-typescript-axios: 1.1.987
qovery-typescript-axios: 1.1.988
qovery-ws-typescript-axios: 0.1.666
react: 18.3.1
react-country-flag: 3.0.2
Expand Down Expand Up @@ -25954,12 +25954,12 @@ __metadata:
languageName: node
linkType: hard

"qovery-typescript-axios@npm:1.1.987":
version: 1.1.987
resolution: "qovery-typescript-axios@npm:1.1.987"
"qovery-typescript-axios@npm:1.1.988":
version: 1.1.988
resolution: "qovery-typescript-axios@npm:1.1.988"
dependencies:
axios: 1.18.1
checksum: d9d1c0eaa583cf95a7524c10e7987af4b03eb5e43338d2b91e4e124076d590cb2f6349ddc0c9dfe115ebfb9f96b2a2d3313bce49002f20ed5be190eb532e06da
checksum: cda7d48b1244efb439caaee635c772ef1e608f86b667a2a31d3244a0893e152107e232e409c9e3633775853e33a1c852afd6320499d0ba6ca71ef9e9ed7f4af3
languageName: node
linkType: hard

Expand Down
Loading