From 99b9a26e49a4aa6967775702b7d043203d984b09 Mon Sep 17 00:00:00 2001 From: Jeri Peier Date: Thu, 7 Nov 2024 16:56:08 +0100 Subject: [PATCH] fix(sbb-calendar): fix disabled month selection on wide view (#3195) --------- Co-authored-by: Mario Castigliano --- .../calendar.snapshot.spec.snap.js | 3 +- src/elements/calendar/calendar.spec.ts | 634 ++++++++++-------- src/elements/calendar/calendar.ts | 74 +- 3 files changed, 387 insertions(+), 324 deletions(-) diff --git a/src/elements/calendar/__snapshots__/calendar.snapshot.spec.snap.js b/src/elements/calendar/__snapshots__/calendar.snapshot.spec.snap.js index 9e48ae378f..2c2e2d4f54 100644 --- a/src/elements/calendar/__snapshots__/calendar.snapshot.spec.snap.js +++ b/src/elements/calendar/__snapshots__/calendar.snapshot.spec.snap.js @@ -28,8 +28,7 @@ snapshots["sbb-calendar renders Shadow DOM"] =
`); - const yearCells: HTMLElement[] = Array.from( - element.shadowRoot!.querySelectorAll('.sbb-calendar__table-year'), - ); - expect(yearCells.length).to.be.equal(24); - expect(yearCells[0]).dom.to.be.equal(` + const yearCells: HTMLElement[] = Array.from( + element.shadowRoot!.querySelectorAll('.sbb-calendar__table-year'), + ); + expect(yearCells.length).to.be.equal(24); + expect(yearCells[0]).dom.to.be.equal(` `); - const monthCells: HTMLElement[] = Array.from( - element.shadowRoot!.querySelectorAll('.sbb-calendar__table-month'), - ); - expect(monthCells.length).to.be.equal(12); - expect(monthCells[0]).dom.to.be.equal(` + const monthCells: HTMLElement[] = Array.from( + element.shadowRoot!.querySelectorAll('.sbb-calendar__table-month'), + ); + expect(monthCells.length).to.be.equal(12); + expect(monthCells[0]).dom.to.be.equal(`