.end()

To end the command chain, use the .end() command.

cy.get('.misc-table').within(function(){
  // ends the current chain and returns null
  cy.contains('Cheryl').click().end()

  // queries the entire table again
  cy.contains('Charles').click()
})
Table
User: Cheryl
User: Charles
User: Darryl

cy.exec()

To execute a system command, use the cy.exec() command.

cy.exec('echo Jane Lane')
  .its('stdout').should('contain', 'Jane Lane')

cy.exec('cat cypress.json')
  .its('stderr').should('be.empty')

cy.exec('pwd')
  .its('code').should('eq', 0)

cy.focused()

To get the DOM element that has focus, use the cy.focused() command.

cy.get('.misc-form').find('#name').click()
cy.focused().should('have.id', 'name')

cy.get('.misc-form').find('#description').click()
cy.focused().should('have.id', 'description')

cy.screenshot()

To take a screenshot, use the cy.screenshot() command.

cy.screenshot('my-image')
cypress/screenshots/my-image.png

cy.wrap()

To wrap an object, use the cy.wrap() command.

cy.wrap({foo: 'bar'})
  .should('have.property', 'foo')
  .and('include', 'bar')
{foo: bar}