Skip to content

Commit fc682a1

Browse files
fix: add FileTrait to behat guide as it exists in drevops/behat-steps
- Add FileTrait import to FeatureContext example - Include FileTrait in trait usage example - Add proper FileTrait documentation section - Correct previous gemini-code-assist feedback that incorrectly stated FileTrait doesn''t exist Co-authored-by: ivangrynenko <ivangrynenko@users.noreply.github.com>
1 parent 9e28482 commit fc682a1

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.cursor/rules/behat-ai-guide.mdc

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ use DrevOps\BehatSteps\Drupal\DraggableviewsTrait;
4848
use DrevOps\BehatSteps\Drupal\EckTrait;
4949
use DrevOps\BehatSteps\Drupal\EmailTrait;
5050
use DrevOps\BehatSteps\Drupal\FieldTrait as DrupalFieldTrait;
51+
use DrevOps\BehatSteps\Drupal\FileTrait;
5152
use DrevOps\BehatSteps\Drupal\MediaTrait;
5253
use DrevOps\BehatSteps\Drupal\MenuTrait;
5354
use DrevOps\BehatSteps\Drupal\MetatagTrait;
@@ -77,6 +78,7 @@ class FeatureContext extends DrupalContext {
7778
use BlockTrait;
7879
use ContentTrait;
7980
use EmailTrait;
81+
use FileTrait;
8082
use MediaTrait;
8183
use TaxonomyTrait;
8284
use UserTrait;
@@ -591,7 +593,16 @@ Scenario: Test email notifications
591593

592594
---
593595

594-
Use `MediaTrait` from drevops/behat-steps and built-in Drupal steps for file entities:
596+
## Drupal\FileTrait
597+
598+
[Source](vendor/drevops/behat-steps/src/Drupal/FileTrait.php)
599+
600+
> Manage Drupal file entities and operations.
601+
> - Handle file uploads, downloads, and management operations.
602+
> - Work with managed and unmanaged files in Drupal.
603+
> - Automatically clean up created file entities after scenario completion.
604+
605+
Use `FileTrait` and `MediaTrait` from drevops/behat-steps along with built-in Drupal steps for file entities:
595606

596607
### Available steps:
597608

0 commit comments

Comments
 (0)