File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ describe('Operator Page', () => {
145145 cy . getByTestID ( 'account-view--header' ) . contains ( 'operator1 (1)' )
146146 // should not be able to delete undeletable accounts
147147 cy . getByTestID ( 'account-delete--button' ) . should ( 'be.disabled' )
148- // should not be able to convert non-free accounts to contract
148+ // should not be able to convert cancelled accounts to contract
149149 cy . getByTestID ( 'account-convert-to-contract--button' ) . should ( 'be.disabled' )
150150
151151 // Associated Users Section
Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ const AccountViewHeader: FC = () => {
2626 deleteOverlayVisible,
2727 } = useContext ( AccountContext )
2828 const { hasWritePermissions} = useContext ( OperatorContext )
29+ const canConvertToContract =
30+ account . type === 'free' ||
31+ ( account . type === 'pay_as_you_go' && account . zuoraAccountId !== null )
2932
3033 return (
3134 < FlexBox
@@ -47,7 +50,7 @@ const AccountViewHeader: FC = () => {
4750 setConvertToContractOverlayVisible ( ! convertToContractOverlayVisible )
4851 }
4952 status = {
50- account . type === 'free'
53+ canConvertToContract
5154 ? ComponentStatus . Default
5255 : ComponentStatus . Disabled
5356 }
You can’t perform that action at this time.
0 commit comments