Skip to content

Commit 12f6a2d

Browse files
committed
test: fix test
1 parent 3706e3a commit 12f6a2d

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

packages/main/cypress/specs/DateTimePicker.cy.tsx

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ describe("DateTimePicker general interaction", () => {
119119
cy.get("[ui5-calendar]")
120120
.shadow()
121121
.as("calendar");
122+
123+
cy.realPress("Tab");
124+
cy.realPress("Tab");
122125

123126
cy.get("@calendar")
124127
.find("[ui5-daypicker]")
@@ -174,7 +177,7 @@ describe("DateTimePicker general interaction", () => {
174177

175178
cy.realPress("Tab");
176179

177-
// Simulate keyboard interactions
180+
//Simulate keyboard interactions
178181
cy.get("@dtp")
179182
.shadow()
180183
.find("[ui5-datetime-input]")
@@ -300,7 +303,7 @@ describe("DateTimePicker general interaction", () => {
300303
.ui5DateTimePickerClose();
301304
});
302305

303-
// Unstable test, needs investigation
306+
//Unstable test, needs investigation
304307
it("tests selection of 12:34:56 AM", () => {
305308
setAnimationMode(AnimationMode.None);
306309

@@ -389,11 +392,11 @@ describe("DateTimePicker general interaction", () => {
389392
.find("ui5-daypicker")
390393
.as("daypicker");
391394

392-
// act: open the picker
395+
//act: open the picker
393396
cy.get<DateTimePicker>("@dtp")
394397
.ui5DateTimePickerOpen();
395398

396-
// act: click today's date
399+
//act: click today's date
397400
cy.get("@daypicker")
398401
.shadow()
399402
.find("[data-sap-focus-ref]")
@@ -412,7 +415,7 @@ describe("DateTimePicker general interaction", () => {
412415
cy.get<DateTimePicker>("@dtp")
413416
.ui5DateTimePickerExpectToBeClosed();
414417

415-
// assert: the value is not changed
418+
//assert: the value is not changed
416419
cy.get("@input")
417420
.should("be.focused")
418421
.and("have.attr", "value", "");
@@ -488,7 +491,7 @@ describe("DateTimePicker general interaction", () => {
488491
.should("have.text", "Invalid entry");
489492
});
490493

491-
// Unstable test, needs investigation
494+
//Unstable test, needs investigation
492495
it("tests change event is fired on submit", () => {
493496
cy.mount(<DateTimePickerTemplate onChange={cy.stub().as("changeStub")} />);
494497

@@ -525,10 +528,10 @@ describe("DateTimePicker general interaction", () => {
525528
cy.get<DateTimePicker>("@dtp")
526529
.ui5DateTimePickerExpectToBeClosed();
527530

528-
// Assert the change event was fired once
531+
//Assert the change event was fired once
529532
cy.get("@changeStub").should("have.been.calledOnce");
530533

531-
// Re-open the picker and submit without making a change
534+
//Re-open the picker and submit without making a change
532535
cy.get<DateTimePicker>("@dtp")
533536
.ui5DateTimePickerOpen();
534537

@@ -540,11 +543,11 @@ describe("DateTimePicker general interaction", () => {
540543
.ui5DateTimePickerGetSubmitButton()
541544
.realClick();
542545

543-
// Verify the picker is closed
546+
//Verify the picker is closed
544547
cy.get<DateTimePicker>("@dtp")
545548
.ui5DateTimePickerExpectToBeClosed();
546549

547-
// The change event should not have been fired a second time.
550+
//The change event should not have been fired a second time.
548551
cy.get("@changeStub").should("have.been.calledOnce");
549552
});
550553
});

0 commit comments

Comments
 (0)