Skip to content

Remove last entity created support (or at least discourage it) #108

Open
@jorgetutor

Description

@jorgetutor

There are several steps with "last entity created", I am afraid we are overusing it when it should be only used in one scenario: when we don't know the name of the entity.

When we know the name, we should always use the steps "entity with the label" as it is more BDD-oriented and clearer to understand what are you testing.

Last entity created

src/Behat/Context/ParagraphsContext.php:   * Create a paragraph and reference it in the given field of the last node created.
src/Behat/Context/NodeAccessContext.php:   * Refresh node_access for the last node created.
src/Behat/Context/NodeAccessContext.php:   * @Given the access of last node created is refreshed
src/Behat/Context/NodeAccessContext.php:   * @Given the access of last node created with :bundle bundle is refreshed
src/Behat/Context/EntityContext.php:   * Go to last entity created.
src/Behat/Context/EntityContext.php:   * @Given I go to the last entity :entity created
src/Behat/Context/EntityContext.php:   * @Given I go to the last entity :entity with :bundle bundle created
src/Behat/Context/EntityContext.php:   * @Given I go to :subpath of the last entity :entity created
src/Behat/Context/EntityContext.php:   * @Given I go to :subpath of the last entity :entity with :bundle bundle created
src/Behat/Context/EntityContext.php:   * Delete the last entity created.
src/Behat/Context/EntityContext.php:   * @Given last entity :entity created is deleted
src/Behat/Context/EntityContext.php:   * @Given last entity :entity with :bundle bundle created is deleted

Entity with label

src/Behat/Context/EntityContext.php:   * @Given I go to the :entity_type entity with label :label
src/Behat/Context/EntityContext.php:   * @Given I go to :subpath of the :entity_type entity with label :label

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions