Skip to content

Commit

Permalink
test fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
anuujj committed Jul 13, 2024
1 parent 20ffdab commit 2fd81b7
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions packages/mui-material/src/Divider/Divider.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,20 +99,25 @@ describe('<Divider />', () => {
}
});

it('should set the border-style dashed in before and after pseudoclass', () => {
const { container } = render(<StyledDivider>content</StyledDivider>);
getComputedStyle(container.firstChild, '::before')
.getPropertyValue('border-top-style')
.should.equal('dashed');
getComputedStyle(container.firstChild, '::before')
.getPropertyValue('border-left-style')
.should.equal('dashed');
getComputedStyle(container.firstChild, '::after')
.getPropertyValue('border-top-style')
.should.equal('dashed');
getComputedStyle(container.firstChild, '::after')
.getPropertyValue('border-left-style')
.should.equal('dashed');
it('should set the border-left-style dashed in before and after pseudoclass if orientation="vertical', () => {
const { container } = render(<StyledDivider orientation="vertical">content</StyledDivider>);
expect(
getComputedStyle(container.firstChild, '::before').getPropertyValue('border-left-style'),
).to.equal('dashed');
expect(
getComputedStyle(container.firstChild, '::after').getPropertyValue('border-left-style'),
).to.equal('dashed');
});
it('should set the border-top-style dashed in before and after pseudoclass if orientation="horizontal', () => {
const { container } = render(
<StyledDivider orientation="horizontal">content</StyledDivider>,
);
expect(
getComputedStyle(container.firstChild, '::before').getPropertyValue('border-top-style'),
).to.equal('dashed');
expect(
getComputedStyle(container.firstChild, '::after').getPropertyValue('border-top-style'),
).to.equal('dashed');
});
});
});
Expand Down

0 comments on commit 2fd81b7

Please sign in to comment.