Skip to content

Commit 4e15fb5

Browse files
committed
fix(Ansible): Rename Ansible back (#353)
1 parent acaf44e commit 4e15fb5

File tree

12 files changed

+37
-37
lines changed

12 files changed

+37
-37
lines changed

cypress/component/Ansible.cy.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import React from 'react';
2+
import { Ansible } from '@patternfly/react-component-groups/dist/dynamic/Ansible';
3+
4+
describe('Ansible', () => {
5+
it('renders supported Ansible', () => {
6+
cy.mount(<Ansible />)
7+
cy.get('i').should('have.class', 'ansibleSupported-0-2-2');
8+
});
9+
it('renders unsupported Ansible', () => {
10+
cy.mount(<Ansible isSupported={false}/>)
11+
cy.get('i').should('have.class', 'ansibleUnsupported-0-2-3');
12+
});
13+
});

cypress/component/AnsibleSupport.cy.tsx

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ section: Component groups
55
subsection: Status and state indicators
66
# Sidenav secondary level section
77
# should be the same for all markdown files
8-
id: Ansible support
8+
id: Ansible
99
# Tab (react | react-demos | html | html-demos | design-guidelines | accessibility)
1010
source: react
1111
# If you use typescript, the name of the interface to display props for
1212
# These are found through the sourceProps function provided in patternfly-docs.source.js
13-
propComponents: ['AnsibleSupport']
14-
sourceLink: https://github.com/patternfly/react-component-groups/blob/main/packages/module/patternfly-docs/content/extensions/component-groups/examples/AnsibleSupport/AnsibleSupport.md
13+
propComponents: ['Ansible']
14+
sourceLink: https://github.com/patternfly/react-component-groups/blob/main/packages/module/patternfly-docs/content/extensions/component-groups/examples/Ansible/Ansible.md
1515
---
1616

17-
import AnsibleSupport from '@patternfly/react-component-groups/dist/dynamic/AnsibleSupport';
17+
import Ansible from '@patternfly/react-component-groups/dist/dynamic/Ansible';
1818

19-
The **Ansible support** component displays the Ansible project logo, with a support status style.
19+
The **Ansible** component displays the Ansible project logo, with a support status style.
2020

2121
### Ansible supported
2222

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import React from 'react';
2+
import Ansible from '@patternfly/react-component-groups/dist/dynamic/Ansible';
3+
4+
export const BasicExample: React.FunctionComponent = () => <Ansible />;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import React from 'react';
2+
import Ansible from '@patternfly/react-component-groups/dist/dynamic/Ansible';
3+
4+
export const BasicExample: React.FunctionComponent = () => <Ansible isSupported={false} />;

packages/module/patternfly-docs/content/extensions/component-groups/examples/AnsibleSupport/AnsibleSupportedExample.tsx

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/module/patternfly-docs/content/extensions/component-groups/examples/AnsibleSupport/AnsibleUnsupportedExample.tsx

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/module/src/AnsibleSupport/AnsibleSupport.test.tsx renamed to packages/module/src/Ansible/Ansible.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import React from 'react';
22
import { render } from '@testing-library/react';
3-
import AnsibleSupport from './AnsibleSupport';
3+
import Ansible from './Ansible';
44

5-
describe('AnsibleSupport component', () => {
5+
describe('Ansible component', () => {
66

77
it('should render unsupported', () => {
8-
const { container } = render(<AnsibleSupport isSupported={false} />);
8+
const { container } = render(<Ansible isSupported={false} />);
99
expect(container).toMatchSnapshot();
1010
});
1111

1212
it('should render supported', () => {
13-
const { container } = render(<AnsibleSupport />);
13+
const { container } = render(<Ansible />);
1414
expect(container).toMatchSnapshot();
1515
});
1616

packages/module/src/AnsibleSupport/AnsibleSupport.tsx renamed to packages/module/src/Ansible/Ansible.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22
import clsx from 'clsx';
33
import { createUseStyles } from 'react-jss';
44

5-
export interface AnsibleSupportProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
5+
export interface AnsibleProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
66
/** Supported/unsupported variant flag */
77
isSupported?: boolean;
88
/** Ansible icon className */
@@ -32,7 +32,7 @@ const useStyles = createUseStyles({
3232
}
3333
})
3434

35-
export const AnsibleSupport: React.FunctionComponent<AnsibleSupportProps> = ({ isSupported = true, className, ouiaId = "AnsibleSupport-icon", ...props }: AnsibleSupportProps) => {
35+
export const Ansible: React.FunctionComponent<AnsibleProps> = ({ isSupported = true, className, ouiaId = "AnsibleSupport-icon", ...props }: AnsibleProps) => {
3636
const classes = useStyles();
3737
const ansibleLogoClass = clsx(
3838
classes.ansible,
@@ -94,4 +94,4 @@ export const AnsibleSupport: React.FunctionComponent<AnsibleSupportProps> = ({ i
9494
);
9595
};
9696

97-
export default AnsibleSupport;
97+
export default Ansible;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`AnsibleSupport component should render supported 1`] = `
3+
exports[`Ansible component should render supported 1`] = `
44
<div>
55
<i
66
class="ansible-0-2-1 ansibleSupported-0-2-2"
@@ -26,7 +26,7 @@ exports[`AnsibleSupport component should render supported 1`] = `
2626
</div>
2727
`;
2828

29-
exports[`AnsibleSupport component should render unsupported 1`] = `
29+
exports[`Ansible component should render unsupported 1`] = `
3030
<div>
3131
<i
3232
class="ansible-0-2-1 ansibleUnsupported-0-2-3"

0 commit comments

Comments
 (0)