mirror of
https://github.com/ansible/awx.git
synced 2026-02-04 11:08:13 -03:30
@@ -74,7 +74,7 @@ describe('<App />', () => {
|
||||
// check about modal content
|
||||
const content = await waitForElement(wrapper, aboutModalContent);
|
||||
expect(content.find('dd').text()).toContain(ansible_version);
|
||||
expect(content.find('pre').text()).toContain(`< Tower ${version} >`);
|
||||
expect(content.find('pre').text()).toContain(`< AWX ${version} >`);
|
||||
|
||||
// close about modal
|
||||
wrapper.find(aboutModalClose).simulate('click');
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
import React from 'react';
|
||||
import { mountWithContexts } from '../enzymeHelpers';
|
||||
import TowerLogo from '../../src/components/TowerLogo';
|
||||
import BrandLogo from '../../src/components/BrandLogo';
|
||||
|
||||
let logoWrapper;
|
||||
let towerLogoElem;
|
||||
let brandLogoElem;
|
||||
let svgElem;
|
||||
|
||||
const findChildren = () => {
|
||||
towerLogoElem = logoWrapper.find('TowerLogo');
|
||||
brandLogoElem = logoWrapper.find('BrandLogo');
|
||||
svgElem = logoWrapper.find('svg');
|
||||
};
|
||||
|
||||
describe('<TowerLogo />', () => {
|
||||
describe('<BrandLogo />', () => {
|
||||
test('initially renders without crashing', () => {
|
||||
logoWrapper = mountWithContexts(
|
||||
<TowerLogo />
|
||||
<BrandLogo />
|
||||
);
|
||||
findChildren();
|
||||
expect(logoWrapper.length).toBe(1);
|
||||
expect(towerLogoElem.length).toBe(1);
|
||||
expect(brandLogoElem.length).toBe(1);
|
||||
expect(svgElem.length).toBe(1);
|
||||
});
|
||||
});
|
||||
@@ -63,8 +63,8 @@ describe('<Login />', () => {
|
||||
mountLogin();
|
||||
findChildren();
|
||||
expect(loginHeaderLogo.length).toBe(1);
|
||||
expect(loginHeaderLogo.props().src).toBe('tower-logo-header.svg');
|
||||
expect(loginHeaderLogo.props().alt).toBe('Ansible Tower');
|
||||
expect(loginHeaderLogo.props().src).toBe('brand-logo.svg');
|
||||
expect(loginHeaderLogo.props().alt).toBe('AWX');
|
||||
});
|
||||
|
||||
test('state maps to un/pw input value props', () => {
|
||||
|
||||
Reference in New Issue
Block a user