From f7ae7ea005ae48edd9a1a56c609775b79952c144 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 25512b68cc..dc89ad9afa 100644 --- a/src/elements/calendar/__snapshots__/calendar.snapshot.spec.snap.js +++ b/src/elements/calendar/__snapshots__/calendar.snapshot.spec.snap.js @@ -27,8 +27,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(`