From 51488dc91c80d31bbf76b42df9263bfdf40f8868 Mon Sep 17 00:00:00 2001 From: Jeremias Peier Date: Tue, 2 Jul 2024 09:42:21 +0200 Subject: [PATCH] test(sbb-datepicker-toggle): open datepicker with withPostSetupAction --- .../datepicker-toggle/datepicker-toggle.visual.spec.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/elements/datepicker/datepicker-toggle/datepicker-toggle.visual.spec.ts b/src/elements/datepicker/datepicker-toggle/datepicker-toggle.visual.spec.ts index 37b7fa85da..9403cadd3a 100644 --- a/src/elements/datepicker/datepicker-toggle/datepicker-toggle.visual.spec.ts +++ b/src/elements/datepicker/datepicker-toggle/datepicker-toggle.visual.spec.ts @@ -33,9 +33,12 @@ describe(`sbb-datepicker-toggle`, () => { minHeight: '600px', }); - const toggle = - setup.snapshotElement.querySelector('#toggle')!; - toggle.open(); + setup.withPostSetupAction(async () => { + const toggle = + setup.snapshotElement.querySelector('#toggle')!; + + toggle.open(); + }); }), );