Skip to content

jogger187/cypress-bootcamp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License: MIT

Installation

yarn install

Run Cypress With Utility

yarn open

Run Cypress With CLI

yarn cy:run --spec "cypress/e2e/spec.cy.ts"

When the test process is over, you will get test record.

spec.cy.ts.gif

Test File Example

Set the test logic on e2e/spec.cy.ts

describe('template spec', () => {
  it('passes', () => {
    cy.visit('https://www.instagram.com/accounts/login/?source=desktop_nav&next=https%3A%2F%2Fwww.instagram.com%2Flogin%2F%3F__coig_login%3D1')
    cy.get(':nth-child(1) > .x1i10hfl > ._acan > ._aacl').click()
    cy.get(':nth-child(1) > .x1npaq5j > ._aa48 > ._aa4b').type('[email protected]').should('have.value', '[email protected]')
    cy.get(':nth-child(2) > .x1npaq5j > ._aa48 > ._aa4b').type('testman123').should('have.value', 'testman123')
    cy.get('._abc2 > :nth-child(3)').click()
  })
})

Author

Jagger Hsu

About

A starter for the E2E test with Cypress. Provide examples displayed for different situations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published