{"id":25022050,"url":"https://github.com/luisvalgoi/cypress-playground","last_synced_at":"2025-03-30T11:44:30.635Z","repository":{"id":118139818,"uuid":"393532438","full_name":"LuisValgoi/cypress-playground","owner":"LuisValgoi","description":"Repository dedicated to learn more about the usage of Cypress.","archived":false,"fork":false,"pushed_at":"2021-08-11T12:53:36.000Z","size":65,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-05T13:43:04.535Z","etag":null,"topics":["cypress","cypress-io","test-automation","testing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LuisValgoi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-06T23:54:40.000Z","updated_at":"2023-03-09T02:16:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"40c72942-5a2c-4de9-beee-ac9c1e340a4e","html_url":"https://github.com/LuisValgoi/cypress-playground","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuisValgoi%2Fcypress-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuisValgoi%2Fcypress-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuisValgoi%2Fcypress-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LuisValgoi%2Fcypress-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LuisValgoi","download_url":"https://codeload.github.com/LuisValgoi/cypress-playground/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246314117,"owners_count":20757457,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cypress","cypress-io","test-automation","testing"],"created_at":"2025-02-05T13:39:56.222Z","updated_at":"2025-03-30T11:44:30.617Z","avatar_url":"https://github.com/LuisValgoi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### REFERENCE\n\n- [https://www.youtube.com/watch?v=OIAzwr-_jhY\u0026ab_channel=codedamn](https://www.youtube.com/watch?v=OIAzwr-_jhY\u0026ab_channel=codedamn)\n\n### MOTIVATION\n\n- to keep old features stables w/a breaking acting as a security layer\n\n### COMPARISON\n\n- `selenium` = acts as a new layer (compatability) from the browser and the app (headless)\n- `cypress` = acts by sitting inside the browser (node process aka `task runner`)\n\n### ADVANTAGES\n\n- you have much more control of the pages\n\n### DISAVANTAGES\n\n- suffer by experience the native problems\n\n### COMMANDS\n\n- `npm i cypress` = Installing\n\n- `npx cypress open`= Opening Cypress Local Runner\n\n- `npx cypress run --headless` = Opening Cypress Headless\n\n### NOTES\n\n- Agnostic end 2 end testing framework\n- if you are using variable declaration, you are using cypress wrong\n- test commands are executed in a deterministic manner.\n- this results in a flake-free testing.\n- subjects are passsed through the chain.\n\n### FOLDERS STRUCTURES\n\n- `fixtures` = dummy data which you may want to use (API mock)\n- `integratio` = where your spec / test files will be\n- `plugins` = extending default functionalities\n- `support`  = utils folder\n\n### HELPERs\n\nThere are several [commands to be used](https://docs.cypress.io/api/commands/and)\n\n- `cy.visit` = Visit the given url.\n- `cy.contains` = Get the DOM element containing the text (works partially as well).\n- `cy.get` = Get one or more DOM elements by node name: input, button, etc.\n- `cy.log` = Print a message to the Cypress Command Log.\n- `cy.then` = Enables you to work with the subject yielded from the previous command.\n- `...rightClick()` = Right-click a DOM element.\n- `cy.viewport` = sets the view port of the page when launched by runner.\n- `cy.intercept` = [mock/spy/stub HTTP requests.](https://docs.cypress.io/api/commands/intercept#Syntax)\n\n### ASSERT\n\nNormally, after `GIVEN` and `WHEN` , comes the `THEN`\n\nSo, in order to assert, exists these [commands here](https://docs.cypress.io/guides/references/assertions)\n\n- `.should(....)` = Asserts if target is not strictly `(===)` equal to either `null` or `undefined`\n\n![image](https://user-images.githubusercontent.com/8363610/128611644-904e63c2-816c-4cd9-89d0-8ca4e0ef9735.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluisvalgoi%2Fcypress-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluisvalgoi%2Fcypress-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluisvalgoi%2Fcypress-playground/lists"}