title: Is there a way to share fixtures while using cy.fixture in class between methods
body: <p>I am doing my first steps in Cypress and issue which I meet is that I replicate the code so I wish to make it better. I've tried to use cy.fixture in a constructor but it failed, so I am looking for a way to use cy.fixture only once in class and assign result to this which can be used in other methods.</p>
  <pre><code>class LoginPage{
  
  navigate(){
      cy.fixture('urls.json').then((url) =&gt; {
          cy.visit(url.baseUrl);
      })
  }
  
  checkIfRedirected(){
      cy.reload()
      cy.fixture('urls.json').then((url) =&gt; {
          cy.url().should('equal', url.claimUrl)
      })
  }
  </code></pre>
  <p>}</p>