0

I would like to wait till angComponent.gridApi does not have the value undefined.

I'm not sure, but I think the variable angComponent doesn't update.

cy.getAngularComponent(tableGrid).then((angComponent) => {
   cy.get(angComponent.gridApi).should('not.contain', undefined);
});

1 Answer 1

0

If you think the variable angComponent does not update, you should change .then() to .should(). Cypress will retry it for you.

cy.getAngularComponent(tableGrid)
  .should((angComponent) => {
    expect(angComponent.val()).not.to.eq('')
  })

Not the answer you're looking for? Browse other questions tagged or ask your own question.