-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: hide transcripts in video preview for library (#1459)
Fixes: #1453
- Loading branch information
1 parent
d7bbd40
commit e118eb5
Showing
3 changed files
with
59 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
...rs/VideoEditor/components/VideoSettingsModal/components/VideoPreviewWidget/index.test.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { | ||
initializeMocks, | ||
render, | ||
screen, | ||
} from '../../../../../../../testUtils'; | ||
|
||
import { VideoPreviewWidget } from '.'; | ||
|
||
describe('VideoPreviewWidget', () => { | ||
const mockIntl = { | ||
formatMessage: (message) => message.defaultMessage, | ||
}; | ||
|
||
beforeEach(() => { | ||
initializeMocks(); | ||
}); | ||
|
||
describe('render', () => { | ||
test('renders transcripts section in preview for courses', () => { | ||
render( | ||
<VideoPreviewWidget | ||
videoSource="some-source" | ||
isLibrary={false} | ||
intl={mockIntl} | ||
transcripts={[]} | ||
blockTitle="some title" | ||
thumbnail="" | ||
/>, | ||
); | ||
expect(screen.queryByText('No transcripts added')).toBeInTheDocument(); | ||
}); | ||
|
||
test('hides transcripts section in preview for libraries', () => { | ||
render( | ||
<VideoPreviewWidget | ||
videoSource="some-source" | ||
isLibrary | ||
intl={mockIntl} | ||
transcripts={[]} | ||
blockTitle="some title" | ||
thumbnail="" | ||
/>, | ||
); | ||
expect(screen.queryByText('No transcripts added')).not.toBeInTheDocument(); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters