mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-12-24 22:42:23 -05:00
29 lines
1,009 B
JavaScript
29 lines
1,009 B
JavaScript
import React from 'react';
|
|
import {mountWithIntl} from '../../helpers/intl-helpers.jsx';
|
|
import ExtensionRequirements from '../../../src/components/extension-landing/extension-requirements';
|
|
|
|
describe('ExtensionRequirements', () => {
|
|
|
|
test('shows default extension requirements', () => {
|
|
const component = mountWithIntl(<ExtensionRequirements />);
|
|
|
|
const requirements = component.find('.extension-requirements span').map(span => span.text());
|
|
|
|
expect(requirements).toEqual(
|
|
['Windows 10 version 1709+', 'macOS 10.13+', 'ChromeOS', 'Android 6.0+', 'Bluetooth', 'Scratch Link']
|
|
);
|
|
});
|
|
|
|
test('hides requirements', () => {
|
|
const component = mountWithIntl(<ExtensionRequirements
|
|
hideWindows
|
|
hideMac
|
|
hideChromeOS
|
|
hideAndroid
|
|
hideBluetooth
|
|
hideScratchLink
|
|
/>);
|
|
|
|
expect(component.find('.extension-requirements span').length).toEqual(0);
|
|
});
|
|
});
|