@@ -224,19 +224,17 @@ vi.mock('@/ee/sso/hooks/sso', () => ({
224224 useSSOProviders : mockUseSSOProviders ,
225225} ) )
226226
227- /** The resource row is design-system chrome; here it is a labelled button carrying its text and trailing menu . */
227+ /** The resource row is design-system chrome; here it is a labelled button carrying its text. */
228228vi . mock ( '@/app/workspace/[workspaceId]/settings/components/settings-resource-row' , ( ) => ( {
229229 RESOURCE_LIST_STACK : '' ,
230230 SettingsResourceRow : ( {
231231 title,
232232 description,
233- trailing,
234233 clickLabel,
235234 onClick,
236235 } : {
237236 title : ReactNode
238237 description ?: ReactNode
239- trailing ?: ReactNode
240238 clickLabel ?: string
241239 onClick ?: ( ) => void
242240 } ) => (
@@ -245,24 +243,10 @@ vi.mock('@/app/workspace/[workspaceId]/settings/components/settings-resource-row
245243 { title }
246244 { description }
247245 </ button >
248- { trailing }
249246 </ div >
250247 ) ,
251248} ) )
252249
253- /** The row menu is a dropdown; here each action is a plain button so the delete path is reachable. */
254- vi . mock ( '@/app/workspace/[workspaceId]/settings/components/row-actions-menu' , ( ) => ( {
255- RowActionsMenu : ( { actions } : { actions : Array < { label : string ; onSelect : ( ) => void } > } ) => (
256- < span >
257- { actions . map ( ( action ) => (
258- < button key = { action . label } type = 'button' onClick = { action . onSelect } >
259- { action . label }
260- </ button >
261- ) ) }
262- </ span >
263- ) ,
264- } ) )
265-
266250vi . mock ( '@/hooks/queries/organization' , ( ) => ( {
267251 useOrganizationBilling : mockUseOrganizationBilling ,
268252} ) )
@@ -765,11 +749,12 @@ describe('SSO provider list', () => {
765749 expect ( findButton ( 'Identity providers' ) ) . toBeUndefined ( )
766750 } )
767751
768- it ( 'deletes a provider after confirmation' , async ( ) => {
752+ it ( 'deletes a provider from its details after confirmation' , async ( ) => {
769753 const mutateAsync = vi . fn ( ) . mockResolvedValue ( { success : true } )
770754 mockUseDeleteSSOProvider . mockReturnValue ( { isPending : false , mutateAsync } )
771755 renderSso ( 'org-a' )
772756
757+ openProvider ( 'provider-a' )
773758 act ( ( ) => findButton ( 'Delete' ) ?. click ( ) )
774759 expect ( container . querySelector ( '[role="dialog"]' ) ) . toHaveTextContent ( 'Delete identity provider' )
775760
@@ -781,7 +766,7 @@ describe('SSO provider list', () => {
781766 expect ( mutateAsync ) . toHaveBeenCalledWith ( 'provider-a' )
782767 } )
783768
784- it ( 'offers delete on the provider detail as well ' , ( ) => {
769+ it ( 'offers delete on the provider detail' , ( ) => {
785770 renderSso ( 'org-a' )
786771 openProvider ( 'provider-a' )
787772
0 commit comments