From e9654aba02c392227c27a2359638cc17a2c76633 Mon Sep 17 00:00:00 2001 From: Wojciech Maj Date: Fri, 24 Mar 2023 13:29:18 +0100 Subject: [PATCH] =?UTF-8?q?Replace=20.getAttribute(=E2=80=A6)).toBe(?= =?UTF-8?q?=E2=80=A6)=20with=20.toHaveAttribute(=E2=80=A6,=20=E2=80=A6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Calendar/Navigation.spec.jsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Calendar/Navigation.spec.jsx b/src/Calendar/Navigation.spec.jsx index c925f8b5..90c4d3c9 100644 --- a/src/Calendar/Navigation.spec.jsx +++ b/src/Calendar/Navigation.spec.jsx @@ -26,11 +26,11 @@ describe('Navigation', () => { const [prev2, prev, drillUp, next, next2] = children; expect(children).toHaveLength(5); - expect(prev2.getAttribute('type')).toBe('button'); - expect(prev.getAttribute('type')).toBe('button'); - expect(drillUp.getAttribute('type')).toBe('button'); - expect(next.getAttribute('type')).toBe('button'); - expect(next2.getAttribute('type')).toBe('button'); + expect(prev2).toHaveAttribute('type', 'button'); + expect(prev).toHaveAttribute('type', 'button'); + expect(drillUp).toHaveAttribute('type', 'button'); + expect(next).toHaveAttribute('type', 'button'); + expect(next2).toHaveAttribute('type', 'button'); }); it('renders prev, drill up, next and buttons only for century view', () => { @@ -41,9 +41,9 @@ describe('Navigation', () => { const [prev, drillUp, next] = children; expect(children).toHaveLength(3); - expect(prev.getAttribute('type')).toBe('button'); - expect(drillUp.getAttribute('type')).toBe('button'); - expect(next.getAttribute('type')).toBe('button'); + expect(prev).toHaveAttribute('type', 'button'); + expect(drillUp).toHaveAttribute('type', 'button'); + expect(next).toHaveAttribute('type', 'button'); }); it('displays proper title for month view', () => {