I cannot interact with the date picker (popup) in my Cypress tests.
I tried .find() and .get() on every div class but each time it says
Timed out retrying after 4000ms: Expected to find element: .cdk-overlay-container, but never found it
This is my test code:
cy.get('#signup-step-pers-details').within(() => {
cy.get('[name="firstName"]').type(user.firstName)
.get('[name="surname"]').type(user.lastName)
.get('#select-gender').click()
.get('.ng-dropdown-panel-items').contains(user.gender, {matchCase: false}).click()
.get('#input-dateOfBirth').click()
.find('.owl-dt-popup').click()
.get('.owl-calendar-year').contains(2002).click()
I tried adding some wait time but that didn't help either.

@KKhan is correct, the Angular Date Time Picker opens in a
cdk-overlay-containerat the foot of the document.More detail on the layout:
Using
cy.get('#signup-step-pers-details').within(() => {restricts commands inside to that section of the DOM, but theowl-date-time-containeris outside of that.You can use this approach Cypress how to temporarily escape from a cy.within()
Note I've used
.owl-dt-control-period-buttonwhich is correct for the current version of Angular Date Time Picker, but perhaps you have an older version that requires.owl-calendar-year.