In first method below I set env. variable, but when it's necessary to get this variable in another method, executed under the same test run, it's returned as undefined. What can be the cause of such behavior?
setEnvVar = () => {
cy.get('tbody > tr').first().find('span').first().then(($span) => {
Cypress.env('est-id', $span.text())
})
}
fillParameters = () => {
cy.get('div[id=estimates_select]').find('input').type(Cypress.env('est-id'))
}