title: Compare two values and make decision in Cypress
body: <p>So I have two values on a page that I need to compare and as per the result perform some actions.</p>
  
  <pre><code>//First Block
  cy.get('selctor1').invoke('text').then(somevalue =&gt; {
      cy.get('selector2').should('have.text', somevalue).then(() =&gt; {
          #Do Something when equal
      })
  })
  
  //Second Block
  cy.get('selctor1').invoke('text').then(somevalue =&gt; {
      cy.get('selector2').should('not.have.text', somevalue).then(() =&gt; {
          #Do Something when not equal
      })
  })
  </code></pre>
  
  <p>So for the positive case when both values are equal everything works fine. But for the case when two values are not equal, it's only checking the first block and fails. What should I do so that it executes the second block when values are not equal and not the first block?</p>