enough-truck-68085
11/10/2022, 3:51 PMcy.wrap
https://docs.cypress.io/api/commands/wrap#Yields
typeField(nameField, test) {
this.editInformationBtn()
.click();
// Try cy.wrap
nameField.then((field) => {
cy.wrap(field).clear().type(test)
})
this.saveBtn()
.click()
};
Then I imagine in your test you could call this method by doing
agentProfile.typeField(agentProfile.firstNameEdit(), "textHere")