Skip to content

Commit

Permalink
Turns out I 'fixed' my tests by removing this test
Browse files Browse the repository at this point in the history
  • Loading branch information
byronhulcher committed Mar 29, 2021
1 parent a117565 commit 522a82a
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,19 @@ import { shallow, ShallowWrapper } from 'enzyme';

import { EuiEmptyPrompt } from '@elastic/eui';

import { SampleEngineCreationCta } from '../../sample_engine_creation_cta';

import { EmptyState } from './';

describe('EmptyState', () => {
describe('when the user can manage/create engines', () => {
let wrapper: ShallowWrapper;
let prompt: ShallowWrapper;

beforeAll(() => {
setMockValues({ myRole: { canManageEngines: true } });
wrapper = shallow(<EmptyState />);
prompt = wrapper.find(EuiEmptyPrompt).dive();
});

afterAll(() => {
Expand All @@ -33,12 +37,14 @@ describe('EmptyState', () => {
expect(wrapper.find('[data-test-subj="AdminEmptyEnginesPrompt"]')).toHaveLength(1);
});

it('contains a sample engine CTA', () => {
expect(prompt.find(SampleEngineCreationCta)).toHaveLength(1);
});

describe('create engine button', () => {
let prompt: ShallowWrapper;
let button: ShallowWrapper;

beforeAll(() => {
prompt = wrapper.find(EuiEmptyPrompt).dive();
button = prompt.find('[data-test-subj="EmptyStateCreateFirstEngineCta"]');
});

Expand Down

0 comments on commit 522a82a

Please sign in to comment.