https://cypress.io logo
hi there, new to testing, i have a question...how ...
# e2e-testing
a
hi there, new to testing, i have a question...how would i run an e2e cypress test to see if this user object loads?
Copy code
js
const { user } = useSession({ shouldRedirect: false });
this is what i have so far WIP
Copy code
js
Cypress.Commands.add('testVisitAccount', (user) => {
    cy.visit(`${Cypress.env('base_url')}user/dashboard/account`);
    cy.get('.user-account').should('exist');
    ......
    cy.get('button[name=loginSubmit]')
        .should('exist')
        .click()
        .should('not.contain.text', 'Next');
});
useSession is making an api call