{"id":25044890,"url":"https://github.com/thiagojacinto/cypress-with-patterns","last_synced_at":"2025-10-04T11:09:35.082Z","repository":{"id":133693986,"uuid":"300026473","full_name":"thiagojacinto/cypress-with-patterns","owner":"thiagojacinto","description":"Using Cypress \u0026 implementing patterns Page Objects and Screenplay","archived":false,"fork":false,"pushed_at":"2023-09-16T12:30:38.000Z","size":767,"stargazers_count":5,"open_issues_count":6,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-21T02:06:10.671Z","etag":null,"topics":["cypress-example","cypress-io","nodejs","pageobject-pattern","screenplay-pattern"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thiagojacinto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2020-09-30T18:56:26.000Z","updated_at":"2025-02-03T13:17:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"db35fda7-ae81-4457-a00e-e163006fe8a0","html_url":"https://github.com/thiagojacinto/cypress-with-patterns","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/thiagojacinto/cypress-with-patterns","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiagojacinto%2Fcypress-with-patterns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiagojacinto%2Fcypress-with-patterns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiagojacinto%2Fcypress-with-patterns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiagojacinto%2Fcypress-with-patterns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thiagojacinto","download_url":"https://codeload.github.com/thiagojacinto/cypress-with-patterns/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiagojacinto%2Fcypress-with-patterns/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278302555,"owners_count":25964523,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-example","cypress-io","nodejs","pageobject-pattern","screenplay-pattern"],"created_at":"2025-02-06T05:19:43.678Z","updated_at":"2025-10-04T11:09:35.077Z","avatar_url":"https://github.com/thiagojacinto.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cypress.io with Patterns\n\nUsing Cypress to handle automation tests implementing Page Objects and Screenplay patterns.\n\n## BDD Features with Gherkin\n\nThe goal was to develop automation tests to the simple list app available at http://repo-listing.web.app\n\nTo achieve that, Gherkin features lead the way of thinking the core features of that system. Given/When/Then strategy was used here:\n\n- [_adicionar.feature_](./features/adicionar.feature)\n- [_remover.feature_](./features/remover.feature)\n\n## Page objects pattern\n\nDevelopment with this pattern was done under the branch [feature/page-objects](https://github.com/thiagojacinto/cypress-with-patterns/tree/feature/page-objects).\n\n\u003e Object _Home_:\n\n- [support/](./cypress/support)\n  - [pageObjects/](./cypress/support/pageObjects)\n    - [Home/](./cypress/support/pageObjects/Home)\n      - [elements.components.js](./cypress/support/pageObjects/Home/elements.components.js)\n      - [index.js](./cypress/support/pageObjects/Home/index.js)\n\n\u003e Tests:\n\n- [integration/](./cypress/integration)\n  - [page-objects/](./cypress/integration/page-objects)\n    - [adicionar.spec.js](./cypress/integration/page-objects/adicionar.spec.js)\n    - [remover.spec.js](./cypress/integration/page-objects/remover.spec.js)\n\n## Screenplay pattern\n\nImplementation of this pattern was developed after the page object approuch. Another strategy was using fixture to handle import data from external file (ex: json) and randomize inputs.\n\n\u003e Fixture:\n\n* [fixtures/](./cypress/fixtures)\n  * [repositorios.json](./cypress/fixtures/repositorios.json)\n\n\u003e _Screenplay pattern_ base files:\n\nFive original blocks were simplified to 3: [Actor](./cypress/support/screenplay/agente/Agente.js), [Task](./cypress/support/screenplay/tarefa/Tarefa.js) and [Questions](./cypress/support/screenplay/dado-quando-entao/DadoQuandoEntao.js), here translated to _Agente, Tarefa_ e _DadoQuandoEntao_, respectively.\n\n* [support/](./cypress/support)\n  * [screenplay/](./cypress/support/screenplay)\n    * [agente/](./cypress/support/screenplay/agente)\n      * [Agente.js](./cypress/support/screenplay/agente/Agente.js)\n      * [Usuario.js](./cypress/support/screenplay/agente/Usuario.js)\n      * [index.js](./cypress/support/screenplay/agente/index.js)\n    * [dado-quando-entao/](./cypress/support/screenplay/dado-quando-entao)\n      * [DadoQuandoEntao.js](./cypress/support/screenplay/dado-quando-entao/DadoQuandoEntao.js)\n      * [index.js](./cypress/support/screenplay/dado-quando-entao/index.js)\n    * [tarefa/](./cypress/support/screenplay/tarefa)\n      * [Tarefa.js](./cypress/support/screenplay/tarefa/Tarefa.js)\n      * [index.js](./cypress/support/screenplay/tarefa/index.js)\n    * [utils/](./cypress/support/screenplay/utils)\n      * [index.js](./cypress/support/screenplay/utils/index.js)\n      * [naoImplementado.error.js](./cypress/support/screenplay/utils/naoImplementado.error.js)\n    * [ScreenplayItem.js](./cypress/support/screenplay/ScreenplayItem.js)\n    * [index.js](./cypress/support/screenplay/index.js)\n\n\u003e Tests:\n\n* [integration/](./cypress/integration)\n  * [screenplay/](./cypress/integration/screenplay)\n    * [Tarefas/](./cypress/integration/screenplay/Tarefas)\n      * [AcessarHome.tarefa.js](./cypress/integration/screenplay/Tarefas/AcessarHome.tarefa.js)\n      * [AdicionarValorVazio.tarefa.js](./cypress/integration/screenplay/Tarefas/AdicionarValorVazio.tarefa.js)\n      * [EsperarListaContendoDoisItens.tarefa.js](./cypress/integration/screenplay/Tarefas/EsperarListaContendoDoisItens.tarefa.js)\n      * [EsperarListaContendoUmItem.tarefa.js](./cypress/integration/screenplay/Tarefas/EsperarListaContendoUmItem.tarefa.js)\n      * [ExibirLista.tarefa.js](./cypress/integration/screenplay/Tarefas/ExibirLista.tarefa.js)\n      * [ExibirListaContendoTres.tarefa.js](./cypress/integration/screenplay/Tarefas/ExibirListaContendoTres.tarefa.js)\n      * [InserirNovoRepositorio.tarefa.js](./cypress/integration/screenplay/Tarefas/InserirNovoRepositorio.tarefa.js)\n      * [LimparLista.tarefa.js](./cypress/integration/screenplay/Tarefas/LimparLista.tarefa.js)\n      * [RemoverItem.tarefa.js](./cypress/integration/screenplay/Tarefas/RemoverItem.tarefa.js)\n      * [VisualizarListaComItens.tarefa.js](./cypress/integration/screenplay/Tarefas/VisualizarListaComItems.tarefa.js)\n      * [VisualizarListaVazia.tarefa.js](./cypress/integration/screenplay/Tarefas/VisualizarListaVazia.tarefa.js)\n      * [index.js](./cypress/integration/screenplay/Tarefas/index.js)\n    * [adicionar/](./cypress/integration/screenplay/adicionar)\n      * [adicionar.screenplay.spec.js](./cypress/integration/screenplay/adicionar/adicionar.screenplay.spec.js)\n    * [componentes/](./cypress/integration/screenplay/componentes)\n      * [home.componentes.js](./cypress/integration/screenplay/componentes/home.componentes.js)\n    * [remover/](./cypress/integration/screenplay/remover)\n      * [remover.screenplay.spec.js](./cypress/integration/screenplay/remover/remover.screenplay.spec.js)\n\n## Lint and precommit hook\n\nThis project uses ESLint, Prettier and lint-staged to handle linting operations and precommit hook.\n\nBefore hands-on, do not forget to run:\n\n```\nnpm install\nnpx mrm lint-staged\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthiagojacinto%2Fcypress-with-patterns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthiagojacinto%2Fcypress-with-patterns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthiagojacinto%2Fcypress-with-patterns/lists"}