AI prompts
base on An integration layer between Behat, Mink Extension, and Drupal. # Behat Drupal Extension
The Drupal Extension is an integration layer between [Behat](http://behat.org),
[Mink Extension](https://github.com/Behat/MinkExtension), and Drupal. It
provides step definitions for common testing scenarios specific to Drupal
sites.
[![ci](https://github.com/jhedstrom/drupalextension/actions/workflows/ci.yml/badge.svg)](https://github.com/jhedstrom/drupalextension/actions/workflows/ci.yml)
The Drupal Extension 5.x supports Drupal 9 and 10, utilizes Behat 3.2+ and runs
on:
- PHP 7.4, 8.0, 8.1 with Drupal 9
- PHP 8.1 with Drupal 10.
[![Latest Stable Version](https://poser.pugx.org/drupal/drupal-extension/v/stable.svg)](https://packagist.org/packages/drupal/drupal-extension)
[![Total Downloads](https://poser.pugx.org/drupal/drupal-extension/downloads.svg)](https://packagist.org/packages/drupal/drupal-extension)
[![Latest Unstable Version](https://poser.pugx.org/drupal/drupal-extension/v/unstable.svg)](https://packagist.org/packages/drupal/drupal-extension)
[![License](https://poser.pugx.org/drupal/drupal-extension/license.svg)](https://packagist.org/packages/drupal/drupal-extension)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/jhedstrom/drupalextension/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/jhedstrom/drupalextension/?branch=master)
## Use it for testing your Drupal site.
If you're new to the Drupal Extension, we recommend starting with
the [Full documentation](https://behat-drupal-extension.readthedocs.org)
[![Documentation Status](https://readthedocs.org/projects/behat-drupal-extension/badge/?version=master)](https://behat-drupal-extension.readthedocs.org)
### Quick start
1. Install using [Composer](https://getcomposer.org/):
``` bash
mkdir projectdir
cd projectdir
curl -sS https://getcomposer.org/installer | php
COMPOSER_BIN_DIR=bin php composer.phar require drupal/drupal-extension='~5.0'
```
1. In the projectdir, create a file called `behat.yml`. Below is the
minimal configuration. Many more options are covered in the
[Full documentation](https://behat-drupal-extension.readthedocs.org)
``` yaml
default:
suites:
default:
contexts:
- Drupal\DrupalExtension\Context\DrupalContext
extensions:
Drupal\MinkExtension:
# Guzzle is used as HTTP client. You can configure the Guzzle request
# options by setting `browserkit_http.guzzle_request_options`. For
# instance the following configuration will disable SSL peer verification:
# browserkit_http:
# guzzle_request_options:
# verify: false
# See \GuzzleHttp\RequestOptions for all built-in Guzzle request options
browserkit_http: ~
base_url: http://example.org/ # Replace with your site's URL
Drupal\DrupalExtension:
blackbox: ~
```
1. In the projectdir, run
``` bash
bin/behat --init
```
1. Find pre-defined steps to work with using:
```bash
bin/behat -di
```
1. Define your own steps in `projectdir\features\FeatureContext.php`
1. Start adding your [feature files](http://behat.org/en/latest/user_guide/gherkin.html)
to the `features` directory of your repository.
## Credits
* Originally developed by [Jonathan Hedstrom](https://github.com/jhedstrom) with great help from [eliza411](https://github.com/eliza411)
* Maintainers
* [Pieter Frenssen](https://github.com/pfrenssen)
* [All these great contributors](https://github.com/jhedstrom/drupalextension/graphs/contributors)
## Additional resources
* [Behat Drupal Extension documentation](https://behat-drupal-extension.readthedocs.org)
* [Behat documentation](http://docs.behat.org)
* [Mink documentation](http://mink.behat.org)
* [Drupal Behat group](http://groups.drupal.org/behat)
## Examples and code snippets
* [Complex node creation, with field collections and entity references](https://gist.github.com/jhedstrom/5708233)
* [Achievements module support](https://gist.github.com/jhedstrom/9633067)
* [Drupal form element visibility](https://gist.github.com/pbuyle/7698675)
* [Track down PHP notices](https://www.godel.com.au/blog/use-behat-track-down-php-notices-they-take-over-your-drupal-site-forever)
* [Support for sites using basic HTTP authentication](https://gist.github.com/jhedstrom/5bc5192d6dacbf8cc459)
## Release notes
See [CHANGELOG](CHANGELOG.md).
## Contributing
Features and bug fixes are welcome! First-time contributors can jump in with the
issues tagged [good first issue](https://github.com/jhedstrom/drupalextension/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22).
See [CONTRIBUTING.md](https://github.com/jhedstrom/drupalextension/blob/master/CONTRIBUTING.md) for more information.
", Assign "at most 3 tags" to the expected json: {"id":"11002","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"