In a Cypress test, I'd like to assert that a given attribute exists on the page with a given value. The following works, but I'm wondering if there is a better way.
cy.get('[data-page-id]').invoke('attr', 'data-page-id').should('eq', 'signupPage')