{"id":22667095,"url":"https://github.com/pdir/contao-cypress-testing","last_synced_at":"2025-09-02T06:33:28.944Z","repository":{"id":41802117,"uuid":"510379016","full_name":"pdir/contao-cypress-testing","owner":"pdir","description":"A community-driven Cypress testing suite for Contao 5","archived":false,"fork":false,"pushed_at":"2023-02-27T05:21:43.000Z","size":103,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-04T04:28:03.524Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/pdir.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":"2022-07-04T13:52:52.000Z","updated_at":"2022-09-19T09:05:46.000Z","dependencies_parsed_at":"2024-12-09T14:39:57.556Z","dependency_job_id":"af280ae2-28cb-4355-b700-cbf1c32e5013","html_url":"https://github.com/pdir/contao-cypress-testing","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/pdir%2Fcontao-cypress-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdir%2Fcontao-cypress-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdir%2Fcontao-cypress-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdir%2Fcontao-cypress-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pdir","download_url":"https://codeload.github.com/pdir/contao-cypress-testing/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246168108,"owners_count":20734390,"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":[],"created_at":"2024-12-09T14:33:41.376Z","updated_at":"2025-03-29T10:15:23.706Z","avatar_url":"https://github.com/pdir.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# contao-cypress-testing\n\nA community-driven [Cypress](https://www.cypress.io/) testing suite for Contao 5.  \nYou can use an existing local Contao installation or a remote one.\n\nVery early version!\n\n* [Installing](#installing)\n* [Opening the test app](#opening-the-test-app)\n* [Commands](#commands)\n* [Folder structure](#folder-structure)\n\n## Installing\n\n    # clone the project in your existing bundle or contao mono repo\n    git clone https://github.com/pdir/contao-cypress-testing.git \n    cd contao-cypress-testing\n    cp cypress.config.js.example cypress.config.js\n    cp cypress.env.json.example cypress.env.json\n    # set parameters for your Contao 5 test domain in cypress.config.js\n    # set parameters for admin user in cypress.env.json\n    # use npm to install cypress\n    npm install cypress --save-dev\n\n    # or use yarn to install cypress\n    yarn add cypress --dev\n\n    Run \"NODE_ENV=develop; cypress run\" to run tests locally\n\nFor more information about cypress, visit https://docs.cypress.io/guides/overview/why-cypress\n\n## Create language files for your bundle or Contao core bundles\n    \n    # Generate files for php files / example de -\u003edefault.php\n    php -f tools/lang-to-json.php src\\Resources\\contao\\languages\\de\\default.php cypress\\fixtures\\i18n\\example-bundle\\de\\default.json\n\n    # Generate files for xml files / example core-bundle -\u003e de -\u003e default.php\n    php -f tools/xlf-to-json.php core-bundle\\contao\\languages\\de\\default.xlf cypress\\fixtures\\i18n\\core-bundle\\de\\default.json\n    php -f tools/xlf-to-json.php core-bundle\\contao\\languages\\en\\default.xlf cypress\\fixtures\\i18n\\core-bundle\\en\\default.json\n\n## Opening the test app\n\n    cypress open\n    # or\n    yarn run cypress open\n\n## Run a specific group or single file\n\n    cypress run -s cypress/e2e/all.core.cy.js\n    cypress run -spec cypress/e2e/core-bundle/all.cy.js,cypress/e2e/news-bundle/all.cy.js\n\n## Run tests with screenshots and video to share with project members [Projects Setup](https://docs.cypress.io/guides/dashboard/projects.html#Setup)\n\n    cypress run --record -s \"cypress/e2e/core-bundle/backend/pages/pages.design.cy.js\"      # a single test\n    cypress run --record -s \"cypress/e2e/core-bundle/all.cy.js\"                             # all core bundle tests\n\n## Commands\n\nThe package contains a bunch of pre-built commands for easier navigation in the backend as well as frontend using Cypress.\n\n### General commands\n\n#### Login to backend\n```js\nBackend.login(username, password)\n```\n\n### Clear backend user session\n```js\nBackend.clearBackendUserSessionData()\n```\n\n#### Targeting elements inside iframes \n```js\n// find elements\ncy.get(\"iframe\").iframe().find('ul li')\n\ncy.get('iframe').iframe(() =\u003e {\n    // Targets the input within the iframe element\n    cy.get('input').type('mail@example.com')\n})\n```\n\n## Folder structure \n\n    /cypress\n      /downloads\n      /e2e              # all tests separate by bundles\n        /\u003cbundle\u003e       # e.g core-bundle\n          /\u003cmodule\u003e     # module name\n            /backend\n              \u003cmodule\u003e.design.cy    # design tests (e.g. element is visible; headers, title, select fields, label etc.\n                                    # are present)\n              \u003cmodule\u003e.func.cy      # functional tests (e.g. testing the function of select fields, DCA fields, \n                                    # buttons [create, delete, edit, toggle all, drag and drop, edit multiple etc.])\n            /frontend \n            /all.cy.js              # run all tests of the bundle\n        ..\n        /vendor/\u003cbundle\u003e       # e.g. contao-demo\n                               # use the same folder structure as for the core bundles  \n      \n      /all.core.cy.js         # run all core tests\n      /all.cy.js              # run all tests, also from the vendor folder\n      /all.vendor.cy.js       # run all vendor tests\n      /fixtures\n        /i18n       # folder for json language files *DO NOT COMMIT (Generate via tools for every feature/version)\n      /screenshots\n      /support\n      /videos\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdir%2Fcontao-cypress-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpdir%2Fcontao-cypress-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdir%2Fcontao-cypress-testing/lists"}