Skip to content

Commit

Permalink
remove module deactivated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lezama committed Nov 22, 2024
1 parent 22f8a36 commit 4d7d7e6
Showing 1 changed file with 0 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,34 +104,6 @@ describe( 'SubscriptionEdit', () => {
).toBeInTheDocument();
} );

test( 'renders subscription placeholder when module is disabled', async () => {
useModuleStatus.mockReturnValue( {
isModuleActive: false,
changeStatus: jest.fn(),
} );

render( <SubscriptionEdit { ...defaultProps } /> );

const button = screen.getByText( defaultAttributes.subscriptionPlaceholderText );
fireEvent.submit( button );
expect( screen.getByText( defaultAttributes.subscriptionPlaceholderText ) ).toBeInTheDocument();
} );

test( 'calls subscription activation when placeholder button is clicked', async () => {
const user = userEvent.setup();
const onChangeStatus = jest.fn();
useModuleStatus.mockReturnValue( {
isModuleActive: false,
changeStatus: onChangeStatus,
} );

render( <SubscriptionEdit { ...defaultProps } /> );

const actionButton = screen.getByText( defaultAttributes.subscriptionPlaceholderText );
await user.click( actionButton );
expect( onChangeStatus ).toHaveBeenCalledWith( true );
} );

test( 'renders button with default text', async () => {
render( <SubscriptionEdit { ...defaultProps } /> );

Expand Down

0 comments on commit 4d7d7e6

Please sign in to comment.