Skip to content

Commit 34a5935

Browse files
committed
test(calendar): simplify orientation test by checking for the existence of vertical content part
1 parent 94ed79d commit 34a5935

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/components/calendar/calendar-rendering.spec.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,13 @@ describe('Calendar Rendering', () => {
141141
});
142142

143143
it('should change orientation', async () => {
144-
const dom = getCalendarDOM(calendar);
145-
146144
calendar.orientation = 'vertical';
147145
await elementUpdated(calendar);
148146

149-
expect(
150-
getComputedStyle(dom.content).getPropertyValue('flex-direction')
151-
).to.equal('column');
147+
const verticalContent = calendar.shadowRoot?.querySelector(
148+
'[part=content-vertical]'
149+
);
150+
expect(verticalContent).to.exist;
152151
});
153152

154153
it('successfully enables and disables `hideHeader`', async () => {

0 commit comments

Comments
 (0)