Skip to content

Commit

Permalink
fix jest tests
Browse files Browse the repository at this point in the history
  • Loading branch information
XavierM committed Dec 19, 2020
1 parent 565872d commit c3c08c4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ describe('DraggableWrapperHoverContent', () => {
});

describe('Top N', () => {
test(`it renders the 'Show top field' button when showTopN is false and an aggregatable string field is provided`, async () => {
test(`it renders the 'Show top field' button when showTopN is false and an aggregatable string field is provided`, () => {
const aggregatableStringField = 'cloud.account.id';
const wrapper = mount(
<TestProviders>
Expand All @@ -421,7 +421,7 @@ describe('DraggableWrapperHoverContent', () => {
expect(wrapper.find('[data-test-subj="show-top-field"]').first().exists()).toBe(true);
});

test(`it renders the 'Show top field' button when showTopN is false and a allowlisted signal field is provided`, async () => {
test(`it renders the 'Show top field' button when showTopN is false and a allowlisted signal field is provided`, () => {
const allowlistedField = 'signal.rule.name';
const wrapper = mount(
<TestProviders>
Expand All @@ -439,7 +439,7 @@ describe('DraggableWrapperHoverContent', () => {
expect(wrapper.find('[data-test-subj="show-top-field"]').first().exists()).toBe(true);
});

test(`it does NOT render the 'Show top field' button when showTopN is false and a field not known to BrowserFields is provided`, async () => {
test(`it does NOT render the 'Show top field' button when showTopN is false and a field not known to BrowserFields is provided`, () => {
const notKnownToBrowserFields = 'unknown.field';
const wrapper = mount(
<TestProviders>
Expand Down Expand Up @@ -477,7 +477,7 @@ describe('DraggableWrapperHoverContent', () => {
});
});

test(`invokes the toggleTopN function when the 'Show top field' button is clicked`, async () => {
test(`invokes the toggleTopN function when the 'Show top field' button is clicked`, () => {
const allowlistedField = 'signal.rule.name';
const wrapper = mount(
<TestProviders>
Expand Down Expand Up @@ -518,7 +518,7 @@ describe('DraggableWrapperHoverContent', () => {
);
});

test(`it does NOT render the 'Show top field' button when showTopN is true`, async () => {
test(`it does NOT render the 'Show top field' button when showTopN is true`, () => {
const allowlistedField = 'signal.rule.name';
const wrapper = mount(
<TestProviders>
Expand All @@ -537,7 +537,7 @@ describe('DraggableWrapperHoverContent', () => {
expect(wrapper.find('[data-test-subj="show-top-field"]').first().exists()).toBe(false);
});

test(`it renders the Top N histogram when when showTopN is true`, async () => {
test(`it renders the Top N histogram when when showTopN is true`, () => {
const allowlistedField = 'signal.rule.name';
const wrapper = mount(
<TestProviders>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c3c08c4

Please sign in to comment.