Skip to content

Commit f21ff84

Browse files
juanchoperezjGuillermo Machado
authored andcommitted
fix(tests): update button tests
1 parent 159a610 commit f21ff84

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/ui/button.test.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ describe('Button component ', () => {
8383
// TODO: should be fixed to use haveStyle instead of comparing the class name
8484
const expectedStyle =
8585
'font-inter font-semibold text-white dark:text-black text-xl';
86-
const receivedStyle =
87-
button.props.children[0].props.children.props.className;
86+
const receivedStyle = button.props.children[0].props.className;
8887
expect(receivedStyle).toContain(expectedStyle);
8988
});
9089
it('should apply correct styles for label when variant is secondary', () => {
@@ -93,8 +92,7 @@ describe('Button component ', () => {
9392

9493
const expectedStyle =
9594
'font-inter font-semibold text-secondary-600 text-base';
96-
const receivedStyle =
97-
button.props.children[0].props.children.props.className;
95+
const receivedStyle = button.props.children[0].props.className;
9896
expect(receivedStyle).toContain(expectedStyle);
9997
});
10098
it('should apply correct styles for label when is disabled', () => {
@@ -103,8 +101,7 @@ describe('Button component ', () => {
103101

104102
const expectedStyle =
105103
'font-inter font-semibold text-base text-neutral-600 dark:text-neutral-600';
106-
const receivedStyle =
107-
button.props.children[0].props.children.props.className;
104+
const receivedStyle = button.props.children[0].props.className;
108105
expect(receivedStyle).toContain(expectedStyle);
109106
});
110107
});

0 commit comments

Comments
 (0)