{"id":20038592,"url":"https://github.com/defra/cyltfr-acceptance-tests","last_synced_at":"2025-05-05T06:32:22.559Z","repository":{"id":227876845,"uuid":"700274849","full_name":"DEFRA/cyltfr-acceptance-tests","owner":"DEFRA","description":"Repo for the CYLTFR UI tests","archived":false,"fork":false,"pushed_at":"2025-03-31T10:51:57.000Z","size":466,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-08T18:51:50.025Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DEFRA.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":"2023-10-04T09:32:36.000Z","updated_at":"2025-03-18T13:53:09.000Z","dependencies_parsed_at":"2024-07-17T12:05:42.256Z","dependency_job_id":"909dc5d8-7541-4e88-b64d-9442aa3e6f9e","html_url":"https://github.com/DEFRA/cyltfr-acceptance-tests","commit_stats":null,"previous_names":["defra/cyltfr-acceptance-tests"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fcyltfr-acceptance-tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fcyltfr-acceptance-tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fcyltfr-acceptance-tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fcyltfr-acceptance-tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DEFRA","download_url":"https://codeload.github.com/DEFRA/cyltfr-acceptance-tests/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252451892,"owners_count":21750003,"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-11-13T10:30:12.870Z","updated_at":"2025-05-05T06:32:22.149Z","avatar_url":"https://github.com/DEFRA.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cyltfr-acceptance-tests\nRepo for the CYLTFR UI tests\n\nIt uses wdio, combined with Mocha framework and Chai assertions library\n\n# Prerequisites\n\nNode.js v18.x.x +\n\n# Install\n\nFirst clone the repo using:\n\n`$ git clone`\n\nThen from the root of the project folder:\n\n`$ npm i`\n\nThis should install all dependacies etc\n\nLinting is built in with Standard - you will need to add the StandardJS extension in VScode.\n\n## Branching Strategy\n\n## Create new branch off development\n\n`$ git checkout -b feature/jira-ticket-number-123 or fix/name-of-branch`\n\n`$ git commit --allow-empty`\n\n`$ git push -u origin feature/jira-ticket-number-123 or fix/name-of-branch`\n\nstage, commit and push as follows (before pushing anything to branch, its recommended you run `npm run lint` script to check linting as this may be checked in the CI pipeline and prevent the tests from running if errors are detected)\n\n`$ git add -A` (for all files) or `$ git add [file name]`\n\n`$ git commit -m \"Some descriptive info\"`\n\n`$ git push`\n\nOnce you are happy all the changes required are ready to be merged, raise a pull request via git, request review, merge\n\nswitch to development branch and git pull\n\n`$ git switch development`\n\n`$ git pull`\n\nThe changes you have merged should now be in development branch\n\n## Release Candidate Branching\n\nAssume dev branch up to date with what is to be released\n\ncreate release candidate branch off development branch\n\n`$ git checkout -b release/name-of-release`\n\n`$ git commit --allow-empty`\n\n`$ git push -u origin feature or fix/name-of-branch`\n\nstage, commit and push until branch ready to merge - in this case the only change likely to be made is app version test.\n\nin github create PR merging release candidate into master\nwait for approval in GUI - but do not merge in GUI\nin CLI\n\n`$ git switch {release branch}`\n\n`$ git pull`\n\n`$ git switch master`\n\n`$ git pull`\n\n`$ git merge --no-commit {release branch}`\n\n`$ git push`\n\n`$ git switch development`\n\n`$ git merge --no-commit {release branch}`\n\n`$ git push`\n\n\nThis should now have merged the release candidate branch into both dev and master branches, without comimit numbers, and both branches should be aligned.\n\n# Environment variables\n\n| name               | description      | required |        default        |       valid        | notes |\n|--------------------|------------------|:--------:|-----------------------|:------------------:|-------|\n| CYLTFR_APP_URL | Target Environment url |    Yes   |                       |    | The wdio.config.js file lines 11-15 contain options on how to pass this url into the tests.  Ideally envars should be used and picked up by the tests, but for easy switching between environments when running locally, the variable can be set directly in the config file.  |\n| TESTING_CAPCHA_BYPASS      | Key for captcha bypass |    Yes    |                       |                    |  This can be found in the projects associated config file |\n\n\n# Run the tests\n\nEnvironment variables to be set in bashrc. or terminal.  Then to run tests from cli in root of project:\n\n`$ npm run wdio` - This will run all tests.\n\n\n\n`$ npm run test` - This will run all tests, and because we have a 'pretest' script, it will run the linting also.  This is mainly for use in pipeline.\n\n`$ npm run wdio -- --spec test/specs/specs/test-name.js` - This will run the specified spec file, rather than the entire set of tests\n\nIf running on local Windows machine then to run all tests:\n\n`$ ./node_modules/.bin/wdio ./wdio.conf.js`\n\nIf running on local Wiindows machine but only want to run a specific test:\n\n`$ ./node_modules/.bin/wdio run ./wdio.conf.js --spec test/specs/specs/test-name.js`  e.g. where testname = common-test.js\n\n# Report output\n\nThe repo has allure reporting plugged in so an easy to view output of the test run can be viewed.\n\n`$ npm run allure`\n\n# Browserstack testing\n\nCurrently not in palce\n\n# Jenkins pipeline\n\nThe tests are run from the jenkins pipeline and are environment agnostic, relying on config files to inject the required environment variables.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefra%2Fcyltfr-acceptance-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdefra%2Fcyltfr-acceptance-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefra%2Fcyltfr-acceptance-tests/lists"}