Skip to content

Commit

Permalink
[EuiModal] Clean up test
Browse files Browse the repository at this point in the history
  • Loading branch information
acstll committed Dec 4, 2024
1 parent 529ca3e commit 7715ebe
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions packages/eui/src/components/modal/modal.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,15 @@ describe('EuiModal', () => {
});
});

describe('reading order', () => {
test('button is placed after header', () => {
const { getByTestSubject } = render(
<EuiModal onClose={() => null}>
<EuiHeader data-test-subj="header">Title</EuiHeader>
children
</EuiModal>
);
test('button is placed after header', () => {
const { getByTestSubject } = render(
<EuiModal onClose={() => null}>
<EuiHeader data-test-subj="header">Title</EuiHeader>
children
</EuiModal>
);

const header = getByTestSubject('header');
expect(header.nextElementSibling?.tagName).toBe('BUTTON');
});
const header = getByTestSubject('header');
expect(header.nextElementSibling?.tagName).toBe('BUTTON');
});
});

0 comments on commit 7715ebe

Please sign in to comment.