Coggle requires JavaScript to display documents.
Cy.commands.add('name', (...args) => {})
Cy.pause()
/integration/pages/homepage.js
cypress.config.js
Cypress.config('defaultCommandTimmeout', 8000)
env: { url: 'http://my.uat.domain.com' }
npx cypress run --spec "cypress/integration/examples/test13.spec.js" --env url="https://my.production.domain.com"
retries: { runMode: 1 }
e2e: { video: true }
cypress/reports/html
cypress run --record --key
cy.visit('url_to_visit')
npx cypress run --headed
npx cypress run --browser chrome
npx cypress run
npx cypress run --spec "cypress/integration/examples/test1.spec.js"
npx cypress run --spec "path_to_spec" --browser chrome --headed
npx cypress open
npm -i init
npm install cypress
npx cypress oepn
cy.get('.search-keyword').type('ca')
cy.wait(2000)
cy.get('.product').should('have.length', 4)
cy.get('.product:visible')....
cy.get('.products').find('.product')
cy.get('.products').find('.product').eq(2)
cy.get('.products').find('.product').eq(2).contains('ADD TO CART')
cy.get('.products').find('.product').eq(2).contains('ADD TO CART').click()
cy.get('.products').as('products') cy.get('@products').eq(1).contains('ADD TO CART').click();
cy.get(...).then(() => console.log())
.check()
.should('be.checked')
.uncheck()
.should('not.be.checked')
.get('input[type="checkobox"]')
.check(['option2', 'option3'])
.should('be.disabled')
.select('option2')
should('have.value', 'option2')
.should('have.attr', 'minlength', '2')
display: none;
.should('be.visilbe')
.should('not.be.visible')
cy.invoke('removeAttr', 'target')
cy.origin('https://abc.com.tw', () => { /** all test inside here**/})
cy.get('#opentab').then((el) => { const url = el.prop('href'); cy.visit(url); cy.origin(url, () => {/** test code */}
.trigger('mouseover')
.invoke('show')
.click({ force: true })
require('cypress-iframe');
cy.iframe().find('h1).should('have.length', 1)
before()
beforeEach()