https://github.com/mohammedhrima/cypress
learning Cypress testing framework
https://github.com/mohammedhrima/cypress
Last synced: 3 months ago
JSON representation
learning Cypress testing framework
- Host: GitHub
- URL: https://github.com/mohammedhrima/cypress
- Owner: mohammedhrima
- Created: 2024-12-23T03:26:53.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-12-23T03:28:21.000Z (5 months ago)
- Last Synced: 2025-01-17T15:51:51.999Z (4 months ago)
- Language: JavaScript
- Size: 54.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
Awesome Lists containing this project
README
+ generative function
+ regular expression+ cypress:
+ npx cypress open
+ visit url:
- cy.visit("http://localhost:3000/fundamentals")
+ get dom element: (by className)
- cy.get('[data="container"]')
+ check if that dom has value:
- cy.get('[data="container"]').shoulds("contains.text", "a value");
- cy.get('[data="container"]').contains("a value");
+ set base url:
- go to cypress.config.js
- in e2e: add baseUrl: "http://localhost:3000",
+ to use json files:
- put them in fixtures folder