mirror of
https://github.com/ansible/awx.git
synced 2026-03-02 17:28:51 -03:30
add basic test for background wrapper component
This commit is contained in:
14
__tests__/components/Background.test.jsx
Normal file
14
__tests__/components/Background.test.jsx
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { mount } from 'enzyme';
|
||||||
|
|
||||||
|
import { I18nProvider } from '@lingui/react';
|
||||||
|
import Background from '../../src/components/Background';
|
||||||
|
|
||||||
|
describe('Background', () => {
|
||||||
|
test('renders the expected content', () => {
|
||||||
|
const wrapper = mount(<Background><div id="test"/></Background>);
|
||||||
|
expect(wrapper).toHaveLength(1);
|
||||||
|
expect(wrapper.find('BackgroundImage')).toHaveLength(1);
|
||||||
|
expect(wrapper.find('#test')).toHaveLength(1);
|
||||||
|
});
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user