Skip to content

Commit b20b8db

Browse files
committed
test: improve coverage
1 parent be9189e commit b20b8db

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/studio-home/StudioHome.test.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,18 @@ describe('<StudioHome />', () => {
112112
expect(spinner.textContent).toEqual('Loading...');
113113
});
114114

115+
it('should render "email staff" header button if enabled', async () => {
116+
mockUseSelector.mockReturnValue({
117+
...studioHomeMock,
118+
isShowEmailStaff: true,
119+
});
120+
121+
render(<StudioHome />, { path: '/home' });
122+
const header = getHeaderElement();
123+
const link = within(header).getByRole('link', { name: 'Email staff to create course' });
124+
expect(link).toHaveAttribute('href', `mailto:${studioRequestEmail}`);
125+
});
126+
115127
describe('render new library button', () => {
116128
it('should navigate to legacy library creation when libraries-v2 disabled', async () => {
117129
mockUseSelector.mockReturnValue({

0 commit comments

Comments
 (0)