From b5c471ee0de2a3e58962ab326478498620912815 Mon Sep 17 00:00:00 2001 From: Dylan Kilgore Date: Tue, 27 Sep 2022 08:42:41 -0700 Subject: [PATCH] chore: select: fix flaky unit tests --- src/components/Select/Select.test.tsx | 24 +- .../Select/__snapshots__/Select.test.tsx.snap | 324 ++++++++++++++++++ 2 files changed, 336 insertions(+), 12 deletions(-) diff --git a/src/components/Select/Select.test.tsx b/src/components/Select/Select.test.tsx index 7bdcab42d..b413fc6d1 100644 --- a/src/components/Select/Select.test.tsx +++ b/src/components/Select/Select.test.tsx @@ -122,32 +122,32 @@ describe('Select', () => { }); test('Select is large', () => { - const wrapper = mount(); + expect(container.firstChild).toMatchSnapshot(); }); test('Select is medium', () => { - const wrapper = mount(); + expect(container.firstChild).toMatchSnapshot(); }); test('Select is small', () => { - const wrapper = mount(); + expect(container.firstChild).toMatchSnapshot(); }); test('Select is rectangle shaped', () => { - const wrapper = mount(); + expect(container.firstChild).toMatchSnapshot(); }); test('Select is pill shaped', () => { - const wrapper = mount(); + expect(container.firstChild).toMatchSnapshot(); }); test('Select is underline shaped', () => { - const wrapper = mount(); + expect(container.firstChild).toMatchSnapshot(); }); }); diff --git a/src/components/Select/__snapshots__/Select.test.tsx.snap b/src/components/Select/__snapshots__/Select.test.tsx.snap index fd4186c35..15b607fc5 100644 --- a/src/components/Select/__snapshots__/Select.test.tsx.snap +++ b/src/components/Select/__snapshots__/Select.test.tsx.snap @@ -1,6 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Select Select is large 1`] = ` +<<<<<<< HEAD LoadedCheerio { "0": Node { "attribs": Object { @@ -2746,4 +2747,327 @@ LoadedCheerio { "xml": false, }, } +======= +
+
+
+
+ + +
+
+
+
+`; + +exports[`Select Select is medium 1`] = ` +
+
+
+
+ + +
+
+
+
+`; + +exports[`Select Select is pill shaped 1`] = ` +
+
+
+
+ + +
+
+
+
+`; + +exports[`Select Select is rectangle shaped 1`] = ` +
+
+
+
+ + +
+
+
+
+`; + +exports[`Select Select is small 1`] = ` +
+
+
+
+ + +
+
+
+
+`; + +exports[`Select Select is underline shaped 1`] = ` +
+
+
+
+ + +
+
+
+
+>>>>>>> 0ab0adc (chore: select: fix flaky unit tests) `;