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.
The model's verdict: “”
The interactive diagram is below the answer - jump to diagram ↓
This answer is explained by a shared concept diagram - open →