Cypress commands are categorized into three types:
1. Parent Commands: Start a new chain of commands
cy.visit('/login')
cy.get('[data-testid="username"]')
cy.request('POST', '/api/login')
2. Child Commands: Act on the subject yielded by parent commands
cy.get('form').find('input') // find() is a child command
cy.get('button').click() // click() is a child command
3. Dual Commands: Can act as both parent and child commands
cy.contains('Submit') // Parent usage
cy.get('form').contains('Submit') // Child usage
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
The diagram below the answer is the concept . Jump to it ↓