From 2fd81b77b76f6a6d11957a06ed09d39afe45de7a Mon Sep 17 00:00:00 2001 From: anuujj Date: Sat, 13 Jul 2024 11:20:07 +0530 Subject: [PATCH] test fixed --- .../mui-material/src/Divider/Divider.test.js | 33 +++++++++++-------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/packages/mui-material/src/Divider/Divider.test.js b/packages/mui-material/src/Divider/Divider.test.js index 569f01fa9d9545..ea23889a6b5968 100644 --- a/packages/mui-material/src/Divider/Divider.test.js +++ b/packages/mui-material/src/Divider/Divider.test.js @@ -99,20 +99,25 @@ describe('', () => { } }); - it('should set the border-style dashed in before and after pseudoclass', () => { - const { container } = render(content); - 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(content); + 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( + content, + ); + expect( + getComputedStyle(container.firstChild, '::before').getPropertyValue('border-top-style'), + ).to.equal('dashed'); + expect( + getComputedStyle(container.firstChild, '::after').getPropertyValue('border-top-style'), + ).to.equal('dashed'); }); }); });