{"id":22825607,"url":"https://github.com/wlsf82/gitlab-cypress","last_synced_at":"2025-04-05T16:05:45.006Z","repository":{"id":37997776,"uuid":"244764272","full_name":"wlsf82/gitlab-cypress","owner":"wlsf82","description":"Sample project to experiment with Cypress to test the GitLab application.","archived":false,"fork":false,"pushed_at":"2025-03-26T23:22:18.000Z","size":89576,"stargazers_count":99,"open_issues_count":10,"forks_count":31,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-29T15:11:15.243Z","etag":null,"topics":["api-testing","continuous-integration","cypress","cypress-cloud","cypress-dashboard","cypress-io","docker","e2e-testing","github-actions","github-actions-ci","gitlab","gui-testing","testing","web-testing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wlsf82.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}},"created_at":"2020-03-03T23:34:55.000Z","updated_at":"2025-03-26T23:22:21.000Z","dependencies_parsed_at":"2023-01-21T18:46:31.944Z","dependency_job_id":"ce5459a9-91a5-4081-b909-76c5ee0c50b9","html_url":"https://github.com/wlsf82/gitlab-cypress","commit_stats":{"total_commits":330,"total_committers":4,"mean_commits":82.5,"dds":0.5303030303030303,"last_synced_commit":"68de14181be449e59f02322d84c35696c13b8191"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wlsf82%2Fgitlab-cypress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wlsf82%2Fgitlab-cypress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wlsf82%2Fgitlab-cypress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wlsf82%2Fgitlab-cypress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wlsf82","download_url":"https://codeload.github.com/wlsf82/gitlab-cypress/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247361617,"owners_count":20926642,"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":["api-testing","continuous-integration","cypress","cypress-cloud","cypress-dashboard","cypress-io","docker","e2e-testing","github-actions","github-actions-ci","gitlab","gui-testing","testing","web-testing"],"created_at":"2024-12-12T17:11:33.219Z","updated_at":"2025-04-05T16:05:44.967Z","avatar_url":"https://github.com/wlsf82.png","language":"JavaScript","readme":"# GitLab Cypress\n\n[![main](https://github.com/wlsf82/gitlab-cypress/actions/workflows/ci.yml/badge.svg)](https://github.com/wlsf82/gitlab-cypress/actions)\n[![gitlab-cypess](https://img.shields.io/endpoint?url=https://cloud.cypress.io/badge/simple/vxwq6z/main\u0026style=flat\u0026logo=cypress)](https://cloud.cypress.io/projects/vxwq6z/runs)\n\nSample project to experiment with [Cypress](https://cypress.io) to test the GitLab application.\n\n## Pre-requirements\n\nYou need to have a GitLab local environment such as [GDK](https://gitlab.com/gitlab-org/gitlab-development-kit) or Docker up and running.\n\nYou also need to have [Node.js](https://nodejs.org/) and npm installed on your computer.\n\nFor this project, the following versions of Node.js and npm were used:\n\n```sh\n$ node -v\nv20.16.0\n\n$ npm -v\n10.9.0\n```\n\n### Running GitLab on Docker\n\nRun `docker run --publish 80:80 --name gitlab --hostname localhost wlsf82/gitlab-ce` and wait for the environment to be up and running (this might take a minute or so).\n\nAll should be ok if, when accessing the http://localhost/ URL, a form to define the password of the `root` user is displayed.\n\n\u003e ❗**THERE'S NO NEED TO DEFINE THE PASSWORD MANUALLY**❗\n\u003e\n\u003e There's an automated test for it. 😉\n\u003e\n\u003e Keep reading.\n\n## Installation\n\nRun `npm i` to install the dev dependencies.\n\n## Tests\n\n\u003e Before running the tests, create a file called `cypress.env.json` in the project root directory, based on the [`cypress.env.example.json`](./cypress.env.example.json) file, and update the value of the `user_password` property with one of your choice.\n\u003e\n\u003e By default, the tests will run against `http://localhost/`, but if you need to run them in a different URL (e.g.: `http://localhost:3000/`), change the `baseUrl` property in the [`cypress.config.js`](./cypress.config.js) file.\n\n### Headless mode\n\nRun `npm test` to run all tests in headless mode.\n\nRun `npm run test:api` to run only the API tests in headless mode.\n\nRun `npm run test:gui:project:issue` to run only the GUI Project-issue-related tests in headless mode.\n\nRun `npm run test:gui:project:but:issue` to run only the GUI Project-but-issue-related tests in headless mode.\n\nRun `npm run test:gui:all:but:project` to run only the GUI Project-not-related tests in headless mode.\n\n### Interactive mode\n\n1. Run `npm run cy:open` to open the Cypress App;\n2. Select E2E Testing;\n3. Select one of the available browsers (e.g., Electron), and click the Start button;\n4. **Run the [`cypress/e2e/gui/profile/createAccessToken.cy.js`](./cypress/e2e/gui/profile/createAccessToken.cy.js) test;**\n5. Finally, click on the test file you want to run and wait for it to finish.\n\n\u003e **Important notes about the above steps**\n\u003e\n\u003e **Do not skip step 4!** It will authenticate the `root` user, create a GitLab Access Token, and make it available to all other tests while the Cypress App is kept open unless the [`cypress/e2e/gui/profile/deleteAccessTokens.cy.js`](./cypress/e2e/gui/profile/deleteAccessTokens.cy.js) test is run. In such a case, the [`cypress/e2e/gui/profile/createAccessToken.cy.js`](./cypress/e2e/gui/profile/createAccessToken.cy.js) test needs to be re-run.\n\u003e\n\u003e Also, step 4 creates a session for the `root` user, which will be restored by most tests. This means that login via GUI should only happens once, speeding up the execution. 🏎️\n\n#### Example\n\nHere's an example of running all the GUI tests in interactive mode.\n\nhttps://user-images.githubusercontent.com/2768415/225186210-4dd51c26-9baf-4e65-9b09-6f79a818a7d5.mp4\n\n## Contributing\n\nIf you want to contribute to this project, follow the below steps.\n\n1. Fork the project;\n2. Clone your fork and make your changes;\n3. Test your changes locally, and move on only when all tests are green;\n4. Push your changes to GitHub and create a pull request (PR);\n5. After the GitHub Workflow of your PR is green, tag @wlsf82, ask for review and wait for feedback;\n6. If everything goes well, you should have your changes rebased and merged to the main branch. Otherwise, you will receive comments with adjustments needed before merging.\n\n\u003e [This](https://cbea.ms/git-commit/) is the commit messaging guidelines you should follow.\n\n___\n\nDeveloped with 💚 by [Walmyr](https://walmyr.dev).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwlsf82%2Fgitlab-cypress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwlsf82%2Fgitlab-cypress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwlsf82%2Fgitlab-cypress/lists"}