Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ describe('<AutoFollowPatternList />', () => {
test('should have a "settings" section', () => {
actions.clickAutoFollowPatternAt(0);
expect(find('settingsSection').find('h3').text()).toEqual('Settings');
expect(exists('settingsValues')).toBe(true);
expect(exists('settingsValues', 4)).toBe(true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I think we could we make this a bit more readable. Perhaps if we do a find on settings value and check against its lenght, not sure what you think about that!

// These are the different sections that reflect the options of an autofollow pattern
const AVAILABLE_SETTINGS = 4;
expect(find('settingsValues').length).toBe(AVAILABLE_SETTINGS);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion @sabarasaba! It looks good to me so I added it in the next commit.

});

test('should set the correct auto-follow pattern settings values', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ export class DetailPanel extends Component {

<EuiSpacer size="s" />

<EuiDescriptionList data-test-subj="settingsValues">
<EuiFlexGroup>
<EuiFlexItem>
<EuiFlexGroup>
<EuiFlexItem>
<EuiDescriptionList data-test-subj="settingsValues">
<EuiDescriptionListTitle>
<EuiTitle size="xs">
<FormattedMessage
Expand All @@ -117,9 +117,11 @@ export class DetailPanel extends Component {
<EuiDescriptionListDescription data-test-subj="remoteCluster">
{remoteCluster}
</EuiDescriptionListDescription>
</EuiFlexItem>
</EuiDescriptionList>
</EuiFlexItem>

<EuiFlexItem>
<EuiFlexItem>
<EuiDescriptionList data-test-subj="settingsValues">
<EuiDescriptionListTitle>
<EuiTitle size="xs">
<FormattedMessage
Expand All @@ -132,13 +134,15 @@ export class DetailPanel extends Component {
<EuiDescriptionListDescription data-test-subj="leaderIndexPatterns">
{leaderIndexPatterns.join(', ')}
</EuiDescriptionListDescription>
</EuiFlexItem>
</EuiFlexGroup>
</EuiDescriptionList>
</EuiFlexItem>
</EuiFlexGroup>

<EuiSpacer size="s" />
<EuiSpacer size="s" />

<EuiFlexGroup>
<EuiFlexItem>
<EuiFlexGroup>
<EuiFlexItem>
<EuiDescriptionList data-test-subj="settingsValues">
<EuiDescriptionListTitle>
<EuiTitle size="xs">
<FormattedMessage
Expand All @@ -158,9 +162,11 @@ export class DetailPanel extends Component {
</em>
)}
</EuiDescriptionListDescription>
</EuiFlexItem>
</EuiDescriptionList>
</EuiFlexItem>

<EuiFlexItem>
<EuiFlexItem>
<EuiDescriptionList data-test-subj="settingsValues">
<EuiDescriptionListTitle>
<EuiTitle size="xs">
<FormattedMessage
Expand All @@ -180,9 +186,9 @@ export class DetailPanel extends Component {
</em>
)}
</EuiDescriptionListDescription>
</EuiFlexItem>
</EuiFlexGroup>
</EuiDescriptionList>
</EuiDescriptionList>
</EuiFlexItem>
</EuiFlexGroup>
</section>
</>
);
Expand Down
Loading