Skip to content
This repository was archived by the owner on Sep 15, 2022. It is now read-only.
This repository was archived by the owner on Sep 15, 2022. It is now read-only.

Create custom alias when generating entities with EntityContext #204

@Charlie-Lucas

Description

@Charlie-Lucas

I'm trying to generate multiple entities in my test and defining relations between them with the entity Context:

Feature: Create relations
  Scenario: oneToMany
    Given the following User:
      | firstname |
      | John      |
    And the following Trip:
      | country | date |
      | France  | 2016 |

To make the relation between User and Trip I can do this :

Feature: Create relations
  Scenario: oneToMany
    Given the following User:
      | firstname |
      | John      |
    And the following Trip:
      | country | date | traveler |
      | France  | 2016 | John     |

But the firstname field is not unique and i cant choose a specific entity when generating the relation.
I am trying to do something like in Alice :

Feature: Create relations
  Scenario: oneToMany
    Given the following User:
      | @         | firstname |
      | @director | John      |
      | @customer | John      |
    And the following Trips:
      | country | Date | traveler |
      | France  | 2016 | @director |

I dont use fixtures to generate entities because i want test generated entities in my scenario.
Am I missing something or i can submit a pull request for this?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions