Skip to content

Commit 2fd81b7

Browse files
committed
test fixed
1 parent 20ffdab commit 2fd81b7

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

packages/mui-material/src/Divider/Divider.test.js

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -99,20 +99,25 @@ describe('<Divider />', () => {
9999
}
100100
});
101101

102-
it('should set the border-style dashed in before and after pseudoclass', () => {
103-
const { container } = render(<StyledDivider>content</StyledDivider>);
104-
getComputedStyle(container.firstChild, '::before')
105-
.getPropertyValue('border-top-style')
106-
.should.equal('dashed');
107-
getComputedStyle(container.firstChild, '::before')
108-
.getPropertyValue('border-left-style')
109-
.should.equal('dashed');
110-
getComputedStyle(container.firstChild, '::after')
111-
.getPropertyValue('border-top-style')
112-
.should.equal('dashed');
113-
getComputedStyle(container.firstChild, '::after')
114-
.getPropertyValue('border-left-style')
115-
.should.equal('dashed');
102+
it('should set the border-left-style dashed in before and after pseudoclass if orientation="vertical', () => {
103+
const { container } = render(<StyledDivider orientation="vertical">content</StyledDivider>);
104+
expect(
105+
getComputedStyle(container.firstChild, '::before').getPropertyValue('border-left-style'),
106+
).to.equal('dashed');
107+
expect(
108+
getComputedStyle(container.firstChild, '::after').getPropertyValue('border-left-style'),
109+
).to.equal('dashed');
110+
});
111+
it('should set the border-top-style dashed in before and after pseudoclass if orientation="horizontal', () => {
112+
const { container } = render(
113+
<StyledDivider orientation="horizontal">content</StyledDivider>,
114+
);
115+
expect(
116+
getComputedStyle(container.firstChild, '::before').getPropertyValue('border-top-style'),
117+
).to.equal('dashed');
118+
expect(
119+
getComputedStyle(container.firstChild, '::after').getPropertyValue('border-top-style'),
120+
).to.equal('dashed');
116121
});
117122
});
118123
});

0 commit comments

Comments
 (0)