Skip to content

Commit

Permalink
Tweaks re Rob's feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal committed Apr 30, 2018
1 parent 8e72691 commit f257d3a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ exports[`EuiTabbedContent behavior when selected tab state isn't controlled by t
</div>
`;

exports[`EuiTabbedContent is rendered 1`] = `
exports[`EuiTabbedContent is rendered with required props and tabs 1`] = `
<div
aria-label="aria-label"
class="testClass1 testClass2"
Expand Down Expand Up @@ -96,7 +96,7 @@ exports[`EuiTabbedContent is rendered 1`] = `
</div>
`;

exports[`EuiTabbedContent props initialSelectedTab is rendered 1`] = `
exports[`EuiTabbedContent props initialSelectedTab renders a selected tab 1`] = `
<div>
<div
class="euiTabs"
Expand Down Expand Up @@ -142,7 +142,7 @@ exports[`EuiTabbedContent props initialSelectedTab is rendered 1`] = `
</div>
`;

exports[`EuiTabbedContent props selectedTab is rendered 1`] = `
exports[`EuiTabbedContent props selectedTab renders a selected tab 1`] = `
<div>
<div
class="euiTabs"
Expand Down
6 changes: 2 additions & 4 deletions src/components/tabs/tabbed_content/tabbed_content.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ export class EuiTabbedContent extends Component {
return (
<div className={className} {...rest}>
<EuiTabs size={size}>
{
tabs.map((tab) => {
{tabs.map((tab) => {
const {
id,
name,
Expand All @@ -93,8 +92,7 @@ export class EuiTabbedContent extends Component {
};

return <EuiTab {...props}>{name}</EuiTab>;
})
}
})}
</EuiTabs>

<div
Expand Down
6 changes: 3 additions & 3 deletions src/components/tabs/tabbed_content/tabbed_content.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const tabs = [
];

describe('EuiTabbedContent', () => {
test('is rendered', () => {
test('is rendered with required props and tabs', () => {
const component = render(<EuiTabbedContent {...requiredProps} tabs={tabs} />);
expect(component).toMatchSnapshot();
});
Expand All @@ -46,14 +46,14 @@ describe('EuiTabbedContent', () => {
});

describe('selectedTab', () => {
test('is rendered', () => {
test('renders a selected tab', () => {
const component = render(<EuiTabbedContent selectedTab={kibanaTab} tabs={tabs} />);
expect(component).toMatchSnapshot();
});
});

describe('initialSelectedTab', () => {
test('is rendered', () => {
test('renders a selected tab', () => {
const component = render(<EuiTabbedContent initialSelectedTab={kibanaTab} tabs={tabs} />);
expect(component).toMatchSnapshot();
});
Expand Down

0 comments on commit f257d3a

Please sign in to comment.