{"id":20038723,"url":"https://github.com/defra/flood-risk-acceptance-tests","last_synced_at":"2025-05-05T07:32:17.638Z","repository":{"id":13519564,"uuid":"74657525","full_name":"DEFRA/flood-risk-acceptance-tests","owner":"DEFRA","description":"Cucumber based acceptance tests for the Flood risk activity exemption digital service","archived":false,"fork":false,"pushed_at":"2024-10-28T15:00:15.000Z","size":223,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":14,"default_branch":"main","last_synced_at":"2024-10-28T17:29:23.385Z","etag":null,"topics":["acceptance-testing","cucumber","quke","siteprism"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","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":"2016-11-24T09:23:03.000Z","updated_at":"2024-10-28T14:57:46.000Z","dependencies_parsed_at":"2024-02-19T16:52:27.596Z","dependency_job_id":"ce0374cf-019e-4ba7-bc9c-4914eb6b96c2","html_url":"https://github.com/DEFRA/flood-risk-acceptance-tests","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fflood-risk-acceptance-tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fflood-risk-acceptance-tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fflood-risk-acceptance-tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fflood-risk-acceptance-tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DEFRA","download_url":"https://codeload.github.com/DEFRA/flood-risk-acceptance-tests/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224431722,"owners_count":17310189,"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":["acceptance-testing","cucumber","quke","siteprism"],"created_at":"2024-11-13T10:32:17.325Z","updated_at":"2024-11-13T10:32:17.993Z","avatar_url":"https://github.com/DEFRA.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flood risk acceptance tests\n\n![Build Status](https://github.com/DEFRA/flood-risk-acceptance-tests/workflows/CI/badge.svg?branch=main)\n\nYou may need an environmental permit if you want to work in, over, under or near a main river or flood or sea defence. Some flood risk activities are exempt from needing a permit and you can carry out the work if you [register an exemption](https://www.gov.uk/guidance/register-your-flood-risk-exemption-environmental-permits).\n\n[Register a flood risk activity exemption](https://register-flood-risk-exemption.service.gov.uk/) is the digital service which allows users to register an exemption.\n\nThis project contains the acceptance tests for the service. It is built around [Quke](https://github.com/DEFRA/quke), a Ruby gem that simplifies the process of writing and running Cucumber acceptance tests.\n\n## Pre-requisites\n\nThis project is setup to run against version 3.2.2 of Ruby.\n\nThe rest of the pre-requisites are the same as those for [Quke](https://github.com/DEFRA/quke#pre-requisites).\n\n## Installation\n\nFirst clone the repository and then drop into your new local repo\n\n```bash\ngit clone https://github.com/DEFRA/flood-risk-acceptance-tests.git \u0026\u0026 cd flood-risk-acceptance-tests\n```\n\nNext download and install the dependencies\n\n```bash\nbundle install\n```\n\n## Configuration\n\nYou can figure how the project runs using [Quke config files](https://github.com/DEFRA/quke#configuration).\n\nQuke relies on yaml files to configure how the tests are run, the default being `.config.yml`.\n\nIf left as that by default when Quke is executed it will run against your selected environment using Chrome.\n\n## Execution\n\nSimply call\n\n```bash\nbundle exec quke\n```\n\nYou can create [multiple config files](https://github.com/DEFRA/quke#multiple-configs), for example you may wish to have one setup for running against **Chrome**, and another to run against a different environment. You can tell **Quke** which config file to use by adding an environment variable argument to the command.\n\n```bash\nQUKE_CONFIG='chrome.config.yml' bundle exec quke\n```\n\n### Rake tasks\n\nWithin this project a series of [Rake](https://github.com/ruby/rake) tasks have been added. Each rake task is configured to run one of the configuration files already setup. To see the list of available commands run\n\n```bash\nbundle exec rake -T\n```\n\nYou can then run your chosen configuration e.g. `bundle exec rake tst`\n\n## Use of tags\n\n[Cucumber](https://cucumber.io/) has an inbuilt feature called [tags](https://github.com/cucumber/cucumber/wiki/Tags).\n\nThese can be added to a [feature](https://github.com/cucumber/cucumber/wiki/Feature-Introduction) or individual **scenarios**.\n\n```gherkin\n@functional\nFeature: Validations within the digital service\n```\n\n```gherkin\n@frontoffice @happypath\nScenario: Registration by an individual\n```\n\nWhen applied you then have the ability to filter which tests will be used during any given run\n\n```bash\nbundle exec quke --tags @frontoffice # Run only things tagged with this\nbundle exec quke --tags @frontoffice,@happypath # Run all things with these tags\nbundle exec quke --tags ~@functional # Don't run anything with this tag (run everything else)\n```\n\n### In this project\n\nTo have consistency across the project the following tags are defined and should be used in the following ways:\n\n|Tag|Description|\n|---|---|\n|@frontoffice|Any feature or scenario expected to be run against the front office application|\n|@backoffice|Any feature or scenario expected to be run against the back office application|\n|@happypath|A scenario which details a complete registration with no errors|\n|@functional|Any feature or scenario which is testing just a specific function of the service e.g. validation errors|\n|@fix|A feature or scenario that highlights an error or issue with the service that needs to be fixed|\n|@ci|A feature that is intended to be run only on our continuous integration service (you should never need to use this tag).|\n\nIt's also common practice to use a custom tag whilst working on a new feature or scenario e.g. `@focus` or `@wip`. That is perfectly acceptable but please ensure they are removed before your change is merged.\n\n### Accessibility\n\nThis repository includes the ability to check the currently loaded page for accessibility violations. It uses [axe-core-capybara](https://github.com/dequelabs/axe-core-gems/blob/develop/packages/axe-core-capybara/) and [axe-core-cucumber](https://github.com/dequelabs/axe-core-gems/blob/develop/packages/axe-core-cucumber).\n\nTo call it, use the following step:\n\n```gherkin\nThen the page should be axe clean\n\n# or call this within another step using\nstep(\"the page should be axe clean\")\n```\n\nThis calls all of Axe's accessibility rules and is useful to find best practice. However, our minimum standard is to focus on Web Content Accessibility Guidelines v2.1 to levels A and AA, so we want the tests to pass if so. Use this step to reduce the scope:\n\n```gherkin\nThen the page should be axe clean according to: wcag21a, wcag21aa\n```\n\nAlso refer to [Axe API documentation](https://github.com/dequelabs/axe-core/blob/develop/doc/API.md) for more detail.\n\nFinally, remember that automated testing is not a substitute for manual testing.\n\n## Contributing to this project\n\nIf you have an idea you'd like to contribute please log an issue.\n\nAll contributions should be submitted via a pull request.\n\n## License\n\nTHIS INFORMATION IS LICENSED UNDER THE CONDITIONS OF THE OPEN GOVERNMENT LICENCE found at:\n\n\u003chttp://www.nationalarchives.gov.uk/doc/open-government-licence/version/3\u003e\n\nThe following attribution statement MUST be cited in your products and applications when using this information.\n\n\u003e Contains public sector information licensed under the Open Government license v3\n\n### About the license\n\nThe Open Government Licence (OGL) was developed by the Controller of Her Majesty's Stationery Office (HMSO) to enable information providers in the public sector to license the use and re-use of their information under a common open licence.\n\nIt is designed to encourage use and re-use of information freely and flexibly, with only a few conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefra%2Fflood-risk-acceptance-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdefra%2Fflood-risk-acceptance-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefra%2Fflood-risk-acceptance-tests/lists"}