Make the mocked modal clearer.

The previous text "Create a new campaign" can be a bit confusing with the other text "Create new campaign" in the test.
This commit is contained in:
Gan Eng Chin 2023-03-09 22:09:24 +08:00
parent 551db21e9b
commit e831e89997
No known key found for this signature in database
GPG Key ID: 94D5D972860ADB01
1 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ jest.mock( '~/marketing/hooks', () => ( {
} ) );
jest.mock( './CreateNewCampaignModal', () => ( {
CreateNewCampaignModal: () => <div>Create a new campaign</div>,
CreateNewCampaignModal: () => <div>Mocked CreateNewCampaignModal</div>,
} ) );
/**
@ -175,9 +175,9 @@ describe( 'Campaigns component', () => {
screen.getByRole( 'button', { name: 'Create new campaign' } )
);
// Modal with "Create a new campaign" should be displayed.
// Mocked CreateNewCampaignModal should be displayed.
expect(
screen.getByText( 'Create a new campaign' )
screen.getByText( 'Mocked CreateNewCampaignModal' )
).toBeInTheDocument();
} );
} );